Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-18 Thread Fujii Masao
On Wed, Dec 3, 2025 at 2:45 PM Amit Kapila wrote: > > On Tue, Dec 2, 2025 at 8:30 PM Fujii Masao wrote: > > > > On Tue, Dec 2, 2025 at 9:08 PM Amit Kapila wrote: > > > Is it possible that we append the predefined options to the options > > > given by the user to avoid extra round-trip? > > > > O

Re: Report bytes and transactions actually sent downtream

2025-12-18 Thread Bertrand Drouvot
Hi, On Fri, Dec 19, 2025 at 12:32:49PM +0530, Ashutosh Bapat wrote: > On Thu, Dec 18, 2025 at 11:52 PM Bertrand Drouvot > wrote: > > > > I think that my example was confusing due to "size_t *bytes_filtered". I > > think > > that what we could do is something like: > > > > " > > typedef void (*Lo

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-12-18 Thread Masahiko Sawada
On Thu, Dec 18, 2025 at 9:14 PM Peter Smith wrote: > > I checked the v35/v36 patch diffs, and I also have no further review comments. > Thank you for reviewing the patch! I'm going to push it early next week if there are no major comments. Regards, -- Masahiko Sawada Amazon Web Services: http

Re: Fix typo 586/686 in atomics/arch-x86.h

2025-12-18 Thread John Naylor
On Fri, Nov 28, 2025 at 4:00 PM Daniel Gustafsson wrote: > > > On 28 Nov 2025, at 09:44, Jakub Wartak > > wrote: > > > > That's a typo in src/include/port/atomics/arch-x86.h, isn't it ?: > > if defined(__i568__) || defined(__i668__) || /* gcc i586+ */ > > If yes, then a patch is attached. Not

Re: Report bytes and transactions actually sent downtream

2025-12-18 Thread Ashutosh Bapat
On Thu, Dec 18, 2025 at 11:52 PM Bertrand Drouvot wrote: > > Hi, > > On Thu, Dec 18, 2025 at 06:22:40PM +0530, Ashutosh Bapat wrote: > > Hi Bertrand, > > > > On Wed, Dec 17, 2025 at 2:12 PM Bertrand Drouvot > > wrote: > > > > > > What worries me is all those API changes: > > > > > > -typedef void

Re: Refactor query normalization into core query jumbling

2025-12-18 Thread Bertrand Drouvot
Hi, On Thu, Dec 18, 2025 at 06:44:17PM -0600, Sami Imseih wrote: > For the second point, since JumbleState can be shared by multiple > extensions, hooks should receive it as a const pointer. This > signals read-only intent and prevents extensions from > accidentally modifying it through the hook.

Re: Sequence Access Methods, round two

2025-12-18 Thread Xuneng Zhou
Hi Michael, On Thu, Dec 18, 2025 at 12:53 PM Michael Paquier wrote: > > On Thu, Nov 13, 2025 at 08:51:32AM +0900, Michael Paquier wrote: > > Err, no. It's the opposite here: code cleanups and file splits are > > cleaner if they happen first, not after the implementations as these > > lead to les

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Dilip Kumar
On Fri, Dec 19, 2025 at 10:40 AM shveta malik wrote: > > 1. What should be the name of the option 'conflict_log_destination' vs > > 'conflict_log_format' > > I prefer conflcit_log_destination. > > > 2. Do we want to support multi destination then providing string like > > 'conflict_log_destinatio

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Amit Kapila
On Fri, Dec 19, 2025 at 11:44 AM Dilip Kumar wrote: > > On Fri, Dec 19, 2025 at 11:12 AM Peter Smith wrote: > > > > I didn't mean to suggest we should allow "not logging anywhere". I > > only wanted to ask how the user is expected to revert the conflict > > logging back to the default after they

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-18 Thread Japin Li
On Fri, 19 Dec 2025 at 04:29, Bertrand Drouvot wrote: > Hi, > > On Fri, Dec 19, 2025 at 08:01:54AM +0900, Michael Paquier wrote: >> On Wed, Dec 17, 2025 at 11:57:13AM +, Bertrand Drouvot wrote: >> > Please note that for hash_bitmap_info() and pgstathashindex() the open >> > calls are >> > ch

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Amit Kapila
On Fri, Dec 19, 2025 at 10:40 AM shveta malik wrote: > > On Fri, Dec 19, 2025 at 9:53 AM Dilip Kumar wrote: > > > > > 2. Do we want to support multi destination then providing string like > > 'conflict_log_destination = 'log,table,..' make more sense but then we > > would have to store as a strin

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Dilip Kumar
On Fri, Dec 19, 2025 at 11:12 AM Peter Smith wrote: > > I didn't mean to suggest we should allow "not logging anywhere". I > only wanted to ask how the user is expected to revert the conflict > logging back to the default after they had set it to something else. Okay understood, thanks for the cl

Re: Newly created replication slot may be invalidated by checkpoint

