Re: Debugging query performance in postgres

2025-09-04 Thread Adrian Klaver
On 9/4/25 13:32, veem v wrote: On Thu, 4 Sept 2025 at 23:19, Adrian Klaver We didn't get the exact root cause why the plan flipped but we have to add additional filters to get rid of the performance issue. Did you do an EXPLAIN ANALYZE before and after the changes? If so did you save the

Re: Debugging query performance in postgres

2025-09-04 Thread Ron Johnson
On Thu, Sep 4, 2025 at 12:58 PM veem v wrote: > Hello, > We have a situation in which we had a dml query within a procedure that > was running fine but suddenly the plan flipped and it started running > longer. > That sounds like something that bit me once. Took a while to figure out, and was v

Re: Debugging query performance in postgres

2025-09-04 Thread veem v
On Thu, 4 Sept 2025 at 23:19, Adrian Klaver wrote: > On 9/4/25 09:57, veem v wrote: > > Hello, > > We have a situation in which we had a dml query within a procedure that > > was running fine but suddenly the plan flipped and it started running > > longer. It took us a good amount of time to iden

Re: Q: limit the length of log file entries?

2025-09-04 Thread Adrian Klaver
On 9/4/25 12:43, Albrecht Dreß wrote: Am 04.09.25 20:21 schrieb(en) Adrian Klaver: "Psycopg 3 sends the query and the parameters to the server separately, instead of merging them on the client side. Server-side binding works for normal SELECT and data manipulation statements (INSERT, UPDATE, DEL

Re: Q: limit the length of log file entries?

2025-09-04 Thread Adrian Klaver
On 9/4/25 08:54, Adrian Klaver wrote: On 9/4/25 08:48, Albrecht Dreß wrote: Am 03.09.25 21:07 schrieb(en) Tom Lane: There isn't any provision for limiting the length of source queries quoted in the log. I see, thanks for the clarification.  IMHO, it would be nice to have such an option, thou

Re: Debugging query performance in postgres

2025-09-04 Thread Adrian Klaver
On 9/4/25 09:57, veem v wrote: Hello, We have a situation in which we had a dml query within a procedure that was running fine but suddenly the plan flipped and it started running longer. It took us a good amount of time to identify the cause and fix it. So I have below questions, What was t

Re: In-order pg_dump (or in-order COPY TO)

2025-09-04 Thread Adrian Klaver
On 9/4/25 05:02, Álvaro Herrera wrote: On 2025-Aug-26, Dimitrios Apostolou wrote: I am storing dumps of a database (pg_dump custom format) in a de-duplicating backup server. Each dump is many terabytes in size, so deduplication is very important. And de-duplication itself is based on rolling ch

Latest patches break one of our unit-test, related to RLS

2025-09-04 Thread Dominique Devienne
In the same vein as v18betas breaking our unit-tests... (we still don't understand, haven't looked much though). OK, above it's about a major upgrade. So that's one thing. But now, we've ascertain that a particular test is: OK with 16.9 and 17.5 (we cannot test on beta2 anymore) KO with 16.10 an

Re: In-order pg_dump (or in-order COPY TO)

2025-09-04 Thread Achilleas Mantzios
On 9/4/25 19:08, Dimitrios Apostolou wrote: Hi Álvaro and Greg, On Thursday 2025-09-04 14:02, Álvaro Herrera wrote: It's generally considered nowadays that pg_dump is not the best option to create backups of very large databases.  You may be better served by using a binary backup tool -- som

Debugging query performance in postgres

2025-09-04 Thread veem v
Hello, We have a situation in which we had a dml query within a procedure that was running fine but suddenly the plan flipped and it started running longer. It took us a good amount of time to identify the cause and fix it. So I have below questions, 1)Do we have any data dictionary view or query a

Re: Latest patches break one of our unit-test, related to RLS

2025-09-04 Thread Dominique Devienne
On Thu, Sep 4, 2025 at 5:31 PM Dominique Devienne wrote: > On Thu, Sep 4, 2025 at 5:12 PM Adrian Klaver > wrote: > > On 9/4/25 08:03, Dominique Devienne wrote: > > > But now, we've ascertain that a particular test is: > > > OK with 16.9 and 17.5 (we cannot test on beta2 anymore) > > > KO with 16

Re: Latest patches break one of our unit-test, related to RLS

2025-09-04 Thread Adrian Klaver
On 9/4/25 08:03, Dominique Devienne wrote: In the same vein as v18betas breaking our unit-tests... (we still don't understand, haven't looked much though). OK, above it's about a major upgrade. So that's one thing. But now, we've ascertain that a particular test is: OK with 16.9 and 17.5 (we c

Re: Q: limit the length of log file entries?

2025-09-04 Thread Albrecht Dreß
Am 03.09.25 21:07 schrieb(en) Tom Lane: > There isn't any provision for limiting the length of source queries > quoted in the log. I see, thanks for the clarification. IMHO, it would be nice to have such an option, though… > Had your user sent the bytea value as a query > parameter, then log_pa

Re: Q: limit the length of log file entries?

2025-09-04 Thread Albrecht Dreß
Am 03.09.25 17:56 schrieb(en) Adrian Klaver: > Did you reload the server after making the above changes? Sure, running “systemctl reload …”. > Did you take a look at output from: > > https://www.postgresql.org/docs/current/view-pg-settings.html > > for appropriate settings name to see if someth

Re: In-order pg_dump (or in-order COPY TO)

2025-09-04 Thread Dimitrios Apostolou
Hi Álvaro and Greg, On Thursday 2025-09-04 14:02, Álvaro Herrera wrote: It's generally considered nowadays that pg_dump is not the best option to create backups of very large databases. You may be better served by using a binary backup tool -- something like Barman. With current Postgres rele

Re: Q: limit the length of log file entries?

2025-09-04 Thread Adrian Klaver
On 9/4/25 08:48, Albrecht Dreß wrote: Am 03.09.25 21:07 schrieb(en) Tom Lane: There isn't any provision for limiting the length of source queries quoted in the log. I see, thanks for the clarification. IMHO, it would be nice to have such an option, though… Had your user sent the bytea valu

Re: Latest patches break one of our unit-test, related to RLS

2025-09-04 Thread Laurenz Albe
On Thu, 2025-09-04 at 17:03 +0200, Dominique Devienne wrote: > OK with 16.9 and 17.5 (we cannot test on beta2 anymore) > KO with 16.10 and 17.6 (and beta3 too, released at the same time) > > Which for a minor patch is a surprise to us, not in a good way. > > So... Did anything change around RLS i

Re: In-order pg_dump (or in-order COPY TO)

2025-09-04 Thread Álvaro Herrera
On 2025-Aug-26, Dimitrios Apostolou wrote: > I am storing dumps of a database (pg_dump custom format) in a de-duplicating > backup server. Each dump is many terabytes in size, so deduplication is very > important. And de-duplication itself is based on rolling checksums which is > pretty flexible,