Re: [PATCH]Remove the redundant assignment

2025-12-15 Thread Michael Paquier
On Tue, Dec 16, 2025 at 03:08:25PM +0800, Chao Li wrote: > Given that, I agree we should remove the redundant assignments to > keep the code clearer and consistent. Yeah, these could be removed. I am wondering why 0eb23285a257 did not bother, but that's no big deal one way or another, just less

Re: Fix crash during recovery when redo segment is missing

2025-12-15 Thread Michael Paquier
On Tue, Dec 16, 2025 at 12:40:25PM +0530, Nitin Jadhav wrote: > I was planning to start a separate thread for this point, but since it > was a small change I had included it here earlier. I understand the > considerations involved even for these minor adjustments. I will start > a separate thread f

Re: Change the signature of pgstat_report_vacuum() so that it's passed a Relation

2025-12-15 Thread Michael Paquier
On Tue, Dec 16, 2025 at 06:49:13AM +, Bertrand Drouvot wrote: > While working on relfilenode statistics, Andres suggested that we pass the > Relation > to pgstat_report_vacuum() (instead of the parameters inherited from the > Relation, > (See [1])). > > That looks like a good idea to me as i

Re: relfilenode statistics

2025-12-15 Thread Michael Paquier
On Mon, Dec 15, 2025 at 12:48:25PM -0500, Andres Freund wrote: > I don't think this is true as stated. Two reasons: > > 1) This afaict guarantees that the relfilenode will not clash with oids, but >it does *NOT* guarantee that it does not clash with other relfilenodes > > 2) Note that GetNewR

Error position support for ComputeIndexAttrs

2025-12-15 Thread jian he
hi. Following the addition of error position support to ComputePartitionAttrs in [0], we can extend this feature to ComputeIndexAttrs. Both partition keys and indexes support expressions and share a 32-column limit, CREATE INDEX can be as complicated as PARTITION BY expression, and given that Com

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread Amit Kapila
On Mon, Dec 15, 2025 at 2:55 PM Dilip Kumar wrote: > > On Mon, Dec 15, 2025 at 2:16 PM shveta malik wrote: > > > > On Sun, Dec 14, 2025 at 9:20 PM Dilip Kumar wrote: > > > 4) > > postgres=# SELECT c.relname FROM pg_depend d JOIN pg_class c ON c.oid > > = d.objid JOIN pg_subscription s ON s.oid =

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

