Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)

2025-07-19 Thread Nikhil Kumar Veldanda
Hi Michael, I'm reviewing your patches(toast_64bit_v2 branch) and have prepared two incremental patches that add ZSTD compression support. While doing this I made a small refactoring in heaptoast.c (around ToastTupleContext) to make adding additional TOAST pointer formats easier. Added two new on

Re: event trigger support for PL/Python

2025-07-19 Thread Pavel Stehule
Hi it is registered in commitfest app? The patch looks well Regards Pavel st 16. 7. 2025 v 14:02 odesílatel Euler Taveira napsal: > Hi, > > There is an old thread [1] that proposed $SUBJECT. That patch was not > committed and the thread died. I use the referred patch as base for the > attach

Re: Returning nbtree posting list TIDs in DESC order during backwards scans

2025-07-19 Thread Mircea Cadariu
Hi, On 18/07/2025 05:37, Peter Geoghegan wrote: I think that this patch isn't too far off being committable. Agreed. I just tried v3, and got 23 buffer hits, same as in the original demonstrative example. +                    /* Remember all prior TIDs (must be at least one) */ +       

Re: Documenting inlining SQL functions

2025-07-19 Thread Merlin Moncure
On Fri, Jul 18, 2025 at 9:08 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Sunday, July 6, 2025, Paul Jungwirth > wrote: > >> The second patch adds a new explaining how we inline SQL > >> functions: both single-result and set-returning. Since this happens > >> automatically, it makes

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2025-07-19 Thread Tender Wang
Tom Lane 于2025年7月20日周日 02:25写道: > Tender Wang writes: > > Please take a look at the attached v3 patch. > > This is of course not ever going to make any visible performance > difference. Still, the code is arguably clearer like this, and > I added some comments in hopes of improving it some more

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-07-19 Thread Tom Lane
Alexander Korotkov writes: > On Sat, Jul 19, 2025 at 10:49 PM Tom Lane wrote: >> So my impression is that the bug is not reliably fixed in 17. > Thank you for pointing! > Apparently I've backpatched d3917d8f13e7 everywhere but not in > REL_17_STABLE. Will be fixed now. Hah ... well, at least w

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-07-19 Thread Alexander Korotkov
On Sat, Jul 19, 2025 at 10:49 PM Tom Lane wrote: > Alexander Korotkov writes: > > I went trough the patchset. Everything looks good to me. I only did > > some improvements to comments and commit messages. I'm going to push > > this if no objections. > > There's apparently something wrong in th

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-07-19 Thread Tom Lane
Alexander Korotkov writes: > I went trough the patchset. Everything looks good to me. I only did > some improvements to comments and commit messages. I'm going to push > this if no objections. There's apparently something wrong in the v17 branch, as three separate buildfarm members have now hi

Re: Logical replication prefetch

2025-07-19 Thread Konstantin Knizhnik
On 15/07/2025 2:31 PM, Amit Kapila wrote: If you are interested, I would like to know your opinion on a somewhat related topic, which has triggered my interest in your patch. We are working on an update_delete conflict detection patch. The exact problem was explained in the initial email [1]. T

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2025-07-19 Thread Tom Lane
Tender Wang writes: > Please take a look at the attached v3 patch. This is of course not ever going to make any visible performance difference. Still, the code is arguably clearer like this, and I added some comments in hopes of improving it some more. Pushed. regards, t

Re: get_rule_expr RelabelType node does not print COLLATE clause

2025-07-19 Thread Tom Lane
jian he writes: > I found in some cases, we need to print COLLATE clauses for RelabelType Node. I have a hard time getting excited about that. RelabelType can only appear in plan trees, not in stored query trees, so we do not have a requirement for 100% accuracy for dump/reload purposes. I'm af

Re: Upgrade from Fedora 40 to Fedora 42, or from PostgreSQL 16.3 to PostgreSQL 16.9

2025-07-19 Thread Tom Lane
"Michael J. Baars" writes: > Compiling from source with a default ./configure --prefix=/usr/local > solves the problem. Cool. I confess I have no idea what the triggering difference was, because the extra options you mentioned before don't look performance-relevant. I guess -DOPENSSL_NO_ENGINE

Re: Proposal: Out-of-Order NOTIFY via GUC to Improve LISTEN/NOTIFY Throughput

2025-07-19 Thread Joel Jacobson
On Fri, Jul 18, 2025, at 19:06, Tom Lane wrote: > "Joel Jacobson" writes: >> My patch improves NOTIFY TPS when many backends are listening on multiple >> channels by eliminating unnecessary syscall wake‑ups, but it doesn't increase >> the internal parallelism of the NOTIFY queue itself. > > After

Re: Improve error reporting in 027_stream_regress test

2025-07-19 Thread Tom Lane
Michael Paquier writes: > On Fri, Jul 18, 2025 at 11:57:07AM +0300, Nazir Bilal Yavuz wrote: >> I added that as 0001. I used a shifting method for the 'tail' >> direction to not use too much memory. I found that there is >> 'File::ReadBackwards' in Perl but you need to install it, so I didn't >> u

