Partitioning options

2024-02-07 Thread sud
Hi , We have a system which stores customers' transactions. There are a total of ~100K customers currently and the list will increase in future but not drastically though(maybe ~50K more or so). The number of transactions per day is ~400million. and we want to persist them in our postgres database

Re: How to do faster DML

2024-02-07 Thread Lok P
> On Tue, Feb 6, 2024 at 8:34 AM Greg Sabino Mullane > wrote: > >> On Sun, Feb 4, 2024 at 3:52 PM Lok P wrote: >> >>> What I mean was, we will definitely need the data for querying purposes >>> by the users, but just to keep the storage space incontrol (and to help the >>> read queries), we were

Re: archive command doesnt work

2024-02-07 Thread Laurenz Albe
On Wed, 2024-02-07 at 12:07 +0100, Alpaslan AKDAĞ wrote: > We have a primary, a hot standby and 2 warm standby servers with 2 days delay. > > After switchover since 01.02.2024 hot standby server does not archive wal > files. I couldn't find the problem. > > related postgresql.conf lines: > arch

Re: vacuum freeze wait_event BufferPin

2024-02-07 Thread abrahim abrahao
Thanks again Greg, I really appreciated all information. On Friday, February 2, 2024 at 08:16:41 p.m. EST, Greg Sabino Mullane wrote: On Fri, Feb 2, 2024 at 3:25 PM abrahim abrahao wrote:  SHARE UPDATE EXCLUSIVE (ShareUpdateExclusiveLock) should not be blocked by  ACCESS SHARE (Acce

Re: Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"

2024-02-07 Thread Marco Aurelio
I changed the path and now the correct version of openssl appears in the config.log, even so, after recompiling and reinstalling both postgresql and the pgcrypto contrib, when trying to create the extension in a database I continue to receive the same error, any further suggestions ? Marco Aurélio

Re: Generic File Access Function to read program output

2024-02-07 Thread Carsten Klein
Am 07.02.2024 um 15:54 schrieb Joe Conway: Maybe write your own in plpython or plperlu? Yeah... why didn't I think of if? PL/Python would be a first class option. Nevertheless, I still believe such a function in PostgreSQL's core would be a good addition. Maybe someone feels like implementi

Re: Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"

2024-02-07 Thread Tom Lane
Marco Aurelio writes: > I added the include and libraries folders: > --with-libraries=/usr/local/lib --with-includes=/usr/local/include > but configure keeps finding the old version of openssl > configure:14133: checking for openssl > configure:14151: found /usr/bin/openssl > configure:14163: res

Re: Generic File Access Function to read program output

2024-02-07 Thread Joe Conway
On 2/7/24 05:28, Carsten Klein wrote: Hi there, on PostgreSQL 14, I'm using function pg_read_file to read a JSON file on the server. After that, the JSON file gets casted to jsonb and with function jsonb_array_elements I'm iterating over the "records", which I transform into a PostgreSQL ROWTYPE

Re: Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"

2024-02-07 Thread Marco Aurelio
I added the include and libraries folders: --with-libraries=/usr/local/lib --with-includes=/usr/local/include but configure keeps finding the old version of openssl configure:14133: checking for openssl configure:14151: found /usr/bin/openssl configure:14163: result: /usr/bin/openssl configure:141

Re: Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"

2024-02-07 Thread Daniel Gustafsson
> On 7 Feb 2024, at 15:09, Marco Aurelio wrote: > When I run ./configure I see in config.log that it is always using the base > version of Freebsd. You can use the --with-libraries and --with-includes arguments to ./configure in order to point it to the version you want to build against. -- Da

Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"

2024-02-07 Thread Marco Aurelio
Dear Friends, I have a Freebsd 13.2 server where I installed postgresql 16.1 via source code, I installed the pgcrypto extension with the gmake install command without error messages, but when trying to create the extension in a database I receive the following message: ERROR: could not load libra

Re: Why doesn't Postgres apply limit on groups when retrieving N results per group using WHERE IN + ORDER BY

2024-02-07 Thread David Rowley
On Tue, 6 Feb 2024 at 01:23, Sean v wrote: > SELECT "orders".* > FROM "orders" > WHERE (user_id IN ?, ?, ?) > ORDER BY "orders"."created_at" LIMIT 50 > > I have two indexes - `(user_id)` and `(user_id, created_at)`. Only the first > index is ever used with this query. > I imagined that it would

archive command doesnt work

2024-02-07 Thread Alpaslan AKDAĞ
Hello We have a primary, a hot standby and 2 warm standby servers with 2 days delay. After switchover since 01.02.2024 hot standby server does not archive wal files. I couldn't find the problem. Hot Standby Server infos: Redhat Enterprise Linux 9.2 postgreSQL v13.10 related postgresql.conf line

Generic File Access Function to read program output

2024-02-07 Thread Carsten Klein
Hi there, on PostgreSQL 14, I'm using function pg_read_file to read a JSON file on the server. After that, the JSON file gets casted to jsonb and with function jsonb_array_elements I'm iterating over the "records", which I transform into a PostgreSQL ROWTYPE with jsonb_populate_record... Sin