2025-12-18 Thread Amit Kapila
On Thu, Dec 18, 2025 at 5:41 PM Alexander Korotkov wrote: > > On Thu, Dec 11, 2025 at 9:29 AM Zhijie Hou (Fujitsu) > wrote: > > On Thursday, December 11, 2025 3:09 PM Zhijie Hou (Fujitsu) > > wrote: > > > I reviewed that approach, and I think the main distinction lies in > > > whether to > > >

Re: [PATCH v1] Fixed a spelling error in the comments in gininsert.c

2025-12-18 Thread Tender Wang
Hi Michael, Michael Paquier 于2025年12月19日周五 10:53写道: > On Fri, Dec 19, 2025 at 10:47:22AM +0800, Xingbin She wrote: > > This patch fixs a typo in gin code comments, detial as follows: > > Yep, will fix. Thanks for the report! > -- > Michael I just found another typo in gininsert.c(maybe on a n

RE: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-18 Thread Zhijie Hou (Fujitsu)
On Thursday, December 18, 2025 12:21 PM Chao Li wrote: > > > On Dec 17, 2025, at 16:48, Zhijie Hou (Fujitsu) > wrote: > > > > On Wednesday, December 17, 2025 3:56 PM Chao Li > wrote: > >> Thank you both for all your advice. Here comes my first > >> implementation of INHERIT in the attached v2

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Peter Smith
On Fri, Dec 19, 2025 at 3:25 PM Dilip Kumar wrote: > > On Fri, Dec 19, 2025 at 5:35 AM Peter Smith wrote: > > > > On Thu, Dec 18, 2025 at 8:09 PM Dilip Kumar wrote: > > > > > > On Tue, Dec 16, 2025 at 9:51 AM Amit Kapila > > > wrote: > > > > > > > > On Mon, Dec 15, 2025 at 5:11 PM Dilip Kumar

Re: DOC: fixes multiple errors in alter table doc

2025-12-18 Thread Chao Li
> On Dec 18, 2025, at 15:22, Chao Li wrote: > > Hi Hacker, > > While working on a patch these days, my eyes are on the “alter table” doc, > and found multiple errors: > > 1. Several sub-commands are missed in the top “action” list: > >* ALTER COLUMN SET >* ALTER COLUMN RESTART >

Re: Switch buffile.c/h to use pgoff_t

2025-12-18 Thread Michael Paquier
On Fri, Dec 19, 2025 at 11:00:54AM +0800, Chao Li wrote: > Given MAX_PHYSICAL_FILESIZE is just 1G (2^30), why availbytes has to > be pgoff_t instead of just int? The point of such changes would be to lift this barrier at some point, which is what the other thread I am mentioning upthread is also p

Re: Switch buffile.c/h to use pgoff_t

2025-12-18 Thread Bertrand Drouvot
Hi, On Fri, Dec 19, 2025 at 11:00:54AM +0800, Chao Li wrote: > Given MAX_PHYSICAL_FILESIZE is just 1G (2^30), why availbytes has to be > pgoff_t instead of just int? I agree that int would work, but maybe it's using pgoff_t just to be on the safe side of things should MAX_PHYSICAL_FILESIZE becom

Re: A few patches to clarify snapshot management, part 2

2025-12-18 Thread Chao Li
> On Dec 19, 2025, at 07:30, Heikki Linnakangas wrote: > > This is a continuation of the earlier thread with the same subject [1], and > related to the CSN work [2]. > > I'm pretty happy patches 0001-0005. They make the snapshot management more > clear in many ways: > > Patch 0001: Use a p

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-12-18 Thread Peter Smith
I checked the v35/v36 patch diffs, and I also have no further review comments. == Kind Regards, Peter Smith. Fujitsu Australia

Orphaned records in pg_replication_origin_status after subscription drop

2025-12-18 Thread Michael Paquier
Hi all, (Added Amit K. in CC.) Some colleagues have reported that it is possible to finish with orphaned records in pg_replication_origin_status, as an effect of table synchronization workers that miss some cleanup actions around replorigin_drop_by_name() when a subscription that spawned these wor

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread shveta malik
On Fri, Dec 19, 2025 at 9:53 AM Dilip Kumar wrote: > > On Fri, Dec 19, 2025 at 9:40 AM Amit Kapila wrote: > > > > On Fri, Dec 19, 2025 at 4:38 AM Masahiko Sawada > > wrote: > > > > > > On Thu, Dec 18, 2025 at 1:09 AM Dilip Kumar wrote: > > > > > > > > > > > 2) In catalog I am storing the "conf

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread shveta malik
On Fri, Dec 19, 2025 at 9:40 AM Amit Kapila wrote: > > On Fri, Dec 19, 2025 at 4:38 AM Masahiko Sawada wrote: > > > > On Thu, Dec 18, 2025 at 1:09 AM Dilip Kumar wrote: > > > > > > > > 2) In catalog I am storing the "conflict_log_format" option as a text > > > field, is there any better way so t

Re: Logical Replication of sequences

