Re: Death postgres

2023-05-10 Thread Peter J. Holzer
On 2023-05-10 22:52:47 +0200, Marc Millas wrote: > On Wed, May 10, 2023 at 7:24 PM Peter J. Holzer wrote: > > On 2023-05-10 16:35:04 +0200, Marc Millas wrote: > >  Unique  (cost=72377463163.02..201012533981.80 rows=1021522829864 width= > 97) > >    ->  Gather Merge  (cost=72377463

Re: Death postgres

2023-05-10 Thread Marc Millas
On Wed, May 10, 2023 at 7:24 PM Peter J. Holzer wrote: > On 2023-05-10 16:35:04 +0200, Marc Millas wrote: > > Unique (cost=72377463163.02..201012533981.80 rows=1021522829864 > width=97) > >-> Gather Merge (cost=72377463163.02..195904919832.48 > rows=1021522829864 width=97) > ... > >

Re: Death postgres

2023-05-10 Thread Peter J. Holzer
On 2023-05-10 16:35:04 +0200, Marc Millas wrote: >  Unique  (cost=72377463163.02..201012533981.80 rows=1021522829864 width=97) >    ->  Gather Merge  (cost=72377463163.02..195904919832.48 rows=1021522829864 > width=97) ... >                ->  Parallel Hash Left Join  (cost=604502.76..1276224253.5

Re: Death postgres

2023-05-10 Thread Laurenz Albe
On Wed, 2023-05-10 at 16:35 +0200, Marc Millas wrote: > > > postgres 14.2 on Linux redhat > > > > > > temp_file_limit set around 210 GB. > > > > > > a select request with 2 left join have crashed the server (oom killer) > > > after the postgres > > > disk occupation did grow from 15TB to 16 TB.

Re: Death postgres

2023-05-10 Thread Marc Millas
On Sun, May 7, 2023 at 8:42 PM Laurenz Albe wrote: > On Sat, 2023-05-06 at 03:14 +0200, Marc Millas wrote: > > postgres 14.2 on Linux redhat > > > > temp_file_limit set around 210 GB. > > > > a select request with 2 left join have crashed the server (oom killer) > after the postgres > > disk occu

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-10 Thread Evgeny Morozov
On 10/05/2023 6:39 am, Kirk Wolak wrote: > It could be as simple as creating temp tables in the other database > (since I believe pg_class was hit). We do indeed create temp tables, both in other databases and in the ones being tested. (We also create non-temp tables there.) > > Also, not sure if t

Re: Return rows in input array's order?

2023-05-10 Thread Dominique Devienne
On Wed, May 10, 2023 at 1:08 PM Andrew Gierth wrote: > > "Dominique" == Dominique Devienne writes: > Dominique> I assume that if the PK is composite, and I pass the PK > Dominique> tuples as separate same-cardinality "parallel" arrays, I can > Dominique> "zip" those arrays back via a mult

Patroni Issue

2023-05-10 Thread Inzamam Shafiq
Hi Team, I hope you are doing well. I am working on patroni auto failover, I have 3 ETCD nodes, 2 pgsql/patroni nodes, ETCD cluster is running fine with no issues, now I have installed postgresql on patroni nodes and configured streaming replication using pg_basebackup, which is running fine.

Re: Return rows in input array's order?

2023-05-10 Thread Andrew Gierth
> "Dominique" == Dominique Devienne writes: Dominique> Is it possible to maintain $1's order directly in SQL? >> This is the correct way: >> >> SELECT ... FROM unnest($1) WITH ORDINALITY AS u(id,ord) >> JOIN yourtable t ON t.id=u.id >> ORDER BY u.ord; Dominique> Thanks Andrew, for s

Re: Return rows in input array's order?

2023-05-10 Thread Dominique Devienne
On Wed, May 10, 2023 at 9:49 AM Andrew Gierth wrote: > Dominique> Is it possible to maintain $1's order directly in SQL? > > This is the correct way: > > SELECT ... FROM unnest($1) WITH ORDINALITY AS u(id,ord) >JOIN yourtable t ON t.id=u.id > ORDER BY u.ord; > Thanks Andrew, for sp

Re: Return rows in input array's order?

2023-05-10 Thread Andrew Gierth
> "Dominique" == Dominique Devienne writes: Dominique> Hi. With an integer identity primary key table, Dominique> we fetch a number of rows with WHERE id = ANY($1), Dominique> with $1 an int[] array. The API using that query must return Dominique> rows in the input int[] array order, and