Re: pb with join plan

2023-06-20 Thread David Rowley
On Wed, 21 Jun 2023 at 10:26, Marc Millas wrote: > link to the plan with both clauses ORed (the one not finishing) > https://explain.depesz.com/s/jHO2 I'd go with the UNION or UNION ALL idea I mentioned earlier. David

Re: strange behavior of .pgpass file

2023-06-20 Thread Adrian Klaver
On 6/20/23 13:32, Atul Kumar wrote: Please reply to list also. Ccing list. Th both pgpass files contains details as below: *:5432:*:postgres: There are no other lines in the file? More information below. I couldn't find anything wrong there in pgpass. and if the issue would have been

Re: strange behavior of .pgpass file

2023-06-20 Thread Atul Kumar
Please suggest. On Wed, 21 Jun 2023, 02:02 Atul Kumar, wrote: > Th both pgpass files contains details as below: > > *:5432:*:postgres: > > I couldn't find anything wrong there in pgpass. > > and if the issue would have been with .pgpass file only then I would not > have got the same error with

Re: pb with join plan

2023-06-20 Thread Marc Millas
On Tue, Jun 20, 2023 at 11:19 PM David Rowley wrote: > On Wed, 21 Jun 2023 at 08:34, Marc Millas wrote: > > > > On Tue, Jun 20, 2023 at 10:14 PM David Rowley > wrote: > >> > >> On Wed, 21 Jun 2023 at 07:42, Marc Millas > wrote: > >> > But if I do the same with clause one OR clause 2, I have

Re: pb with join plan

2023-06-20 Thread David Rowley
On Wed, 21 Jun 2023 at 08:34, Marc Millas wrote: > > On Tue, Jun 20, 2023 at 10:14 PM David Rowley wrote: >> >> On Wed, 21 Jun 2023 at 07:42, Marc Millas wrote: >> > But if I do the same with clause one OR clause 2, I have to kill the >> > request after an hour, seeing the filesystem showing

Re: foreign keys on multiple parent table

2023-06-20 Thread Les
> > . > > From programming point of view and also to reduce the number of objects in > DB could be convinient create just an audit table with a structure like: > >- auditi id >- reference_uuid (the key of the main table) >- table_name >- list of audit data > > Could work, but is

Re: foreign keys on multiple parent table

2023-06-20 Thread David G. Johnston
On Tuesday, June 20, 2023, Lorusso Domenico wrote: > > Could work, but is there a way to set a reference key over the uuid of all > the tables? > A foreign key in PostgreSQL is between two, and only two, tables. The PK side of which must be uniquely constrained. You can write custom triggers

foreign keys on multiple parent table

2023-06-20 Thread Lorusso Domenico
Hello guys, I've many tables representing as many concepts. For each record of each table I need to store extra information (think to audit information, but more complex than a simple text) The relation is 1:N, for each record there could be many audit records. >From programming point of view

Re: pb with join plan

2023-06-20 Thread Marc Millas
On Tue, Jun 20, 2023 at 10:14 PM David Rowley wrote: > On Wed, 21 Jun 2023 at 07:42, Marc Millas wrote: > > But if I do the same with clause one OR clause 2, I have to kill the > request after an hour, seeing the filesystem showing more than 140 Mb of > increased usage. > > > So, before

how to return data from insert into ... on conflict ... returning ... into

2023-06-20 Thread Les
Consider this example drop table if exists tbl; drop sequence if exists seq; create sequence seq; create table tbl( id int8 not null primary key, d bytea not null, h bytea not null, -- hash of the data, calculated automatically dummy byte default 0 -- dummy value, see below... ); alter

Re: pb with join plan

2023-06-20 Thread David Rowley
On Wed, 21 Jun 2023 at 07:42, Marc Millas wrote: > But if I do the same with clause one OR clause 2, I have to kill the request > after an hour, seeing the filesystem showing more than 140 Mb of increased > usage. > So, before providing the 3 explain plans (I must anonymize everything, so >

Re: strange behavior of .pgpass file

2023-06-20 Thread Adrian Klaver
On 6/20/23 11:59, Atul Kumar wrote: Hi, I found some strange behaviour of postgres superuser password in my existing cluster, below is the basic outline of the setup. 1. version - postgres 12 2. replication - streaming replication async 3. OS- centos7 4. One Master, One Standby I have

pb with join plan

2023-06-20 Thread Marc Millas
Hi, I have a postgres 14 on linux with a 15 TB db, with 20 cores and 150GB RAM, all nvme ssd. . Currently one user :-) A join between 2 big tables and then another join with a smaller third one takes less than 1 minute and provides a result of 15 M lines. Fine. if I do add a third join, with

strange behavior of .pgpass file

2023-06-20 Thread Atul Kumar
Hi, I found some strange behaviour of postgres superuser password in my existing cluster, below is the basic outline of the setup. 1. version - postgres 12 2. replication - streaming replication async 3. OS- centos7 4. One Master, One Standby I have identical pgpass files on both server postgres

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-20 Thread Peter J. Holzer
On 2023-06-20 10:10:47 -0500, Ron wrote: > On 6/20/23 09:54, Peter J. Holzer wrote: > > On 2023-06-19 16:09:34 -0500, Ron wrote: > > > On 6/19/23 12:15, Peter J. Holzer wrote: > > > On 2023-06-19 07:49:49 -0500, Ron wrote: > > > On 6/19/23 05:33, Peter J. Holzer wrote: > > >

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-20 Thread Ron
On 6/20/23 09:54, Peter J. Holzer wrote: On 2023-06-19 16:09:34 -0500, Ron wrote: On 6/19/23 12:15, Peter J. Holzer wrote: On 2023-06-19 07:49:49 -0500, Ron wrote: On 6/19/23 05:33, Peter J. Holzer wrote: So (again, as Francisco already wrote) the best way is probably

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-20 Thread Peter J. Holzer
On 2023-06-19 16:09:34 -0500, Ron wrote: > On 6/19/23 12:15, Peter J. Holzer wrote: > On 2023-06-19 07:49:49 -0500, Ron wrote: > On 6/19/23 05:33, Peter J. Holzer wrote: > So (again, as Francisco already wrote) the best way is probably > to write > a simple

Re: pg_service file questions

2023-06-20 Thread Erik Wienhold
> On 20/06/2023 08:11 CEST JUN ZHI wrote: > > I was scanning through the postgresql documentations when i came across this > webpage:PostgreSQL: Documentation: 15: 34.17. The Connection Service File > (https://www.postgresql.org/docs/current/libpq-pgservice.html). I am fairly > new to database

Re: pg_service file questions

2023-06-20 Thread Ron
On 6/20/23 01:11, JUN ZHI wrote: Hi, I was scanning through the postgresql documentations when i came across this webpage: PostgreSQL: Documentation: 15: 34.17. The Connection Service File  . I am fairly new to database and i have

pg_service file questions

2023-06-20 Thread JUN ZHI
Hi, I was scanning through the postgresql documentations when i came across this webpage: PostgreSQL: Documentation: 15: 34.17. The Connection Service File . I am fairly new to database and i have a few questions regarding this:

Re: OpenSSL version 3

2023-06-20 Thread Daniel Gustafsson
> On 19 Jun 2023, at 21:00, Jeffrey Walton wrote: > On Mon, Jun 19, 2023 at 11:39 AM Daniel Gustafsson wrote: >> >>> On 19 Jun 2023, at 17:13, Sebastien Flaesch >>> wrote: >>> OpenSSL V1 goes end of support soon (see >>> https://www.openssl.org/policies/releasestrat.html) with replacement