2025-12-18 Thread Peter Smith
Hi Vignesh. I had a quick look at this patch. == - * Instead, we invalidate only the relsyncache. + * Instead, invalidate the relation sync cache for publications that + * include tables. Invalidation is not required for sequences only + * publications. */ - InvalidatePubRelSyncCache(pub->

Re: Logical Replication of sequences

2025-12-18 Thread shveta malik
On Thu, Dec 18, 2025 at 5:30 PM vignesh C wrote: > > On Thu, 18 Dec 2025 at 17:03, shveta malik wrote: > > > > On Thu, Dec 18, 2025 at 3:04 PM vignesh C wrote: > > > > > > On Thu, 18 Dec 2025 at 12:37, Shlok Kyal wrote: > > > > > > > > Hi Team, > > > > > > > > While working on another thread, I

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-18 Thread Bertrand Drouvot
Hi, On Fri, Dec 19, 2025 at 08:01:54AM +0900, Michael Paquier wrote: > On Wed, Dec 17, 2025 at 11:57:13AM +, Bertrand Drouvot wrote: > > Please note that for hash_bitmap_info() and pgstathashindex() the open > > calls are > > changed instead. For those we keep the IS_INDEX() checks to reject

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Dilip Kumar
On Fri, Dec 19, 2025 at 5:35 AM Peter Smith wrote: > > On Thu, Dec 18, 2025 at 8:09 PM Dilip Kumar wrote: > > > > On Tue, Dec 16, 2025 at 9:51 AM Amit Kapila wrote: > > > > > > On Mon, Dec 15, 2025 at 5:11 PM Dilip Kumar wrote: > > > > > > > > We could do this as a first step. See the proposal

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Dilip Kumar
On Fri, Dec 19, 2025 at 9:40 AM Amit Kapila wrote: > > On Fri, Dec 19, 2025 at 4:38 AM Masahiko Sawada wrote: > > > > On Thu, Dec 18, 2025 at 1:09 AM Dilip Kumar wrote: > > > > > > > > 2) In catalog I am storing the "conflict_log_format" option as a text > > > field, is there any better way so t

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Amit Kapila
On Fri, Dec 19, 2025 at 4:38 AM Masahiko Sawada wrote: > > On Thu, Dec 18, 2025 at 1:09 AM Dilip Kumar wrote: > > > > > 2) In catalog I am storing the "conflict_log_format" option as a text > > field, is there any better way so that we can store in fixed format > > maybe enum value as an integer

Re: DOCS - Clarify the publication 'publish_via_partition_root' default value.

2025-12-18 Thread Amit Kapila
On Thu, Dec 18, 2025 at 11:41 PM Jacob Champion wrote: > > On Wed, Dec 17, 2025 at 1:08 PM David G. Johnston > wrote: > > Presently it’s the same criteria as for the code - things deemed bug fixes > > get back-patched; pure enhancements do not. > > Well, okay. Bear with me a moment because I nee

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-12-18 Thread shveta malik
On Fri, Dec 19, 2025 at 6:13 AM Masahiko Sawada wrote: > > > > > I've rebased the patch and addressed the review comments. > > Regards, > Thanks for the patch. 1) + * There could be some transactions that might have started with the old + * status, but we don't need to wait for these transaction

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Xuneng Zhou
He Melanie, Thanks for working on this. On Wed, Dec 17, 2025 at 12:59 AM Melanie Plageman wrote: > > On Wed, Dec 3, 2025 at 6:07 PM Melanie Plageman > wrote: > > > > If we're just talking about the renaming, looking at procarray.c, it > > is full of the word "removable" because its functions we

Re: WIP - xmlvalidate implementation from TODO list

2025-12-18 Thread Marcos Magueta
Hello again! I took some time to actually finish this feature. I think the answers for the previous questions are now clearer. I checked the initialization and the protections are indeed in place since commit a4b0c0aaf093a015bebe83a24c183e10a66c8c39, which specifically states: > Prevent access to

RE: Assertion failure in SnapBuildInitialSnapshot()

2025-12-18 Thread Zhijie Hou (Fujitsu)
On Friday, December 19, 2025 3:42 AM Masahiko Sawada wrote: > > On Tue, Dec 9, 2025 at 7:32 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Wednesday, December 10, 2025 7:25 AM Masahiko Sawada > wrote: > > > > > > On Tue, Nov 25, 2025 at 10:25 PM Zhijie Hou (Fujitsu) > > > wrote: > > > > > > > >

Re: pgsql: Add function to log the memory contexts of specified backend pro

2025-12-18 Thread Fujii Masao
On Tue, Dec 16, 2025 at 12:07 AM Robert Haas wrote: > > On Mon, Dec 8, 2025 at 2:32 PM Artem Gavrilov > wrote: > > I did your patch review. It successfully applies to all targeted branches: > > REL_14_STABLE (48969555447), REL_15_STABLE (b9a02b9780b), REL_16_STABLE > > (4d689a17693), REL_17_STA

Re: Fix wrong reference in pg_overexplain's doc

2025-12-18 Thread Fujii Masao
On Thu, Dec 18, 2025 at 6:23 PM Julien Tachoires wrote: > > Hi, > > pg_overexplain's documentation mentions that the definition of > RangeTblEntry is in nodes/plannodes.h, which seems to be wrong as it > is defined in nodes/parsenodes.h. Please find a small patch fixing this. Thanks for the patch

