Re: Question on Aurora postgres

2023-10-31 Thread veem v
Thank you so much. So basically this application is an enterprise app with 24/7 users(doing DML and querying both) and is currently in Oracle on premise database. It has data in the range of ~20-30TB and the queries will be happening 24/7 on this database. It's an OLTP app. And ofcourse lower

Re: Inefficient query plan for SELECT ... EXCEPT ...

2023-10-31 Thread Tom Lane
David Rowley writes: > It would be possible to have some sort of MergeExcept operator and > have the planner consider that. Unfortunately, since the upper planner > was changed a few years ago to have it consider paths the same as the > join planner does, nobody has yet come back to the union

Feature/Suggestion: libpq/psql support for libsecret (formerly gnome-keyring)

2023-10-31 Thread Alan Evans
I was working with a user and was looking for a convenient and secure method of password storage for `psql`. I was reminded of the various options, `-p password`, PGPASSWORD, .pgpass and so on. I was thinking it would be cool if psql/libpq could interact with the system keyring on linux systems,

Re: Inefficient query plan for SELECT ... EXCEPT ...

2023-10-31 Thread David Rowley
On Wed, 1 Nov 2023 at 11:41, Dimitrios Apostolou wrote: > I'm wondering why the planner doesn't see that the left table is very small > and follow a different path. > From an abstract computer science POV, I would > > 1. sort the left table (the right one is already indexed) > 2. "merge" the

Re: Inefficient query plan for SELECT ... EXCEPT ...

2023-10-31 Thread David G. Johnston
On Tue, Oct 31, 2023 at 3:41 PM Dimitrios Apostolou wrote: > > Is this worth a bug report? I can file one if the issue is not known. > Or am I misunderstanding the implications of the SELECT-EXCEPT query? > > In the meantime I have replaced the query with a LEFT OUTER JOIN which > performs much

Inefficient query plan for SELECT ... EXCEPT ...

2023-10-31 Thread Dimitrios Apostolou
Hello list, I'm getting an inefficient query plan for a SELECT ... EXCEPT ... query, where the left side is a very short table (even zero-length sometimes, but also also rarely can be as long as 200K rows), and the right side is a table with 10M UNIQUE NOT NULL rows: \d test_datatags

Question on Aurora postgres

2023-10-31 Thread veem v
Hello all, We are planning to use aurora Postgres for a few applications. But wanted some guidance on which instance, class type should we use for lower environment/non prod like Dev/Qa/Uat/perf and what should we use for production database? Is there some recommendation based on usage etc. for

Re: pg_checksums?

2023-10-31 Thread Paul Förster
Hi Alexander, > On Oct 30, 2023, at 19:49, Alexander Kukushkin wrote: > That's not what I said. That's why I asked. Because you used the word orthogonal. 藍 > Patroni only manages Postgres. It is exactly the same Postgres as you would > run it without Patroni. > Everything will work. Now that

Re: xmax not zero?

2023-10-31 Thread Laurenz Albe
On Tue, 2023-10-31 at 08:23 +0100, Luca Ferrari wrote: > What puzzled me was that such xmax was non-zero for a > while (days). Inspecting pg_class.reloptions I found that accidentally > (?) disabled autovacuum on such table, my fault! > I should have checked pg_stat_user_tables at first! VACUUM

Re: xmax not zero?

2023-10-31 Thread Luca Ferrari
On Mon, Oct 30, 2023 at 1:54 PM Guillaume Lelarge wrote: > There are many reasons for a non-zero value: row updated or deleted in a > rollbacked transaction, row updated or deleted in a current transaction, row > locked by a SELECT FOR UPDATE, and perhaps others I don't remember right now. >