Re: Upgrade from Fedora 40 to Fedora 42, or from PostgreSQL 16.3 to PostgreSQL 16.9

2025-07-19 Thread Michael J. Baars
On Fri, Jul 18, 2025 at 4:09 PM Tom Lane wrote: > > "Michael J. Baars" writes: > > Somewhere in between release 16.3 and > > release 16.9, changes must have been implemented that make the execution > > engine about two times slower than it was. > > That seems quite unlikely, and you've surely pro

get_rule_expr RelabelType node does not print COLLATE clause

2025-07-19 Thread jian he
hi. I found in some cases, we need to print COLLATE clauses for RelabelType Node. CREATE TABLE ttsa (c1 text[]); CREATE COLLATION case_sensitive (provider = icu, locale = ''); explain (verbose, cost off) SELECT count(*) FROM ttsa WHERE c1 = (array[1,2]::int[]::text[]) collate case_sensitive;

Re: index prefetching

2025-07-19 Thread Thomas Munro
On Sat, Jul 19, 2025 at 11:23 PM Tomas Vondra wrote: > Thanks for the link. It seems I came up with an almost the same patch, > with three minor differences: > > 1) There's another place that sets "distance = 0" in > read_stream_next_buffer, so maybe this should preserve the distance too? > > 2) I

Re: Document slot's restart_lsn can go backward

2025-07-19 Thread Alexander Korotkov
On Fri, Jul 18, 2025 at 2:40 PM Alexander Korotkov wrote: > While working on the patch fixing the situation when slot's > restart_lsn ends up pointing to a removed WAL segment [1], we > discovered that sometimes slot's restart_lsn can go backward > [2][3][4]. Hayato Kuroda proposed a patch [5], w

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-07-19 Thread Amit Kapila
On Fri, Jul 18, 2025 at 11:31 AM Dilip Kumar wrote: > > On Fri, Jul 18, 2025 at 11:25 AM shveta malik wrote: > > > > Okay. I see your point. Yes, it was non-blocking earlier but it was > > not giving ERROR, it was just dumping in logilfe that primary is > > behind and thus slot-sync could not be

Re: index prefetching

2025-07-19 Thread Tomas Vondra
On 7/19/25 06:03, Thomas Munro wrote: > On Sat, Jul 19, 2025 at 6:31 AM Tomas Vondra wrote: >> Perhaps the ReadStream should do something like this? Of course, the >> simple patch resets the stream very often, likely mcuh more often than >> anything else in the code. But wouldn't it be beneficial

Re: Skipping schema changes in publication

2025-07-19 Thread Shlok Kyal
On Mon, 30 Jun 2025 at 16:25, shveta malik wrote: > > Few more comments on 002: > > 5) > +GetAllTablesPublicationRelations(Oid pubid, bool pubviaroot) > { > > + List*exceptlist; > + > + exceptlist = GetPublicationRelations(pubid, PUBLICATION_PART_ALL); > > > a) Here, we are assuming that the

Re: Skipping schema changes in publication

2025-07-19 Thread Shlok Kyal
On Mon, 30 Jun 2025 at 11:54, Peter Smith wrote: > > Hi Shlok, > > One more thing, I noticed there is no tab-completion code yet for this > new EXCEPT (column_list) syntax. > I have added the tab-completion code in the latest v16 patch [1]. [1]: https://www.postgresql.org/message-id/CANhcyEW2LK4

Re: Skipping schema changes in publication

2025-07-19 Thread Shlok Kyal
On Mon, 30 Jun 2025 at 12:28, shveta malik wrote: > > On Fri, Jun 27, 2025 at 3:44 PM Shlok Kyal wrote: > > > > On Thu, 26 Jun 2025 at 15:27, shveta malik wrote: > > > > > > On Tue, Jun 24, 2025 at 9:48 AM Shlok Kyal > > > wrote: > > > > > > > > I have included the changes for > > > > it in v

Re: Upgrade from Fedora 40 to Fedora 42, or from PostgreSQL 16.3 to PostgreSQL 16.9

2025-07-19 Thread Michael J. Baars
On Fri, Jul 18, 2025 at 4:09 PM Tom Lane wrote: > > "Michael J. Baars" writes: > > Somewhere in between release 16.3 and > > release 16.9, changes must have been implemented that make the execution > > engine about two times slower than it was. > > That seems quite unlikely, and you've surely pro

Re: Lossless transmission of double precision floating point

2025-07-19 Thread Michael J. Baars
On Fri, Jul 18, 2025 at 4:12 PM Tom Lane wrote: > > "Michael J. Baars" writes: > > I receive data from a data provider on a daily basis, and noticed how they > > use fixed type floating point in text mode, to transmit data. As you might > > know, this type of transmission is not lossless. > > It