Re: Switch buffile.c/h to use pgoff_t

2025-12-18 Thread Chao Li
> On Dec 19, 2025, at 09:43, Michael Paquier wrote: > > Hi all, > (Added Bryan in CC as he has been looking at this stuff previously.) > > An mentioned on this thread and as a part of the quest to remove more > of long in the tree, buffile.c and buffile.h still rely on an > unportable off_t,

Re: [PATCH] CRC32C optimizations using SVE2 on ARM.

2025-12-18 Thread John Naylor
On Fri, Dec 19, 2025 at 4:20 AM [email protected] wrote: > For architecture-specific functions, we use > pg_attribute_target("arch=armv9-a+sve2-aes") There was already a proposal to use armv8-a+crypto, which is more widely available and works on smaller inputs. Perhaps you'd be intere

Re: [PATCH v1] Fixed a spelling error in the comments in gininsert.c

2025-12-18 Thread Michael Paquier
On Fri, Dec 19, 2025 at 10:47:22AM +0800, Xingbin She wrote: > This patch fixs a typo in gin code comments, detial as follows: Yep, will fix. Thanks for the report! -- Michael signature.asc Description: PGP signature

Re: Implement waiting for wal lsn replay: reloaded

2025-12-18 Thread Xuneng Zhou
Hi, On Thu, Dec 18, 2025 at 8:25 PM Alexander Korotkov wrote: > > On Thu, Dec 18, 2025 at 2:24 PM Xuneng Zhou wrote: > > On Thu, Dec 18, 2025 at 6:38 PM Alexander Korotkov > > wrote: > > > > > > Hi, Xuneng! > > > > > > On Tue, Dec 16, 2025 at 6:46 AM Xuneng Zhou wrote: > > > > Remove the erro

[PATCH v1] Fixed a spelling error in the comments in gininsert.c

2025-12-18 Thread Xingbin She
Hi hackers, This patch fixs a typo in gin code comments, detial as follows: diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index df30dcc..8824607 100644 --- a/src/backend/access/gin/gininsert.c +++ b/src/backend/access/gin/gininsert.c @@ -1784,7 +1784,7 @@ _

Re: Report bytes and transactions actually sent downtream

2025-12-18 Thread Chao Li
> On Dec 18, 2025, at 20:52, Ashutosh Bapat > wrote: > > On Thu, Dec 18, 2025 at 7:56 AM Chao Li wrote: >> >> >> >>> On Dec 17, 2025, at 13:55, Ashutosh Bapat >>> wrote: >>> >>> Thanks for pointing this out. I have fixed it my code. However, at >>> this point I am looking for a design

Switch buffile.c/h to use pgoff_t

2025-12-18 Thread Michael Paquier
Hi all, (Added Bryan in CC as he has been looking at this stuff previously.) An mentioned on this thread and as a part of the quest to remove more of long in the tree, buffile.c and buffile.h still rely on an unportable off_t, which is signed 4 bytes on Windows: https://www.postgresql.org/message-

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-18 Thread Mihail Nikalayeu
Hello, Álvaro and others! Attached version feels stable enough so far - 20 builds in a row on all CI variants (including 3 BSD) - no failures so far. I updated the commit message to include reference to previous commits. Also, tests designed in a way to fail fast if something is going wrong + log

Refactor query normalization into core query jumbling