2025-12-15 Thread Masahiko Sawada
On Mon, Dec 15, 2025 at 10:32 PM Peter Smith wrote: > > Hi Sawada-San. > > Some minor review comments for v35-0001. > > == > src/backend/replication/logical/logicalctl.c > > ProcessBarrierUpdateXLogLogicalInfo: > > 1. > +/* > + * This routine is called when we are told to update XLogLogicalInf

Re: Fix crash during recovery when redo segment is missing

2025-12-15 Thread Nitin Jadhav
> As a whole, this has to be backpatched, because we are just ignoring > recovery if the REDO record is simply missing while the checkpoint > record is found. For the back branches, the PANIC is actually what > I'm planning to go with, to match with what is happening when the > checkpoint record i

Re: [PATCH]Remove the redundant assignment

2025-12-15 Thread Chao Li
> On Dec 16, 2025, at 14:18, Feilong Meng wrote: > > Hi,Hackers, > > I found that in the InjectionPointAttach function within the > src/backend/utils/misc/injection_point.c file, the variable is manually > assigned a '\0' at the end, even though strlcpy already guarantees that the > destin

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

2025-12-15 Thread Arunprasad Rajkumar
Thank you, Zhijie and Euler, for your thoughts. I’d like to compare the behavior of UNLOGGED, TEMP, and FOREIGN tables with PostgreSQL streaming (physical) replication. PostgreSQL sets a clear expectation there: these relations are not made available on the replica. I think we could follow a simi

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

2025-12-15 Thread Masahiko Sawada
On Mon, Dec 15, 2025 at 1:11 AM shveta malik wrote: > > On Sat, Dec 13, 2025 at 2:27 PM Masahiko Sawada wrote: > > > > On Wed, Dec 10, 2025 at 10:19 PM Amit Kapila > > wrote: > > > > > > On Wed, Dec 10, 2025 at 3:32 PM shveta malik > > > wrote: > > > > > > > > +1. This can be reproduced as we

RE: [Proposal] Adding Log File Capability to pg_createsubscriber

2025-12-15 Thread Hayato Kuroda (Fujitsu)
Dear Gyan, +1 for the idea. This point has already been discussed since the initial commit [1], but it has left till now. I'm happy if you can take initiative. Of course I can review your patches. Per my understanding, pg_upgrade puts logfiles at the directory, under "${PGDATANEW}/pg_upgrade_outp

Re: Change the signature of pgstat_report_vacuum() so that it's passed a Relation

2025-12-15 Thread Chao Li
> On Dec 16, 2025, at 14:49, Bertrand Drouvot > wrote: > > Hi hackers, > > While working on relfilenode statistics, Andres suggested that we pass the > Relation > to pgstat_report_vacuum() (instead of the parameters inherited from the > Relation, > (See [1])). > > That looks like a good i

Change the signature of pgstat_report_vacuum() so that it's passed a Relation

2025-12-15 Thread Bertrand Drouvot
Hi hackers, While working on relfilenode statistics, Andres suggested that we pass the Relation to pgstat_report_vacuum() (instead of the parameters inherited from the Relation, (See [1])). That looks like a good idea to me as it reduces the number of parameters and it's consistent with pgstat

Re: Improve logical replication usability when tables lack primary keys

2025-12-15 Thread Chao Li
> On Dec 15, 2025, at 13:48, Amit Kapila wrote: > > On Mon, Dec 15, 2025 at 9:06 AM Chao Li wrote: >> >>> On Dec 15, 2025, at 11:28, Dilip Kumar wrote: >>> >>> On Tue, Nov 11, 2025 at 6:11 PM Chao Li wrote: Hi Amit, Thanks for asking. > On Nov 11, 2025, at

Re: Implement waiting for wal lsn replay: reloaded

2025-12-15 Thread Xuneng Zhou
Hi, On Tue, Dec 16, 2025 at 1:49 PM Chao Li wrote: > > > > > On Oct 4, 2025, at 09:35, Xuneng Zhou wrote: > > > > Hi, > > > > On Sun, Sep 28, 2025 at 5:02 PM Xuneng Zhou wrote: > >> > >> Hi, > >> > >> On Fri, Sep 26, 2025 at 7:22 PM Xuneng Zhou wrote: > >>> > >>> Hi Álvaro, > >>> > >>> Thanks

Re: alter check constraint enforceability

2025-12-15 Thread Amul Sul
On Tue, Dec 16, 2025 at 10:26 AM jian he wrote: > > On Mon, Dec 15, 2025 at 7:49 PM Amul Sul wrote: > > > > [...] > v6-0001, v6-0002 both indented properly via pgindent, also polished the commit > messages. Thanks. I don't have any other comments. The patch is now ready for committer review. I

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

2025-12-15 Thread Peter Smith
Hi Sawada-San. Some minor review comments for v35-0001. == src/backend/replication/logical/logicalctl.c ProcessBarrierUpdateXLogLogicalInfo: 1. +/* + * This routine is called when we are told to update XLogLogicalInfo + * by a ProcSignalBarrier. + */ +bool +ProcessBarrierUpdateXLogLogicalIn

[PATCH]Remove the redundant assignment

2025-12-15 Thread Feilong Meng
Hi,Hackers, I found that in the InjectionPointAttach function within the src/backend/utils/misc/injection_point.c file, the variable is manually assigned a '\0' at the end, even though strlcpy already guarantees that the destination buffer will be null-terminated and will not overflow. The cod

Re: Fix crash during recovery when redo segment is missing

2025-12-15 Thread Michael Paquier
On Mon, Dec 15, 2025 at 05:48:29PM +0900, Michael Paquier wrote: > I have done a couple of tests in the CI and locally, and that was > looking stable. Attached is the result of what would happen on HEAD, > where the change in xlogrecovery.c would include the back-branch > versions. > > Thoughts o

Fix memory leak in tzparser.c

2025-12-15 Thread Shixin Wang
Hi hackers, I noticed a memory leak in the addToArray() function in src/backend/utils/misc/tzparser.c. When the override parameter is true and a duplicate timezone abbreviation is found, the code overwrites midptr->zone without freeing the previously allocated memory. The fix would be: -

Re: Implement waiting for wal lsn replay: reloaded