2025-12-18 Thread Sami Imseih
Hi, A while back, there was a discussion about moving the query normalization code out of pg_stat_statements and into core query jumbling [0]. This conversation also led to hardening the hooks (currently only post_parse_analyze) that receive JumbleState [1]. For the first point, `generate_normali

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Peter Smith
On Thu, Dec 18, 2025 at 8:09 PM Dilip Kumar wrote: > ... > > Question: > 1) Shall we create a conflict log table in the current schema or we > should consider anything else, IMHO the current schema should be fine > and in the future when we add an option for conflict_log_table we will > support sc

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-18 Thread Chao Li
> On Dec 18, 2025, at 15:52, Chao Li wrote: > > > >> On Dec 18, 2025, at 15:43, Peter Eisentraut wrote: >> >> On 18.12.25 01:22, Chao Li wrote: On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: On 15.12.25 10:16, Chao Li wrote: > The motivation for this patch comes from my

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Peter Smith
On Thu, Dec 18, 2025 at 8:09 PM Dilip Kumar wrote: > > On Tue, Dec 16, 2025 at 9:51 AM Amit Kapila wrote: > > > > On Mon, Dec 15, 2025 at 5:11 PM Dilip Kumar wrote: > > > > > We could do this as a first step. See the proposal in email [1] where > > we have discussed having two options instead of

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-12-18 Thread Masahiko Sawada
On Mon, Dec 1, 2025 at 6:41 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 17 Nov 2025 18:04:46 +0100, > Tomas Vondra wrote: > > > I got pinged about this patch off-list. I won't have capacity to do a > > proper re

Re: Assert when executing query on partitioned table

2025-12-18 Thread Dmitry Koval
Hi! Unfortunately, the issue is still relevant, so I'm updating the first post and patches. I got an Assert when executing an "INSERT ... ON CONFLICT ... UPDATE ..." query on partitioned table. Reproduction order. --- 1) Apply the patch [v1-0001-Triggering-Assert-on-query-with-O

Re: DOCS - Clarify the publication 'publish_via_partition_root' default value.

2025-12-18 Thread Peter Smith
On Fri, Dec 19, 2025 at 5:11 AM Jacob Champion wrote: > > On Wed, Dec 17, 2025 at 1:08 PM David G. Johnston > wrote: > > Presently it’s the same criteria as for the code - things deemed bug fixes > > get back-patched; pure enhancements do not. > > Well, okay. Bear with me a moment because I need

Re: Proposal: Conflict log history table for Logical Replication

2025-12-18 Thread Masahiko Sawada
On Thu, Dec 18, 2025 at 1:09 AM Dilip Kumar wrote: > > On Tue, Dec 16, 2025 at 9:51 AM Amit Kapila wrote: > > > > On Mon, Dec 15, 2025 at 5:11 PM Dilip Kumar wrote: > > > > > We could do this as a first step. See the proposal in email [1] where > > we have discussed having two options instead of

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-18 Thread Michael Paquier
On Wed, Dec 17, 2025 at 11:57:13AM +, Bertrand Drouvot wrote: > Please note that for hash_bitmap_info() and pgstathashindex() the open calls > are > changed instead. For those we keep the IS_INDEX() checks to reject partitioned > indexes (which index_open() accepts via validate_relation_kind()

Re: Fwd: [PATCH] Add zstd compression for TOAST using extended header format

2025-12-18 Thread Michael Paquier
On Thu, Dec 18, 2025 at 10:44:22PM +0100, Dharin Shah wrote: > I want to make sure I understand your main point: you're OK with a new > `vartag_external`, but prefer we avoid increasing the heap TOAST pointer > from 16 -> 20 bytes since every zstd-toasted value would pay +4 bytes in > the main heap

Re: Buffer locking is special (hints, checksums, AIO writes)

2025-12-18 Thread Andres Freund
Hi, On 2025-12-18 19:20:38 +0200, Heikki Linnakangas wrote: > On 18/12/2025 19:03, Andres Freund wrote: > > On 2025-12-17 09:54:32 -0500, Andres Freund wrote: > > > On 2025-12-17 11:25:50 +0200, Heikki Linnakangas wrote: > > > > - LWLockWaitListLock() uses pg_atomic_read_u32() after spinning, > >

Re: Fwd: [PATCH] Add zstd compression for TOAST using extended header format

2025-12-18 Thread Dharin Shah
Hi Michael (and Peter), Thanks for the detailed feedback — this is really helpful. I want to make sure I understand your main point: you're OK with a new `vartag_external`, but prefer we avoid increasing the heap TOAST pointer from 16 -> 20 bytes since every zstd-toasted value would pay +4 bytes

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-18 Thread Noah Misch
On Thu, Dec 18, 2025 at 05:35:45PM +0530, vignesh C wrote: > On Thu, 18 Dec 2025 at 14:05, Chao Li wrote: > > > On Dec 18, 2025, at 03:51, Noah Misch wrote: > > > I plan to push the attached version. > > > Pushed as d49936f etc. > > 2 > > ``` > > + /* Sort by subscription name, s

Re: pg_plan_advice

2025-12-18 Thread Robert Haas
On Wed, Dec 17, 2025 at 8:44 AM Jakub Wartak wrote: > OK, now for the q10: > > Sort >Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - > lineitem.l_discount DESC >-> Finalize GroupAggregate > Group Key: customer.c_custkey, nation.n_name > -> Gather Merge >

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Kirill Reshke
On Fri, 19 Dec 2025 at 00:58, Melanie Plageman wrote: > > On Thu, Dec 18, 2025 at 1:07 PM Kirill Reshke wrote: > > > > On Thu, 18 Dec 2025 at 20:18, Melanie Plageman > > wrote: > > > > > But you are right, I don't see any non-error code path where a heap > > > page would become empty (all line p

Re: Custom oauth validator options

2025-12-18 Thread Zsolt Parragi
> I think I need to do more staring at the intersection of GUC > registration and session_preload_libraries, because my memory of the > order of operations was faulty. I won't be able to do that before the > holidays, most likely. Maybe I'm missing something, but why do we need session_preload_lib

[PATCH] psql: Allow connection string parameters as positional arguments

2025-12-18 Thread Daymel Bonne Solís
Hi hackers, I'd like to propose a small enhancement to psql that improves usability when working with connection services and other libpq connection parameters. Problem Currently, when users try to use connection string parameters like service=myservice as positional arguments to psql, the behav

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Melanie Plageman
On Thu, Dec 18, 2025 at 10:46 AM Kirill Reshke wrote: > > On Thu, 18 Dec 2025 at 20:18, Melanie Plageman > wrote: > > > Also, after the whole set is committed, we should then never > > > experience discrepancy between PD_ALL_VISIBLE and VM bits? Because > > > they will be set in a single WAL rec

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Melanie Plageman
On Thu, Dec 18, 2025 at 1:07 PM Kirill Reshke wrote: > > On Thu, 18 Dec 2025 at 20:18, Melanie Plageman > wrote: > > > But you are right, I don't see any non-error code path where a heap > > page would become empty (all line pointers set unused) and then not be > > set all-visible. Only vacuum se

Re: Enhancing Memory Context Statistics Reporting

2025-12-18 Thread Rahila Syed
Hi, PFA the updated and rebased patches. To summarize the work done in this thread, here are some key concerns discussed in threads [1] and [2] and steps taken to address those: *DSA APIs and CFI Handler Safety*: DSA APIs, being high-level, are unsafe to call from the CFI handler, which can be i

Re: Qual push down to table AM

2025-12-18 Thread Andres Freund
Hi, On 2025-12-18 20:40:31 +0100, Maxime Schoemans wrote: > > On 10 Dec 2025, at 00:08, Andres Freund wrote: > > I don't really see this being viable without first tackling two nontrivial > > projects: > > > > 2) Perform ScanKey evaluation in slot form, to be able to cache the > > deforming > >

Re: Assertion failure in SnapBuildInitialSnapshot()

2025-12-18 Thread Masahiko Sawada
On Tue, Dec 9, 2025 at 7:32 PM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, December 10, 2025 7:25 AM Masahiko Sawada > wrote: > > > > On Tue, Nov 25, 2025 at 10:25 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Wednesday, November 26, 2025 2:57 AM Masahiko Sawada > > wrote: > > > > > > >

Re: Qual push down to table AM

2025-12-18 Thread Maxime Schoemans
Hi, > On 10 Dec 2025, at 00:08, Andres Freund wrote: > I don't really see this being viable without first tackling two nontrivial > projects: > > 2) Perform ScanKey evaluation in slot form, to be able to cache the deforming > and to make deforming of multiple columns sufficiently efficient. A

Re: Recovering from detoast-related catcache invalidations

2025-12-18 Thread Andres Freund
Hi, On 2025-09-29 19:34:47 +0300, Arseniy Mukhin wrote: > On Fri, Sep 19, 2025 at 11:11 PM Andres Freund wrote: > > > > On 2025-03-26 07:21:43 -0400, Andres Freund wrote: > > > On 2025-01-14 15:13:21 +0200, Heikki Linnakangas wrote: > > > > Committed with those fixes. Thanks for the review! > > >

Re: Custom oauth validator options

2025-12-18 Thread Jacob Champion
On Thu, Dec 18, 2025 at 10:28 AM Zsolt Parragi wrote: > But without requiring > shared_preload_libraries, we can't do early error reporting during > postmaster startup about custom parameters. Is that okay? I think I need to do more staring at the intersection of GUC registration and session_prel

Re: [PATCH] Add memory usage reporting to VACUUM VERBOSE

2025-12-18 Thread Masahiko Sawada
On Tue, Dec 9, 2025 at 7:44 PM Tatsuya Kawata wrote: > > Hi all, > > Just a gentle ping on this patch. > Please let me know if there are any additional comments > or points I should address in the next revision. Sorry for the late reply. I've reviewed the v7 patch and here are some comments: +

Re: Inval reliability, especially for inplace updates

2025-12-18 Thread Noah Misch
On Wed, Dec 17, 2025 at 07:00:00AM +0200, Alexander Lakhin wrote: > 17.12.2025 05:23, Noah Misch wrote: > > I pushed the patch bundle to v17-v14. Thanks for the reviews! The > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dragonet&dt=2025-12-17%2001%3A34%3A36 > > "double free or corru

Re: Custom oauth validator options

2025-12-18 Thread Zsolt Parragi
> Might be more reason to look into the GUC system? I am already thinking about that, I have some ideas for a proof of concept, but no working prototype yet. But without requiring shared_preload_libraries, we can't do early error reporting during postmaster startup about custom parameters. Is that

Re: Report bytes and transactions actually sent downtream

2025-12-18 Thread Bertrand Drouvot
Hi, On Thu, Dec 18, 2025 at 06:22:40PM +0530, Ashutosh Bapat wrote: > Hi Bertrand, > > On Wed, Dec 17, 2025 at 2:12 PM Bertrand Drouvot > wrote: > > > > What worries me is all those API changes: > > > > -typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx, > > +typedef bool

Re: Serverside SNI support in libpq

2025-12-18 Thread Jacob Champion
On Thu, Dec 18, 2025 at 9:06 AM Jacob Champion wrote: > A nice-to-have v2ish feature might be to warn if the host configured > for a certificate cannot in fact match that certificate according to > OpenSSL. Another wishlist item: the logs (both server- and client-side) are pretty inscrutable when

Re: [PATCH] Make ReScanForeignScan callback optional for FDWs

2025-12-18 Thread Robert Haas
On Wed, Dec 3, 2025 at 3:45 AM Adam Lee wrote: > Beyond enabling non-rescannable FDWs, this mechanism could also be used > for performance optimization on other nodes. Some operations can technically > support rescan but at significant cost (MergeAppend redo all the sorts, > Aggregation redo all t

Re: DOCS - Clarify the publication 'publish_via_partition_root' default value.

2025-12-18 Thread Jacob Champion
On Wed, Dec 17, 2025 at 1:08 PM David G. Johnston wrote: > Presently it’s the same criteria as for the code - things deemed bug fixes > get back-patched; pure enhancements do not. Well, okay. Bear with me a moment because I need to calibrate to the community norms. Is the consensus that this is

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Kirill Reshke
On Thu, 18 Dec 2025 at 20:18, Melanie Plageman wrote: > But you are right, I don't see any non-error code path where a heap > page would become empty (all line pointers set unused) and then not be > set all-visible. Only vacuum sets line pointers unused and if all the > line pointers are unused i

Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode

2025-12-18 Thread Jacob Champion
On Wed, Dec 17, 2025 at 5:15 AM Zsolt Parragi wrote: > > I don't disagree. But at this point in these conversations, the > > question posed is typically "is the new risk/reward tradeoff any worse > > than PGSSLROOTCERT or PGSSLMODE or PGSERVICEFILE (or LD_LIBRARY_PATH > > or PATH)?" I'd say no, no

Re: Custom oauth validator options

2025-12-18 Thread Jacob Champion
On Thu, Dec 18, 2025 at 1:08 AM Zsolt Parragi wrote: > > It however requires shared_preload_libraries (that is common > for all options), maybe oauth_validator_libraries could imply that? Haven't looked at the patch yet, but I think most people probably want to use session_preload_libraries, not

Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables

2025-12-18 Thread Oleg Tkachenko
Hi,Here is a refactored test.Now, it creates data depending on the relation block size, so it works even if the segment size is not standard. I tested it locally with segment_size_blocks = 6, and it works correctly.I would be happy to hear your comments or suggestions.Regards,Oleg 0001-Clamp-trunc

Re: Buffer locking is special (hints, checksums, AIO writes)

2025-12-18 Thread Heikki Linnakangas
On 18/12/2025 19:03, Andres Freund wrote: Hi, On 2025-12-17 09:54:32 -0500, Andres Freund wrote: On 2025-12-17 11:25:50 +0200, Heikki Linnakangas wrote: - LWLockWaitListLock() uses pg_atomic_read_u32() after spinning, LockBufHdr() retries directly with pg_atomic_fetch_or_u32(). I think here

Re: [PATCH] Skip unpublishable child tables when adding parent to publication

2025-12-18 Thread Arunprasad Rajkumar
Hi Amit, There seem to be different interpretations of your comment. I understood it as suggesting that we should show a WARNING when adding a partition or parent table that has unsupported descendant tables. I would greatly appreciate some clarification on this point. Thanks a lot. Regards, Ar

Re: Serverside SNI support in libpq

2025-12-18 Thread Jacob Champion
On Wed, Dec 17, 2025 at 4:07 PM Daniel Gustafsson wrote: > > Will anyone be mad at us for camping on the "no_sni" identifier? I > > know technically underscore isn't allowed in DNS hostnames, bt [1, > > 2] > > Maybe, but I think that regardless of what we do someone will be mad. The > other o

Re: Buffer locking is special (hints, checksums, AIO writes)

2025-12-18 Thread Andres Freund
Hi, On 2025-12-17 09:54:32 -0500, Andres Freund wrote: > On 2025-12-17 11:25:50 +0200, Heikki Linnakangas wrote: > > - LWLockWaitListLock() uses pg_atomic_read_u32() after spinning, > > LockBufHdr() retries directly with pg_atomic_fetch_or_u32(). > > I think here LWLockWaitListLock() is likely ri

Re: Fixing the btree_gist inet mess

2025-12-18 Thread Tom Lane
Heikki Linnakangas writes: > On 01/08/2025 21:17, Tom Lane wrote: >> It's past time to move this problem along and try to get out of the >> business of encouraging use of known-broken code. I propose that >> for v19, we should flip the opcdefault status so that network_ops is >> marked default an

Re: index prefetching

2025-12-18 Thread Konstantin Knizhnik
On 18/12/2025 4:40 PM, Tomas Vondra wrote: On 12/18/25 14:57, Konstantin Knizhnik wrote: On 17/12/2025 9:54 PM, Tomas Vondra wrote: On 12/17/25 20:30, Andres Freund wrote: Hi, On 2025-12-17 13:49:43 -0500, Peter Geoghegan wrote: On Wed, Dec 17, 2025 at 12:19 PM Konstantin Knizhnik wrote:

Re: Fix possible 'unexpected data beyond EOF' on replica restart

2025-12-18 Thread Anthonin Bonnefoy
On Thu, Dec 18, 2025 at 3:18 PM Heikki Linnakangas wrote: > > The smgr interface isn't really an extension point, so we don't need to > worry about that. (I wish it was, but that's a different story [1]) Thanks for the additional context. > I don't think mdtruncate() should modify smgr_cached_nb

Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE

2025-12-18 Thread Pavel Stehule
čt 18. 12. 2025 v 12:47 odesílatel Aya Iwata (Fujitsu) < [email protected]> napsal: > Hi Pavel-san > > Thank you for your feedback! > > > From: Pavel Stehule > > Sent: Thursday, December 18, 2025 12:33 AM > > To: Iwata, Aya/岩田 彩 > > Cc: Michael Paquier ; Peter Smith < > [email protected]

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Kirill Reshke
On Thu, 18 Dec 2025 at 20:18, Melanie Plageman wrote: > > Also, after the whole set is committed, we should then never > > experience discrepancy between PD_ALL_VISIBLE and VM bits? Because > > they will be set in a single WAL record. The only cases when heap and > > VM disagrees on all-visibilit

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-12-18 Thread Melanie Plageman
On Thu, Dec 18, 2025 at 3:55 AM Kirill Reshke wrote: > > On Thu, 18 Dec 2025 at 05:30, Melanie Plageman > wrote: > > > If I was trying to guess how empty pages with PD_ALL_VISIBLE set are > > getting vacuumed, I would think it is due to SKIP_PAGES_THRESHOLD > > causing us to vacuum an all-frozen

Re: create table like including storage parameter

2025-12-18 Thread Euler Taveira
On Wed, Dec 17, 2025, at 3:41 AM, jian he wrote: > Does the "parameter" (INCLUDING PARAMETERS) definition is close to "option"? > This raises the question of whether we should also copy column-level options > to > the new table. > I don't think so. The current attribute options (n_distinct and n_

Re: Improve logical replication usability when tables lack primary keys

2025-12-18 Thread Euler Taveira
On Wed, Dec 17, 2025, at 6:43 PM, GRANT ZHOU wrote: > On Wed, Dec 17, 2025 at 12:50 PM Euler Taveira wrote: >> Each table needs to say what's its row identifier. The user created a table >> without primary key. Well, create a primary key. There are dozens of >> thousands >> of objects. Use a scri

Re: index prefetching

2025-12-18 Thread Andres Freund
Hi, On 2025-12-18 15:40:59 +0100, Tomas Vondra wrote: > The technical reason is that batch_getnext() does this: > > /* Delay initializing stream until reading from scan's second batch */ > if (priorbatch && !scan->xs_heapfetch->rs && !batchqueue->disabled && > enable_indexscan_prefetch)

Re: index prefetching

2025-12-18 Thread Tomas Vondra
On 12/18/25 14:57, Konstantin Knizhnik wrote: > > On 17/12/2025 9:54 PM, Tomas Vondra wrote: >> On 12/17/25 20:30, Andres Freund wrote: >>> Hi, >>> >>> On 2025-12-17 13:49:43 -0500, Peter Geoghegan wrote: On Wed, Dec 17, 2025 at 12:19 PM Konstantin Knizhnik wrote: > Moreover with

Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables

2025-12-18 Thread Robert Haas
On Thu, Dec 18, 2025 at 1:05 AM Amul Sul wrote: > Test looks good to me, but I have three suggestions as follow: > > 1. To minimize repetition in insert: use fillfactor 10, which is the > minimal we can set for a table, so that we can minimize tuples per > page. Use a longer string and lower count

Re: Fix possible 'unexpected data beyond EOF' on replica restart

2025-12-18 Thread Heikki Linnakangas
On 17/12/2025 10:40, Anthonin Bonnefoy wrote: On Wed, Dec 17, 2025 at 8:26 AM Amul Sul > wrote: The deleted code you moved to mdtruncate() should be kept where it was. We cannot ensure that every extension using this interface will adhere to that requirement what the c

Re: index prefetching

2025-12-18 Thread Konstantin Knizhnik
On 17/12/2025 9:54 PM, Tomas Vondra wrote: On 12/17/25 20:30, Andres Freund wrote: Hi, On 2025-12-17 13:49:43 -0500, Peter Geoghegan wrote: On Wed, Dec 17, 2025 at 12:19 PM Konstantin Knizhnik wrote: Moreover with `enable_indexscan_prefetch=off` results are the same. It's quite unlikely t

Don't cast away const where possible

2025-12-18 Thread Bertrand Drouvot
Hi hackers, Some functions are casting away the const qualifiers from their signatures in local variables. These 3 patches add const to read only local variables, preserving the const qualifiers from the function signatures. 0001: those are simple changes in 6 files (16 changes in total) 0002:

Re: pg_plan_advice

2025-12-18 Thread Robert Haas
On Wed, Dec 17, 2025 at 5:12 AM Jakub Wartak wrote: > Sort (cost=1010985030.44..1010985030.59 rows=61 width=51) >Sort Key: supplier.s_name >-> Nested Loop (cost=0.42..1010985028.63 rows=61 width=51) > Join Filter: (nation.n_nationkey = supplier.s_nationkey) > -> Seq

  1   2   >