2025-12-15 Thread Chao Li
> On Oct 4, 2025, at 09:35, Xuneng Zhou wrote: > > Hi, > > On Sun, Sep 28, 2025 at 5:02 PM Xuneng Zhou wrote: >> >> Hi, >> >> On Fri, Sep 26, 2025 at 7:22 PM Xuneng Zhou wrote: >>> >>> Hi Álvaro, >>> >>> Thanks for your review. >>> >>> On Tue, Sep 16, 2025 at 4:24 AM Álvaro Herrera wr

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread vignesh C
On Thu, 11 Dec 2025 at 19:50, Dilip Kumar wrote: > > On Thu, Dec 11, 2025 at 5:57 PM Amit Kapila wrote: > > > > On Thu, Dec 11, 2025 at 5:10 PM Dilip Kumar wrote: > > > > > > On Thu, Dec 11, 2025 at 5:04 PM shveta malik > > > wrote: > > > > > > > 2) > > > > When we do below: > > > > alter subs

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread shveta malik
On Mon, Dec 15, 2025 at 3:18 PM Amit Kapila wrote: > > On Sun, Dec 14, 2025 at 9:16 PM Dilip Kumar wrote: > > > > Here is the patch which implements the dependency and fixes other > > comments from Shveta. > > > > +/* > + * Check if the specified relation is used as a conflict log table by any >

Re: alter check constraint enforceability

2025-12-15 Thread jian he
On Mon, Dec 15, 2025 at 7:49 PM Amul Sul wrote: > > > v5-0002: alter check constraint enforceability > > > The patch also looks good, but I have a minor comment for the test -- > you created the check_constraint_status view, which is not dropped, it > should be dropped at the end. Also, instead of

Re: Implement waiting for wal lsn replay: reloaded

2025-12-15 Thread Xuneng Zhou
Hi, On Tue, Dec 16, 2025 at 11:28 AM Xuneng Zhou wrote: > > Hi, > > On Tue, Dec 2, 2025 at 6:10 PM Xuneng Zhou wrote: > > > > Hi, > > > > On Tue, Dec 2, 2025 at 11:08 AM Xuneng Zhou wrote: > > > > > > Hi, > > > > > > On Mon, Dec 1, 2025 at 12:33 PM Xuneng Zhou wrote: > > > > > > > > Hi hackers

Re: [BUG] [PATCH] Allow physical replication slots to recover from archive after invalidation

2025-12-15 Thread Joao Foltran
Hi Zhijie, Thank you for clarifying this behavior to me! I've tested it and it really doesn't hold back wals anymore once it has been invalidated due to the check inside ReplicationSlotsComputeRequiredLSN(). You are correct that simply letting the slot be reacquired and continue working would be

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread vignesh C
On Sun, 14 Dec 2025 at 21:17, Dilip Kumar wrote: > > On Sun, Dec 14, 2025 at 3:51 PM Dilip Kumar wrote: > > > > On Fri, Dec 12, 2025 at 3:04 PM Amit Kapila wrote: > > > > > > On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > > > > > > > I was considering the interdependence between the sub

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread Amit Kapila
On Mon, Dec 15, 2025 at 5:11 PM Dilip Kumar wrote: > > On Mon, Dec 15, 2025 at 2:55 PM Dilip Kumar wrote: > > > > > 3) > > > postgres=# alter subscription sub1 set (conflict_log_table=NULL); > > > ALTER SUBSCRIPTION > > > postgres=# alter subscription sub2 set (conflict_log_table=create); > > > A

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

2025-12-15 Thread Zhijie Hou (Fujitsu)
On Tuesday, December 16, 2025 7:28 AM Euler Taveira wrote: > > On Mon, Dec 15, 2025, at 3:57 AM, Amit Kapila wrote: > > > > I think the unlogged table is afterwards silently ignored during > > replication. > > > > There is also the FOR ALL TABLES case. The manual says > > Marks the publicatio

Re: Implement waiting for wal lsn replay: reloaded

2025-12-15 Thread Xuneng Zhou
Hi, On Tue, Dec 2, 2025 at 6:10 PM Xuneng Zhou wrote: > > Hi, > > On Tue, Dec 2, 2025 at 11:08 AM Xuneng Zhou wrote: > > > > Hi, > > > > On Mon, Dec 1, 2025 at 12:33 PM Xuneng Zhou wrote: > > > > > > Hi hackers, > > > > > > On Tue, Nov 25, 2025 at 7:51 PM Xuneng Zhou wrote: > > > > > > > > Hi!

RE: [BUG] [PATCH] Allow physical replication slots to recover from archive after invalidation

2025-12-15 Thread Zhijie Hou (Fujitsu)
On Tuesday, December 16, 2025 2:54 AM Joao Foltran wrote: > Hi hackers, > > I'd like to report a regression in PostgreSQL 18 regarding physical > replication > slot invalidation and propose a fix. > > It's my first time sending any type of contribution, so please let me know if > I > made anyt

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-15 Thread Mihail Nikalayeu
Hello! On Mon, Dec 15, 2025 at 12:31 PM Álvaro Herrera wrote: > I've commented them out from the meson/makefile for now. Thanks! First version of TAP-based test in attachment. I think we should not hurry with push - let's make sure it really stable now. Best regards, Mikhail. From a26caa0ea6a1

Re: create table like including storage parameter

2025-12-15 Thread jian he
On Tue, Dec 16, 2025 at 1:52 AM Euler Taveira wrote: > > I started reviewing this patch. Why don't you reuse untransformRelOptions()? > Even if this function is used by various extensions [1][2], that's not an > excuse to duplicate code. yech, duplicate code is not good. I encountered the same is

Re: [PATCH] Add pg_lfind8_nonzero()

2025-12-15 Thread cca5507
Hi, Thank you for your reply! > Is code like this ever actually relevant for performance? In cases where the > compiler can't also optimize the code? Unless it is a legitimate bottleneck, > adding more complicated code to optimize the case doesn't make sense. I just think the patch isn't that co

Re: doc: create table improvements

2025-12-15 Thread Chao Li
> On Oct 23, 2025, at 12:43, Laurenz Albe wrote: > > On Mon, 2025-10-20 at 07:41 -0400, David G. Johnston wrote: >> I question whether “parameter” is even the correct class to assign here >> and so would rather avoid the issue by not assigning a class. > > Right. I have removed the vestiges

Re: Improve logical replication usability when tables lack primary keys

2025-12-15 Thread Euler Taveira
On Sun, Dec 14, 2025, at 10:57 PM, Chao Li wrote: > I’ve thought this over and discussed it with our field teams. It looks > to us that introducing a new GUC like default_replica_identity does not > really address our pain point. > > Our core requirement is to allow tables without a primary key t

Re: doc: create table improvements

2025-12-15 Thread David G. Johnston
On Wed, Oct 22, 2025 at 9:43 PM Laurenz Albe wrote: > Patch attached; if it is fine with you, I'll mark it "ready for committer". > > Thank you. It works for me. I've moved the CF entry to the current CF and marked it ready for committer. David J.

Re: Remaining dependency on setlocale()

2025-12-15 Thread Chao Li
> On Dec 16, 2025, at 03:34, Jeff Davis wrote: > > On Sat, 2025-12-13 at 17:48 +0800, Chao Li wrote: >> 1 - 0001 >> ``` >> + int match_mblen pg_attribute_unused(); >> ``` >> >> Why this variable is marked unused? It’s actually used. > > Fixed and committed. > > I originally marked it unused

Re: Document NULL

2025-12-15 Thread David G. Johnston
On Mon, Dec 15, 2025 at 3:12 PM David G. Johnston < [email protected]> wrote: > I added pset display_true to the preamble since that feature has since > been added. > I failed to notice the comment in the preceding paragraph about t/f being manually added. It can be removed. The fo

Re: Proposal: Conflict log history table for Logical Replication

2025-12-15 Thread Peter Smith
Some review comments for v12-0001. == General 1. There is no documentation. Even if it seems a bit premature IMO writing/reviewing the documention could help identify unanticipated usability issues. == src/backend/commands/subscriptioncmds.c 2. + + /* Setting conflict_log_table = NONE i

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Bryan Green writes: > I should have asked you which version of libintl is being used. I went > ahead and jumped to 0.26 and they now gate like this: > /* If the current locale value is "C" or "C." or "POSIX", >we don't load a domain. Return the MSGID. */ > if ((single_local

Re: oid2name : add objects file path

2025-12-15 Thread Euler Taveira
On Mon, Dec 15, 2025, at 11:30 AM, David Bidoc wrote: > > Thank you for your feedback. > I attached the rebased and updated patch. > This patch was in the previous CF, I'm wondering that's why the "Emails" are not reflecting the latest patches and the CF bot was not trying it. I moved this patch t

Re: Small patch to improve safety of utf8_to_unicode().

2025-12-15 Thread Chao Li
> On Dec 16, 2025, at 04:23, Jeff Davis wrote: > > On Sun, 2025-12-14 at 07:22 +0800, Chao Li wrote: >> This patch adds a length check to utf8_to_unicode(), I think which is >> where “safety” comes from. Can you please add an a little bit more to >> the commit message instead of only saying “i

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Bryan Green writes: > On 12/15/2025 2:39 PM, Tom Lane wrote: >> Hmmm ... the first batch of BF reports show that on some Linux >> machines, it works to set lc_messages to 'C.UTF-8', but nonetheless >> no translation happens. Did you notice any other gating factors? > Yes - the LANGUAGE environme

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

2025-12-15 Thread Euler Taveira
On Mon, Dec 15, 2025, at 3:57 AM, Amit Kapila wrote: > > I think the unlogged table is afterwards silently ignored during > replication. > Is it an acceptable behavior? I'm not sure. Even if you are using an allowed object (partitioned table), the replication happens using a partition (that can or

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Bryan Green
On 12/15/2025 2:39 PM, Tom Lane wrote: > I wrote: >> Experimenting here, it looks like 'C.UTF-8' might be accepted >> everywhere. I even got it to pass on Solaris's not-GNU gettext, >> which I thought for sure would be the weak spot in the idea. >> I'll press forward with that. > > Hmmm ... the f

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Bryan Green
On 12/15/2025 2:39 PM, Tom Lane wrote: > I wrote: >> Experimenting here, it looks like 'C.UTF-8' might be accepted >> everywhere. I even got it to pass on Solaris's not-GNU gettext, >> which I thought for sure would be the weak spot in the idea. >> I'll press forward with that. > > Hmmm ... the f

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-15 Thread Andres Freund
On December 15, 2025 6:00:47 PM EST, Nathan Bossart wrote: >Done. LGTM -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Few untranslated error messages in OAuth

2025-12-15 Thread Jacob Champion
On Fri, Dec 12, 2025 at 2:09 AM Álvaro Herrera wrote: > No strong opinion on JSONAPI_USE_PQEXPBUFFER. As far as I can tell, we > pretty much force you to link libpq if you want to have a PQExpBuffer, > which tells me that a frontend jsonapi.c user would already be forced to > link libpq. Only th

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-15 Thread Nathan Bossart
On Mon, Dec 15, 2025 at 05:32:36PM -0500, Andres Freund wrote: > On 2025-12-15 15:38:49 -0600, Nathan Bossart wrote: >> - if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd >> without -march=armv8-a+crc', >> + if (host_cpu == 'aarch64' and cc.get_id() == 'msvc') or \ >> +

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-15 Thread Andres Freund
Hi, On 2025-12-15 15:38:49 -0600, Nathan Bossart wrote: > +++ b/meson.build > @@ -2523,7 +2523,8 @@ int main(void) > } > ''' > > - if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd > without -march=armv8-a+crc', > + if (host_cpu == 'aarch64' and cc.get_id() == 'msvc')

Re: Changing the state of data checksums in a running cluster

2025-12-15 Thread Andres Freund
Hi, One high level issue first: I don't think the way this uses checkpoints and restartpoints is likely to work out. Synchronously having to wait for restartpoints during recovery seems generally operationally a huge issue, but actually could also easily lead to undetected deadlocks, particularl

Re: Document NULL

2025-12-15 Thread David G. Johnston
On Thu, Nov 13, 2025 at 11:52 PM Chao Li wrote: > > > > On Nov 11, 2025, at 23:34, Álvaro Herrera wrote: > > > > On 2025-Jun-18, David G. Johnston wrote: > > > >> Version 8. > >> > >> Marking this Ready to Commit in CF 2025-09 (CF PG19-1) > > > > I have rebased this; here's v9. I haven't review

Re: Some optimizations for COALESCE expressions during constant folding

2025-12-15 Thread Matheus Alcantara
On Thu Dec 11, 2025 at 11:17 PM -03, Richard Guo wrote: > On Thu, Dec 11, 2025 at 11:54 PM Matheus Alcantara > wrote: >> I think that this patch needs a rebase due to the changes on >> predicate.sql introduced by c925ad30b04. > > Right. Here it is. > Thanks for the new version. The patches seems

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Wolfgang Walther
Tom Lane: Thomas Munro writes: On Tue, Dec 16, 2025 at 8:29 AM Peter Eisentraut wrote: I think that means that that gettext implementation is not currently supportable. So either we revert our PRI* use except those two (unlikely), or those buildfarm members should disable NLS. Yeah. My g

Re: Checkpointer write combining

2025-12-15 Thread Melanie Plageman
On Mon, Dec 8, 2025 at 2:14 AM Soumya S Murali wrote: > > Here I made some changes in the logic of the function that only returns a > real LSN when the buffer actually needs a WAL flush. If the buffer is not > permanent or doesn’t need WAL, it returns false and set the LSN to > InvalidXLogRecPt

Re: Periodic authorization expiration checks using GoAway message

2025-12-15 Thread Jelte Fennema-Nio
On Mon, 15 Dec 2025 at 18:31, Jacob Champion wrote: > But it seems iffy to change authentication metadata associated with > the connection halfway through a transaction, no? Am I missing > something that makes that architecturally safe? It felt a bit iffy to me too initially, but then I started l

Re: Checkpointer write combining

2025-12-15 Thread Melanie Plageman
On Mon, Dec 15, 2025 at 4:36 AM Soumya S Murali wrote: > > With reference to the last patches (v11) I received [1] and while reviewing > Melanie’s latest feedback, I understood that PageSetBatchChecksumInplace() is > currently WIP and depends on upcoming changes to hint-bit locking. It will be

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-15 Thread Nathan Bossart
On Mon, Dec 15, 2025 at 12:27:25PM -0500, Greg Burd wrote: > Got it, fixed in v9. I tried to rearrange the s_lock.h changes to make it more obvious what is specific to AArch64. WDYT? -- nathan >From b304e07bfcafbb03166a583e40de550af24683f1 Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Sun,

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

2025-12-15 Thread Melanie Plageman
On Sat, Dec 13, 2025 at 8:59 AM Peter Eisentraut wrote: > > On 20.11.25 18:19, Melanie Plageman wrote: > > + prstate->deadoffsets = (OffsetNumber *) presult->deadoffsets; > > In your patch > v22-0001-Split-heap_page_prune_and_freeze-into-helpers.patch, the > assignment above casts away the con

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-15 Thread Nazir Bilal Yavuz
Hi, On Mon, 15 Dec 2025 at 22:26, Peter Eisentraut wrote: > > On 12.12.25 10:18, Nazir Bilal Yavuz wrote: > FWIW, Bilal and I had, IIRC, explicitly not enabled on windows CI > because it > made the build process even slower. But perhaps we should re-measure the > difference a

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
I wrote: > Experimenting here, it looks like 'C.UTF-8' might be accepted > everywhere. I even got it to pass on Solaris's not-GNU gettext, > which I thought for sure would be the weak spot in the idea. > I'll press forward with that. Hmmm ... the first batch of BF reports show that on some Linux

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-15 Thread Nathan Bossart
Committed. -- nathan

Re: Small patch to improve safety of utf8_to_unicode().

2025-12-15 Thread Jeff Davis
On Sun, 2025-12-14 at 07:22 +0800, Chao Li wrote: > This patch adds a length check to utf8_to_unicode(), I think which is > where “safety” comes from. Can you please add an a little bit more to > the commit message instead of only saying “improve safety”. Right: it does not read past pg_mblen(), n

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Thomas Munro writes: > On Tue, Dec 16, 2025 at 8:29 AM Peter Eisentraut wrote: >> I think that means that that gettext implementation is not currently >> supportable. So either we revert our PRI* use except those two >> (unlikely), or those buildfarm members should disable NLS. > Yeah. My goal

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

2025-12-15 Thread Robert Haas
On Mon, Dec 15, 2025 at 1:46 PM Oleg Tkachenko wrote: > Also, I’ve attached a patch based on your guidance. The changes are > effectively the same as your suggested approach, but I would be happy to be > listed as a contributor. You'll certain be listed as the reporter for this issue when a fix

Re: Visibility bug in tuple lock

2025-12-15 Thread Heikki Linnakangas
On 12/12/2025 15:19, Jasper Smit wrote: Thanks, for looking into this and for creating the patch. +1 for that approach. heap_lock_updated_tuple() actually does that check too, but not for the first tuple. I think this will for sure fix the problem, however we are still accessing completely un

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Thomas Munro
On Tue, Dec 16, 2025 at 8:29 AM Peter Eisentraut wrote: > On 15.12.25 08:01, Tom Lane wrote: > > So their gettext handles PRIu64 and PRIu32 and nothing else. > > > > What to do now? I could revert 8c498479d and followups, but > > I sure don't want to. A stopgap measure to make the farm look > >

Re: Remaining dependency on setlocale()

2025-12-15 Thread Jeff Davis
On Sat, 2025-12-13 at 17:48 +0800, Chao Li wrote: > 1 - 0001 > ``` > + int match_mblen pg_attribute_unused(); > ``` > > Why this variable is marked unused? It’s actually used. Fixed and committed. I originally marked it unused because I just had an: Assert(match[match

Re: Get rid of "Section.N.N.N" on DOCs

2025-12-15 Thread Peter Eisentraut
On 14.12.25 18:30, Marcos Pegoraro wrote: When reading documentation all the time we get something like See Section 27.4.5  and Section 27.4.2 www.postgresql.org/docs/18/progress-reporting.html#CLUSTER-PROGRES

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Peter Eisentraut
On 15.12.25 08:01, Tom Lane wrote: So their gettext handles PRIu64 and PRIu32 and nothing else. What to do now? I could revert 8c498479d and followups, but I sure don't want to. A stopgap measure to make the farm look green would be to add a variant expected-file that accepts this output, but

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-15 Thread Peter Eisentraut
On 12.12.25 10:18, Nazir Bilal Yavuz wrote: FWIW, Bilal and I had, IIRC, explicitly not enabled on windows CI because it made the build process even slower. But perhaps we should re-measure the difference and re-consider? Greetings, Andres Freund As long as you use Windows locale names once th

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Bryan Green writes: > On 12/15/2025 12:28 PM, Tom Lane wrote: >> ... It did work if I set lc_messages to 'C.utf8', which is a >> known name according to this box's "locale -a", but this doesn't give >> me a warm feeling about this approach being a lot more portable than >> what we have. Any ideas

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Bryan Green
On 12/15/2025 12:28 PM, Tom Lane wrote: > It'd be great to not need the assumption of es_ES being installed. > However, I tried making a POSIX.po file and setting lc_messages to > POSIX, and it didn't work. The msgfmt infrastructure seemed unfazed > and installed a .mo file under $sharedir/locale/

[BUG] [PATCH] Allow physical replication slots to recover from archive after invalidation

2025-12-15 Thread Joao Foltran
Hi hackers, I'd like to report a regression in PostgreSQL 18 regarding physical replication slot invalidation and propose a fix. It's my first time sending any type of contribution, so please let me know if I made anything incorrectly and I'll fix it ASAP. It's also my first time doing any type

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

2025-12-15 Thread Oleg Tkachenko
Hello Robert,Thank you for the explanation.At first, I also thought about clamping truncation_block_length to RELSEG_SIZE. But I hesitated because I thought the reconstructed relation file couldn’t be larger than relative_limit.After reading the reconstruction code and the comments on top of the di

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-15 Thread Noah Misch
On Mon, Dec 15, 2025 at 11:35:35PM +0530, vignesh C wrote: > While verifying upgrade of subscriber instance, I noticed pg_dump > crash caused by incomplete sorting logic for DO_SUBSCRIPTION_REL > objects in DOTypeNameCompare(). When multiple subscription–relation > entries belong to the same subscr

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Bryan Green writes: > On 12/15/2025 11:05 AM, Tom Lane wrote: >> ... That's >> colored by seeing that less than half of the buildfarm is finding any >> variant of es_ES to test in. That's not great, but I'm not seeing >> anything to be done about it. The only locale names we can be sure >> will

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-15 Thread Thomas Munro
On Wed, Dec 10, 2025 at 1:45 PM Bryan Green wrote: > 1. Locale format mismatch >gettext 0.20.1+ introduced a get_lcid() function that expects Windows > locale format ("English_United States.1252") rather than POSIX format > ("en_US"). This function enumerates all Windows locales (~259) until a

pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-15 Thread vignesh C
Hi, While verifying upgrade of subscriber instance, I noticed pg_dump crash caused by incomplete sorting logic for DO_SUBSCRIPTION_REL objects in DOTypeNameCompare(). When multiple subscription–relation entries belong to the same subscription, the comparison does not establish a complete ordering.

Re: create table like including storage parameter

2025-12-15 Thread Euler Taveira
On Mon, Dec 15, 2025, at 5:48 AM, jian he wrote: > rebased, with minor comment polishing. > I started reviewing this patch. Why don't you reuse untransformRelOptions()? Even if this function is used by various extensions [1][2], that's not an excuse to duplicate code. I adjusted the code in the fi

Re: relfilenode statistics

2025-12-15 Thread Andres Freund
Hi, On 2025-12-15 16:29:18 +, Bertrand Drouvot wrote: > From 7908ba56cb8b6255b869af6be13077aa0315d5f1 Mon Sep 17 00:00:00 2001 > From: Bertrand Drouvot > Date: Wed, 1 Oct 2025 09:45:26 + > Subject: [PATCH v8 1/2] Key PGSTAT_KIND_RELATION by relfile locator > > This patch changes the key

Re: Periodic authorization expiration checks using GoAway message

2025-12-15 Thread Jacob Champion
On Mon, Dec 15, 2025 at 9:28 AM Jelte Fennema-Nio wrote: > To clarify: I meant the timeout as a backstop in this flow. Once the > client receives a 'R' message it should be re-authenticating ASAP. But > if it still had some messages in flight, the server can still choose > to process them during a

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-15 Thread Greg Burd
On Fri, Dec 12, 2025, at 2:32 PM, Andres Freund wrote: > Hi, > > On 2025-12-12 14:21:47 -0500, Greg Burd wrote: >> >> On Fri, Dec 12, 2025, at 11:03 AM, Nathan Bossart wrote: >> > +/* >> > + * _InterlockedExchange() generates a full memory barrier (or release >> > + * semantics that ensures all p

Re: Periodic authorization expiration checks using GoAway message

2025-12-15 Thread Jacob Champion
On Fri, Dec 12, 2025 at 3:49 AM Zsolt Parragi wrote: > Would client side revalidation allow re-authentication while a > long-running query is in progress? I think this is related to the async concern and the "what is a client allowed to do before reauthentication" question. > > Online checks (to

Re: Periodic authorization expiration checks using GoAway message

2025-12-15 Thread Jelte Fennema-Nio
On Mon, 15 Dec 2025 at 18:17, Jacob Champion wrote: > Part of the appeal to me is the ability for the client to decide to > transparently reconnect if possible, rather than surfacing an error to > the user. But if there's no other metadata to be used by the client > during that, then I suppose we

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Bryan Green
On 12/15/2025 11:05 AM, Tom Lane wrote: > Thomas Munro writes: >> On Mon, Dec 15, 2025 at 8:01 PM Tom Lane wrote: >>> What to do now? I could revert 8c498479d and followups, but >>> I sure don't want to. A stopgap measure to make the farm look >>> green would be to add a variant expected-file t

Re: Periodic authorization expiration checks using GoAway message

2025-12-15 Thread Jacob Champion
On Thu, Dec 11, 2025 at 4:36 PM Jelte Fennema-Nio wrote: > > "you didn't reauthenticate in time, so now you > > _have_ to reconnect, bye" > > I might be missing something but I feel like we currently do this in > various other places using: > FATAL: > Part of the appeal to me is the ability for

Re: Qual push down to table AM

2025-12-15 Thread Andres Freund
Hi, On 2025-12-10 10:41:19 -0500, Robert Haas wrote: > On Tue, Dec 9, 2025 at 6:08 PM Andres Freund wrote: > > I don't really see this being viable without first tackling two nontrivial > > projects: > > > > 1) Make slot deforming for expressions & projections selective, i.e. don't > >deform

Re: PRI?64 vs Visual Studio (2022)

2025-12-15 Thread Tom Lane
Thomas Munro writes: > On Mon, Dec 15, 2025 at 8:01 PM Tom Lane wrote: >> What to do now? I could revert 8c498479d and followups, but >> I sure don't want to. A stopgap measure to make the farm look >> green would be to add a variant expected-file that accepts >> this output, but yech. Thought

Re: Qual push down to table AM

2025-12-15 Thread Andres Freund
Hi, On 2025-12-15 21:56:12 +0900, Amit Langote wrote: > On Thu, Dec 11, 2025 at 12:41 AM Robert Haas wrote: > > On Tue, Dec 9, 2025 at 6:08 PM Andres Freund wrote: > > > On 2025-12-09 16:40:17 -0500, Robert Haas wrote: > > > > On Fri, Aug 29, 2025 at 4:38 AM Julien Tachoires > > > > wrote: > >

Re: Adding locks statistics

2025-12-15 Thread Bertrand Drouvot
Hi, On Wed, Aug 13, 2025 at 03:55:41AM +, Bertrand Drouvot wrote: > Fully agree, getting input from others definitely helps validate the approach > and see if the current design needs some changes. PFA a mandatory rebase. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open S

Re: pg_plan_advice

2025-12-15 Thread Jacob Champion
On Fri, Dec 12, 2025 at 10:09 AM Jacob Champion wrote: > Next bit of fuzzer feedback: And another bit, but this time I was able to minimize into a regression case, attached. This comment in pgpa_identifier_matches_target() seems to be incorrect: > /* > * The identifier must specify a s

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

2025-12-15 Thread Robert Haas
[ sorry for not noticing this thread sooner; thanks to Andres for pointing me to it ] On Mon, Dec 15, 2025 at 9:01 AM Amul Sul wrote: > Thanks for the reproducer; I can see the reported issue, but I am not > quite sure the proposed fix is correct and might break other cases (I > haven't tried con

Re: relfilenode statistics

2025-12-15 Thread Bertrand Drouvot
Hi, On Wed, Nov 12, 2025 at 05:03:55PM +, Bertrand Drouvot wrote: > In favor of not copying, I would say make the code simpler. > > I'm in favor of copying but open to different point of views. PFA a mandatory rebase. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Sour

Re: POC: make mxidoff 64 bits

2025-12-15 Thread Heikki Linnakangas
On 15/12/2025 16:31, Heikki Linnakangas wrote: On my laptop with jit_above_cost=0 and jit_optimize_above_cost=1000, like on those buildfarm animals, the multixid generation workload runs in under 10 s. I suppose it could be 20x slower on a slow, busy system. So the straightforward fix is to bum

Re: Add WALRCV_CONNECTING state to walreceiver

2025-12-15 Thread Xuneng Zhou
Hi Rahila, Thanks for looking into this. On Mon, Dec 15, 2025 at 9:48 PM Rahila Syed wrote: > > > Hi, > > On Mon, Dec 15, 2025 at 9:44 AM Noah Misch wrote: >> >> On Sun, Dec 14, 2025 at 06:17:34PM +0800, Xuneng Zhou wrote: >> > On Sun, Dec 14, 2025 at 4:55 PM Xuneng Zhou wrote: >> > > On Sun,

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

2025-12-15 Thread Robert Haas
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_STABLE (cad40cec24f), REL_18_STABLE (5278222853c) and > master (d0d

Enable partitionwise join for partition keys wrapped by RelabelType

2025-12-15 Thread Matheus Alcantara
Hi, The function exprs_known_equal() is used by the planner to determine if two expressions are semantically equivalent, often by checking if they belong to the same Equivalence Class (EC). When a partitioned table uses a varchar(N) type as a partition key, the partition key expression stored in

  1   2   >