Re: alter check constraint enforceability

2025-12-11 Thread jian he
On Mon, Dec 8, 2025 at 5:58 PM Amul Sul wrote: > > > The v4 patch is quite good. Here are a few comments/suggestions for > the cosmetic fixes: > > + created. Currently FOREIGN KEY and > + CHECK constraints may be altered in this > fashion, but see below. > > Although documents may not st

Re: [oauth] Stabilize the libpq-oauth ABI (and allow alternative implementations?)

2025-12-11 Thread Chao Li
> On Dec 10, 2025, at 05:00, Jacob Champion > wrote: > > Hi everybody, > > We introduced the libpq-oauth module late in the cycle for PG18, and > to put it mildly, its interface isn't great. The original > implementation depended on libpq internals, and we had to make sure > that we didn't s

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Zsolt Parragi
> GetNamedDSA and GetNamedDSHash do not have a need for a callback, > because there isn't custom initialization logic that can be applied there. The use case for GetNamedDSHash is: 1. I want to create a dshash 2. I want to make sure that I can preload some initial data into it before any backend

Re: [Patch] Improve the test src/test/postmaster/t/003_start_stop.pl

2025-12-11 Thread Potapov Alexander
On Wednesday, December 10, 2025 16:28 MSK, Heikki Linnakangas wrote: > This seems a little pointless because the test explicitly sets > max_connectins and max_wal_senders. It's true that it currently uses > more iterations than strictly necessary, but does it matter? Sure, currently the test w

Re: ON CONFLICT DO SELECT (take 3)

2025-12-11 Thread jian he
On Sat, Nov 29, 2025 at 6:02 AM Viktor Holmberg wrote: > > Attaching v18 with the above changes. Thanks your continued reviews Jian! > hi. I had some minor comments with doc, comments. + expressions or condition. If using a + WHERE with ON CONFLICT DO UPDATE / SELECT , + you must have SELE

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-11 Thread Chao Li
> On Dec 12, 2025, at 05:59, Corey Huinker wrote: > > On Thu, Nov 27, 2025 at 7:48 AM Etsuro Fujita wrote: > On Sun, Nov 23, 2025 at 4:28 PM Corey Huinker wrote: > > I've reorganized some things a bit, mostly to make resource cleanup simpler. > > Thanks for updating the patch! I will look

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 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: Add WALRCV_CONNECTING state to walreceiver

2025-12-11 Thread Noah Misch
On Fri, Dec 12, 2025 at 12:51:00PM +0800, Xuneng Zhou wrote: > Bug #19093 [1] reported that pg_stat_wal_receiver.status = 'streaming' > does not accurately reflect streaming health. In that discussion, > Noah noted that even before the reported regression, status = > 'streaming' was unreliable bec

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread Dilip Kumar
On Fri, Dec 12, 2025 at 10:02 AM shveta malik wrote: > > On Fri, Dec 12, 2025 at 9:42 AM Dilip Kumar wrote: > > > > On Fri, Dec 12, 2025 at 9:19 AM shveta malik wrote: > > > > > > On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > > > > > > > We do not need to make the CLT dependent on the

Add WALRCV_CONNECTING state to walreceiver

2025-12-11 Thread Xuneng Zhou
Hi Hackers, Bug #19093 [1] reported that pg_stat_wal_receiver.status = 'streaming' does not accurately reflect streaming health. In that discussion, Noah noted that even before the reported regression, status = 'streaming' was unreliable because walreceiver sets it during early startup, before at

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread shveta malik
On Fri, Dec 12, 2025 at 9:42 AM Dilip Kumar wrote: > > On Fri, Dec 12, 2025 at 9:19 AM shveta malik wrote: > > > > On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > > > > > We do not need to make the CLT dependent on the subscription because > > > the table can be dropped when the subscript

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread Dilip Kumar
On Fri, Dec 12, 2025 at 9:19 AM shveta malik wrote: > > On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > > > We do not need to make the CLT dependent on the subscription because > > the table can be dropped when the subscription is dropped anyway and > > we are already doing it as part of d

Re: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-11 Thread Chao Li
> On Dec 11, 2025, at 20:43, Amit Kapila wrote: > > On Thu, Dec 11, 2025 at 2:46 PM Chao Li wrote: >> >> Hi, >> While working with logical replication and partitioned tables, I noticed an >> inconsistency between how publications treat partitions and how "ALTER TABLE >> ... REPLICA IDENTIT

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread shveta malik
On Thu, Dec 11, 2025 at 7:49 PM 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 su

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

2025-12-11 Thread shveta malik
On Fri, Dec 12, 2025 at 5:35 AM Ajin Cherian wrote: > > On Thu, Dec 11, 2025 at 11:23 PM Amit Kapila wrote: > > > > On Thu, Dec 11, 2025 at 10:45 AM Ajin Cherian wrote: > > > > > > As patch 0001 has been pushed. I've rebased and created a new version > > > v36 with the remaining patch. > > > > >

Re: tablecmds: Open pg_class only when an update is required

2025-12-11 Thread Chao Li
> On Dec 11, 2025, at 21:17, Ashutosh Bapat > wrote: > > On Thu, Dec 11, 2025 at 12:45 PM Chao Li wrote: >> >> Hi Hackers, >> >> I just noticed that relation_mark_replica_identity() unconditionally opened >> pg_class with RowExclusiveLock even in cases where relreplident has no >> change

Re: enhance wraparound warnings

2025-12-11 Thread Chao Li
Hi Nathan, I just reviewed the patch. My comments are mainly in 0001, and a few nits on 0003. For 0002, the code change is quite straightforward, I am not sure the value bumping to has been discussed. > On Dec 12, 2025, at 04:28, Nathan Bossart wrote: > > rebased > > -- > nathan > 1 - 000

Re: [Proposal] Adding callback support for custom statistics kinds

2025-12-11 Thread Michael Paquier
On Wed, Dec 10, 2025 at 12:36:36PM -0600, Sami Imseih wrote: > .. and after giving this more thought, I actually don't think we should > do any validation for any of the callbacks. If an extension is writing > to any file ( core or custom ), naturally they will want to read it back. > Now I am not

Re: Some optimizations for COALESCE expressions during constant folding

2025-12-11 Thread Richard Guo
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. - Richard v5-0001-Simplify-COALESCE-expressions-using-non-nullable-.patch Description: Binary data v5-0002-O

Re: [Proposal] Adding Log File Capability to pg_createsubscriber

2025-12-11 Thread Gyan Sreejith
Thanks for the feedback, Peter. I am currently working on the SGML docs update, and will promptly get back with an update. For your second point, currently, all output goes directly to the console. I thought it made more sense to break it up into multiple files depending on what was being invoked

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

2025-12-11 Thread Chao Li
> On Dec 12, 2025, at 07:12, Jacob Champion > wrote: > > On Thu, Dec 11, 2025 at 12:22 PM Peter Smith wrote: >>> Why not just say clearly what the default value is? >>> >>> PSA: a patch to do that. > > LGTM. (In fact I've read that paragraph three times and still cannot > get it to stick i

Re: pg_plan_advice

2025-12-11 Thread Jacob Champion
On Tue, Dec 9, 2025 at 11:46 AM Robert Haas wrote: > By the way, if your fuzzer can also > produces some things to add contrib/pg_plan_advice/sql for cases like > this, that would be quite helpful. Ideally I would have caught this > with a manually-written test case, but obviously that didn't happ

Re: greenfly lwlock corruption in REL_14_STABLE and REL_15_STABLE

2025-12-11 Thread Thomas Munro
On Fri, Dec 12, 2025 at 6:27 AM Greg Burd wrote: > On Wed, Dec 10, 2025, at 12:10 AM, Thomas Munro wrote: > > Beginning a week ago, greenfly (RISC-V, Clang 20.1) has failed like > > this in 5 of 8 runs of the pgbench tests on the two oldest branches: > > Hey Thomas, raising this. I should more cl

Re: Periodic authorization expiration checks using GoAway message

2025-12-11 Thread Jelte Fennema-Nio
On Fri, 12 Dec 2025 at 01:10, Jacob Champion wrote: > > https://postgr.es/m/CAGB%2BVh5SQQorNDEKP%2B0G%3DsmxHRhbhs%2BVkmQWD5Vh98fmn8X4dg%40mail.gmail.com Thanks, I hadn't seen that one before. > "you didn't reauthenticate in time, so now you > _have_ to reconnect, bye" I might be missing so

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Sami Imseih
> +const char* forwardedData = "ForwardedData"; > + > static void > -init_tranche(void *ptr) > +init_tranche(void *ptr, const char *name, void *arg) > { > int*tranche_id = (int *) ptr; > > - *tranche_id = LWLockNewTrancheId("test_dsa"); > + if (arg != forwarded

Re: Inval reliability, especially for inplace updates

2025-12-11 Thread Noah Misch
On Thu, Dec 04, 2025 at 04:19:02PM -0800, Noah Misch wrote: > Thanks for the review. > The attached version doesn't need a comprehensive re-review, but I'd > particularly value hearing about any places where you find it's reducing > comprehensibility rather than enhancing. I'd like to get this in

Re: Periodic authorization expiration checks using GoAway message

2025-12-11 Thread Jacob Champion
On Thu, Dec 11, 2025 at 2:52 AM Ajit Awekar wrote: > I agree that the seamless re-authentication model (re-authentication over the > active connection) is suited only for external centralized authentication > methods like OAuth2 and LDAP. Well, see my response to Jelte above. But I think it's c

Re: backpatch tests: Rename conflicting role names to 14/15

2025-12-11 Thread Michael Paquier
On Wed, Dec 10, 2025 at 06:57:56PM -0600, Sami Imseih wrote: > "make-installcheck --jobs 8" has reproduced the conflict almost > consistently between adminpack and plperl tests. > > cherry-pick to 15 had no conflicts. 14 does not have the > plperl_setup_scratch schema, so I had to fix that. > > S

Re: Periodic authorization expiration checks using GoAway message

2025-12-11 Thread Jacob Champion
On Wed, Dec 10, 2025 at 1:21 PM Jelte Fennema-Nio wrote: > I think password rollover without downtime requires more thought than > discussed in this thread so far. Sure. See also https://postgr.es/m/CAGB%2BVh5SQQorNDEKP%2B0G%3DsmxHRhbhs%2BVkmQWD5Vh98fmn8X4dg%40mail.gmail.com > Reading betw

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-11 Thread Mihail Nikalayeu
Hello, Álvaro! On Thu, Dec 11, 2025 at 10:36 PM Álvaro Herrera wrote: > I just saw a failure in CI for an unrelated patch I'll try to dive deeper tomorrow to find a fix, but it feels like we are doing something wrong here. The tests were good to prove the issue and demonstrate it was fixed afte

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

2025-12-11 Thread Ajin Cherian
On Thu, Dec 11, 2025 at 11:23 PM Amit Kapila wrote: > > On Thu, Dec 11, 2025 at 10:45 AM Ajin Cherian wrote: > > > > As patch 0001 has been pushed. I've rebased and created a new version > > v36 with the remaining patch. > > > > I have made a number of changes in code comments and docs. Kindly >

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Sami Imseih
> On a slightly related topic, I mentioned earlier that I found 3 > extensions using GetNamedDSMSegment. One of them, > pg_track_optimizer[1] could use the new GetNamedDSHash function, > except that it doesn't provide a callback similar to what we have in > c, and it relies on initializing the hash

Re: Proposal to allow setting cursor options on Portals

2025-12-11 Thread Jelte Fennema-Nio
Let me start with this: I agree with you that both HOLD and GoAway would work well as protocol extensions. And if that's what is needed to get stuff to continue moving in the protocol space, then fine that's what I'll do... But I have some reasons to prefer a protocol version bump at least for GoAw

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Sami Imseih
> > I went back-forth on if it makes sense to provide the name as an > > extra argument and decided it provides more flexibility. For example > > I can use the same init callback and arguments for different segments. > > If the initialization callback function needed the name, it could be > provide

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

2025-12-11 Thread Jacob Champion
On Thu, Dec 11, 2025 at 12:22 PM Peter Smith wrote: > > Why not just say clearly what the default value is? > > > > PSA: a patch to do that. LGTM. (In fact I've read that paragraph three times and still cannot get it to stick in my head, despite having done a fair amount of thinking about publish

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Zsolt Parragi
> As I did not hear back, I went ahead and prepared a patch with the above. If the question was for me sorry for not replying, I assumed it was meant for Nathan. Personally I'm not sure if we need this as even requiring a name isn't a common use case, but I'm also fine with this version. The onl

Re: Few untranslated error messages in OAuth

2025-12-11 Thread Jacob Champion
On Thu, Nov 27, 2025 at 10:24 AM Álvaro Herrera wrote: > I gave these a quick look, and they look correct to me. I didn't test > the resulting libpq though. Thanks for the review! > Of those, as an example, > this one caught my attention for strange wording, > "internal error: field \"%s\" st

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

2025-12-11 Thread Chao Li
> On Dec 11, 2025, at 20:23, Amit Kapila wrote: > > On Thu, Dec 11, 2025 at 10:45 AM Ajin Cherian wrote: >> >> As patch 0001 has been pushed. I've rebased and created a new version >> v36 with the remaining patch. >> > > I have made a number of changes in code comments and docs. Kindly > r

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Nathan Bossart
Thanks for the new patch. On Thu, Dec 11, 2025 at 04:12:02PM -0600, Sami Imseih wrote: > I went back-forth on if it makes sense to provide the name as an > extra argument and decided it provides more flexibility. For example > I can use the same init callback and arguments for different segments.

Re: Fix uninitialized PruneFreezeResult in pruneheap and vacuumlazy

2025-12-11 Thread Chao Li
> On Dec 11, 2025, at 22:59, Melanie Plageman wrote: > > On Wed, Dec 10, 2025 at 11:02 PM Chao Li wrote: >> >> While reviewing Melanie's patch [1], I found this bug where presult is not >> initialized. Let me explain the logic. > > Thanks for looking closely at the code. > >> static int >

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-11 Thread Sami Imseih
> This works well for the first use-case identified. Instead of hard- > coding the tranche name in the callback, the name can be > retrieved as the segment name set in GetNamedDSMSegment. > > The caller could still pass this name via the extra callback args, but > it's better to separate things a b

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-11 Thread Corey Huinker
On Thu, Nov 27, 2025 at 7:48 AM Etsuro Fujita wrote: > On Sun, Nov 23, 2025 at 4:28 PM Corey Huinker > wrote: > > I've reorganized some things a bit, mostly to make resource cleanup > simpler. > > Thanks for updating the patch! I will look into it. > > Best regards, > Etsuro Fujita > Rebase, n

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-11 Thread Nathan Bossart
With the latest patch applied, I'm still seeing problems with and lines in aclcheck.c and analyze.c, as mentioned upthread [0]. I think we should also figure out what we want to do for things like this: ** -

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-11 Thread Nathan Bossart
On Tue, Oct 28, 2025 at 08:36:33AM +0800, Chao Li wrote: > On Oct 28, 2025, at 07:35, Michael Paquier wrote: >> On Mon, Oct 27, 2025 at 09:55:38AM -0500, Nathan Bossart wrote: >>> /* >>> * DISABLE_LEADER_PARTICIPATION disables the leader's participation in >>> * parallel index builds. This may

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-11 Thread Álvaro Herrera
Hi, I just saw a failure in CI for an unrelated patch, https://api.cirrus-ci.com/v1/artifact/task/4641105595072512/testrun/build/testrun/injection_points/isolation/regression.diffs diff -U3 /home/postgres/postgres/src/test/modules/injection_points/expected/reindex-concurrently-upsert.out /hom

Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...

2025-12-11 Thread surya poondla
Hi All, Thanks to Ian and Vasuki for working on tab-completion support for ALTER ROLE ... IN DATABASE. This is a really good improvement. Regarding Ian’s patch: 1. The patch applies cleanly and works as expected. 2. Tab-completion for IN DATABASE behaves consistently with existing ALTER ROLE form

Re: Adding REPACK [concurrently]

2025-12-11 Thread Mihail Nikalayeu
Hello, Antonin! On Tue, Dec 9, 2025 at 7:52 PM Antonin Houska wrote: > Worker makes more sense to me - the initial implementation is in 0005. Comments for 0005, so far: --- > export_initial_snapshot Hm, should we use ExportSnapshot instead? And ImportSnapshort to import it. --- > get_initial_

Re: enhance wraparound warnings

2025-12-11 Thread Nathan Bossart
rebased -- nathan >From 407a7e91f09b657f048f4af7cff52f1b2f6cc29b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 14 Nov 2025 09:59:15 -0600 Subject: [PATCH v2 1/3] Add percentage of transaction IDs that are available to wraparound warnings. --- doc/src/sgml/maintenance.sgml

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

2025-12-11 Thread Peter Smith
On Thu, Dec 11, 2025 at 6:51 PM Peter Smith wrote: > > Hi, > > When reading the docs for the publication parameter > 'publish_via_partition_root' [1], I felt there was too much mental > gymnastics required to understand the meaning of "the latter is the > default." > > Why not just say clearly wha

Re: POC: make mxidoff 64 bits

2025-12-11 Thread Alvaro Herrera
On 2025-Dec-11, Heikki Linnakangas wrote: > That's a great question and I've been wondering about it myself. It goes all > the way to the initial commit where multixacts were introduced, and I don't > see any particular reason for it even back then. Even in the very first > version of multixact.c,

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-11 Thread Álvaro Herrera
On 2025-Dec-09, Mihail Nikalayeu wrote: > Hello! > > After some investigation I ended up with a much simpler fix. > It is self-explanatory in code and a commit message. Yeah, that makes sense. It's what I was trying to say in https://postgr.es/m/[email protected] Pushed y

Re: Serverside SNI support in libpq

2025-12-11 Thread Jacob Champion
On Thu, Dec 11, 2025 at 9:52 AM Daniel Gustafsson wrote: > > The new v12 tests still don't pass for me (they all use "certificate > > verify failed", but the failure modes should be different). > > In which version of OpenSSL (or LibreSSL)? 1.1.1 through 3.6. The CI for this commitfest entry show

Re: Proposal to allow setting cursor options on Portals

2025-12-11 Thread Jacob Champion
[I considered splitting this off into a new thread, but I think Dave has to wait for it to be resolved before much can happen with the patch. Sorry Dave.] On Wed, Dec 10, 2025 at 3:01 PM Jelte Fennema-Nio wrote: > If we keep the features that are bundled with a protocol version bump > of the kind

Re: Fixing the btree_gist inet mess

2025-12-11 Thread Matthias van de Meent
On Fri, 1 Aug 2025 at 20:17, Tom Lane wrote: > > There are a couple of loose ends still to be dealt with. We need > to say something about this in btree-gist.sgml, but I've not > attempted to write that text yet. Also, I expect that > cross-version-upgrade testing will spit up on the inet/cidr i

Re: Serverside SNI support in libpq

2025-12-11 Thread Daniel Gustafsson
> On 11 Dec 2025, at 18:47, Jacob Champion > wrote: > The new v12 tests still don't pass for me (they all use "certificate > verify failed", but the failure modes should be different). In which version of OpenSSL (or LibreSSL)? -- Daniel Gustafsson

Re: Mark function arguments of type "T *" as "const T *" where possible

2025-12-11 Thread Jacob Champion
On Wed, Dec 10, 2025 at 11:22 PM Bertrand Drouvot wrote: > Also, with the patch in place that would mean "think twice before changing > from const to no const" and that could create doubts and waste of time for > future > patch authors. Yeah, exactly. > Let me try to focus on functions that rea

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

2025-12-11 Thread Andres Freund
Hi, On 2025-12-11 11:45:01 -0600, Bryan Green wrote: > On 12/11/2025 10:05 AM, Andres Freund wrote: > > On 2025-12-11 15:43:36 +0100, Peter Eisentraut wrote: > >> On 10.12.25 01:45, Bryan Green wrote: > >>> The attached patch takes a pragmatic approach: for gettext 0.20.1+, we > >>> avoid triggeri

Re: Serverside SNI support in libpq

2025-12-11 Thread Jacob Champion
Hi! On Mon, Nov 24, 2025 at 6:53 AM Daniel Gustafsson wrote: > The attached incorporates your tests, fixes them to make them pass. The > culprit seemed to be a combination of a bug in the code (the verify callback > need to be defined in the default context even if there is no CA for it to be >

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

2025-12-11 Thread Bryan Green
On 12/11/2025 10:05 AM, Andres Freund wrote: > Hi, > > On 2025-12-11 15:43:36 +0100, Peter Eisentraut wrote: >> On 10.12.25 01:45, Bryan Green wrote: >>> The attached patch takes a pragmatic approach: for gettext 0.20.1+, we >>> avoid triggering the bug by using Windows locale format instead of >>

Re: Add a greedy join search algorithm to handle large join problems

2025-12-11 Thread Pavel Stehule
čt 11. 12. 2025 v 18:07 odesílatel Tomas Vondra napsal: > On 12/11/25 07:12, Pavel Stehule wrote: > > > > > > čt 11. 12. 2025 v 3:53 odesílatel John Naylor > > napsal: > > > > On Wed, Dec 10, 2025 at 5:20 PM Tomas Vondra > > wrote:

Re: greenfly lwlock corruption in REL_14_STABLE and REL_15_STABLE

2025-12-11 Thread Greg Burd
On Wed, Dec 10, 2025, at 12:10 AM, Thomas Munro wrote: > Beginning a week ago, greenfly (RISC-V, Clang 20.1) has failed like > this in 5 of 8 runs of the pgbench tests on the two oldest branches: Hey Thomas, raising this. I should more closely monitor my farm animals. As greenfly is one of th

Re: Solaris versus our NLS files

2025-12-11 Thread Tom Lane
Peter Eisentraut writes: > On 10.12.25 17:14, Tom Lane wrote: >> Yeah, I've been wrestling with that question. The best idea >> I have at the moment is to look at "locale -a" output to see >> which country codes Solaris thinks there are for each language, >> and duplicate that. > I wonder how ot

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

2025-12-11 Thread Bryan Green
On 12/11/2025 8:43 AM, Peter Eisentraut wrote: > On 10.12.25 01:45, Bryan Green wrote: >> The attached patch takes a pragmatic approach: for gettext 0.20.1+, we >> avoid triggering the bug by using Windows locale format instead of >> calling IsoLocaleName(). This works because gettext 0.20.1+ inter

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

2025-12-11 Thread Greg Burd
Well, TIL something about Meson; you must escape multi-line statements with a backslash. Apologies for the oversight/noise. best. -greg v8-0001-Enable-the-Microsoft-Windows-ARM64-MSVC-platform.patch Description: Binary data

Re: Add a greedy join search algorithm to handle large join problems

2025-12-11 Thread Tomas Vondra
On 12/11/25 07:12, Pavel Stehule wrote: > > > čt 11. 12. 2025 v 3:53 odesílatel John Naylor > napsal: > > On Wed, Dec 10, 2025 at 5:20 PM Tomas Vondra > wrote: > > I did however notice an interesting thing - running EXPLAIN on

Re: Fix and improve allocation formulas

2025-12-11 Thread Álvaro Herrera
On 2025-Dec-11, Andres Freund wrote: > a) changing over everything at once is worth the backpatch hazard and review >pain The other issue with these giant patches is that they cause many largish patches waiting in the commitfest process to require rebases, which are sometimes not trivial to d

Re: Fix and improve allocation formulas

2025-12-11 Thread Tom Lane
Andres Freund writes: > I tend to agree that what you propose is the better style, but I seriously > doubt that > a) changing over everything at once is worth the backpatch hazard and review >pain > b) that to judge whether we should do this a 277kB patch is useful > c) that changing the exis

Re: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements

2025-12-11 Thread Sami Imseih
> >Can pg_stat_statements.stats_since help here? > > > >for example "where stats_since > last_poll_timestamp" ? > > Actually no, monitoring tools fetch snapshots to find the difference > between snapshots. > Data for every statement is changes after each execution. > > But stats_since is inserted o

Re: INOUT params with expanded objects

2025-12-11 Thread Jim Mlodgenski
On Wed, Dec 10, 2025 at 7:38 PM Tom Lane wrote: > > Jim Mlodgenski writes: > > I have an extension[1] that adds a collection data type using the expanded > > object API. Things perform well as it gets passed around inside a plpgsql > > function, but when passing it as an INOUT parameter, I'm hitt

Re: Visibility bug in tuple lock

2025-12-11 Thread Heikki Linnakangas
On 13/10/2025 10:48, Jasper Smit wrote: We found a bug in heap_lock_tuple(). It seems to be unsafe to follow the t_ctid pointer of updated tuples, in the presence of aborted tuples. Vacuum can mark aborted tuples LP_UNUSED, even if there are still visible tuples that have a t_ctid pointing to

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

2025-12-11 Thread Greg Burd
On Wed, Dec 10, 2025, at 4:31 PM, Thomas Munro wrote: > On Thu, Dec 11, 2025 at 5:32 AM Greg Burd wrote: >> Rebased with only minor changes to meson.build this patch is ready for >> review/commit as it is passing tests on my aarch64 Win11 MSVC system. Also >> note that this system I'm testing

Re: Non-text mode for pg_dumpall

2025-12-11 Thread Mahendra Singh Thalor
On Wed, 10 Dec 2025 at 19:08, tushar wrote: > > > > On Tue, Dec 9, 2025 at 12:18 AM Mahendra Singh Thalor > wrote: >> >> On Mon, 8 Dec 2025 at 22:39, tushar wrote: >> >> Here, I am attaching an updated patch for the review and testing. This >> can be applied on commit d0d0ba6cf66c4043501f6f7. >

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

2025-12-11 Thread Andres Freund
Hi, On 2025-12-11 15:43:36 +0100, Peter Eisentraut wrote: > On 10.12.25 01:45, Bryan Green wrote: > > The attached patch takes a pragmatic approach: for gettext 0.20.1+, we > > avoid triggering the bug by using Windows locale format instead of > > calling IsoLocaleName(). This works because gettex

Re: regex Quantifiers {m,n}, m can be negative, n greater than 255

2025-12-11 Thread Tom Lane
jian he writes: > select regexp_matches(E'abc', 'a{0,257}.'); > select regexp_matches(E'abc', 'a{-0,257}.'); > select regexp_matches(E'abc', 'a{-1,2}.'); > based on the manual description, the second and the third query should > error out? No. Read https://www.postgresql.org/docs/current/funct

Re: Fix and improve allocation formulas

2025-12-11 Thread Andres Freund
Hi, On 2025-12-11 13:27:56 +, Bertrand Drouvot wrote: > - 0002 is a very large patch. I think that it provides added value as > mentioned > above but I'm not sure it is worth the noise. Anyway it is done, so sharing > here to get your thoughts. I find the recent trend to sent auto-generated

Re: Consistently use palloc_object() and palloc_array()

2025-12-11 Thread Tom Lane
David Geier writes: > Do we know what code each build animal actually has enabled? Of course. The configuration is reported in the logs of every buildfarm run. For instance, in the most recent run at this moment, https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=caiman&dt=2025-12-11%2015

Re: Fix uninitialized PruneFreezeResult in pruneheap and vacuumlazy

2025-12-11 Thread Melanie Plageman
On Wed, Dec 10, 2025 at 11:02 PM Chao Li wrote: > > While reviewing Melanie's patch [1], I found this bug where presult is not > initialized. Let me explain the logic. Thanks for looking closely at the code. > static int > lazy_scan_prune(LVRelState *vacrel, > presult, &prstate); <== immediat

Re: Some optimizations for COALESCE expressions during constant folding

2025-12-11 Thread Matheus Alcantara
On Wed Dec 3, 2025 at 3:39 AM -03, Richard Guo wrote: > On Mon, Dec 1, 2025 at 5:11 PM Richard Guo wrote: >> Attached is the patch set rebased on current master. I have split the >> patch into two parts: 0001 teaches eval_const_expressions to simplify >> COALESCE arguments using NOT NULL constrai

Re: Solaris versus our NLS files

2025-12-11 Thread Peter Eisentraut
On 10.12.25 17:14, Tom Lane wrote: Peter Eisentraut writes: On 09.12.25 22:22, Tom Lane wrote: At least Solaris is kind enough to let you do that with symlinks [2], so that after cd $INSTALLATION/share/locale ln -s es es_ES.UTF-8 translation starts working for that particular v

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

2025-12-11 Thread Peter Eisentraut
On 10.12.25 01:45, Bryan Green wrote: The attached patch takes a pragmatic approach: for gettext 0.20.1+, we avoid triggering the bug by using Windows locale format instead of calling IsoLocaleName(). This works because gettext 0.20.1+ internally converts the Windows format back to POSIX for cata

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-12-11 Thread Euler Taveira
On Thu, Nov 20, 2025, at 6:18 AM, Akshay Joshi wrote: > > Implemented in the suggested solution. Attached is the v5 patch for review. > I reviewed your patch and have some suggestions for this patch. * You shouldn't include the property if the value is default. A long command adds nothing. Cla

Re: tablecmds: Open pg_class only when an update is required

2025-12-11 Thread Ashutosh Bapat
On Thu, Dec 11, 2025 at 12:45 PM Chao Li wrote: > > Hi Hackers, > > I just noticed that relation_mark_replica_identity() unconditionally opened > pg_class with RowExclusiveLock even in cases where relreplident has no > change, which incurred unnecessary relation opens, lock acquisition. > > I ju

regex Quantifiers {m,n}, m can be negative, n greater than 255

2025-12-11 Thread jian he
hi. "" The forms using {...} are known as bounds. The numbers m and n within a bound are unsigned decimal integers with permissible values from 0 to 255 inclusive. "" Table (Regular Expression Quantifiers) https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP sele

Re: POC: make mxidoff 64 bits

2025-12-11 Thread Maxim Orlov
On Thu, 11 Dec 2025 at 10:58, Heikki Linnakangas wrote: > > That's a great question and I've been wondering about it myself. It goes > all the way to the initial commit where multixacts were introduced, and > I don't see any particular reason for it even back then. Even in the > very first versio

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-11 Thread Tomas Vondra
On 12/11/25 13:29, Christoph Berg wrote: > Re: Tomas Vondra So I'm leaning to adjust pg_numa_init() to also check EPERM, per the attached patch. It still calls numa_available(), so that we don't silently miss future libnuma changes. Can you check this makes it work insid

Re: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-11 Thread Amit Kapila
On Thu, Dec 11, 2025 at 2:46 PM Chao Li wrote: > > Hi, > While working with logical replication and partitioned tables, I noticed an > inconsistency between how publications treat partitions and how "ALTER TABLE > ... REPLICA IDENTITY" behaves. > > When a publication is created on a partitioned

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-11 Thread Christoph Berg
Re: Tomas Vondra > >> So I'm leaning to adjust pg_numa_init() to also check EPERM, per the > >> attached patch. It still calls numa_available(), so that we don't > >> silently miss future libnuma changes. > >> > >> Can you check this makes it work inside the docker container? > > > > Yes your patc

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread Amit Kapila
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 subscription sub1 SET (conflict_log_table=clt2); > > > > the previous conflict log table is dropped. Is this behavior > > intentional and discussed/c

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

2025-12-11 Thread Amit Kapila
On Thu, Dec 11, 2025 at 10:45 AM Ajin Cherian wrote: > > As patch 0001 has been pushed. I've rebased and created a new version > v36 with the remaining patch. > I have made a number of changes in code comments and docs. Kindly review and if you are okay with these then include them in the next ve

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-12-11 Thread Matheus Alcantara
I've spent some more time on this patch cleaning up some things and trying to simplify some things. I've renamed "copy_for_batch_insert_threshold" to "batch_with_copy_threshold" and removed the boolean option "use_copy_for_batch_insert", so now to enable the COPY usage for batch inserts it only ne

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread Dilip Kumar
On Thu, Dec 11, 2025 at 5:04 PM shveta malik wrote: > > On Tue, Dec 9, 2025 at 8:41 PM Dilip Kumar wrote: > > > > > > > Here is the updated version of patch > > What has changed > > 1. Table is created using create_heap_with_catalog() instead of SPI as > > suggested by Sawada-San and Amit Kapila.

Re: Proposal: Conflict log history table for Logical Replication

2025-12-11 Thread shveta malik
On Tue, Dec 9, 2025 at 8:41 PM Dilip Kumar wrote: > > > > Here is the updated version of patch > What has changed > 1. Table is created using create_heap_with_catalog() instead of SPI as > suggested by Sawada-San and Amit Kapila. > 2. Validated the table schema after acquiring the lock before > pr

Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements

2025-12-11 Thread Pavlo Golub
Hi Hi, Thanks for raising this. I did not look at the patch, but I have some high level comments. I would like to propose adding a last_executed timestamptz column to pg_stat_statements. This column records when each tracked statement was most recently executed. I do think there is valu

Re: Periodic authorization expiration checks using GoAway message

2025-12-11 Thread Ajit Awekar
Thanks a lot Jacob and Jelte for your valuable insights. I agree that the seamless re-authentication model (re-authentication over the active connection) is suited only for external centralized authentication methods like OAuth2 and LDAP. I have below questions - Does the client need to paus

Re: Fix uninitialized PruneFreezeResult in pruneheap and vacuumlazy

2025-12-11 Thread Feilong Meng
Hi Chao Li,Hackers, > PruneFreezeResult presult; <== here presult is not initialized >   const PruneFreezeResult *presult, <== presult is a const pointer, so prune_freeze_setup won’t update its content >   PruneState *prstate) > { >     prstate->deadoffsets = (OffsetNumber *) presult->deadoff

Docs: Standardize "cannot" usage in SGML source

2025-12-11 Thread Chao Li
Hi Hacker, While reviewing a patch, I happened to notice the PG docs prefer “cannot” than “can not”. Under doc/src/sgml, if we count: ``` sgml % grep -r "cannot" . | wc -l 818 ``` “Cannot” has 818 occurrences, but “can not” has only 3: ``` sgml % grep -rE "can\s+not" . ./ecpg.sgml: some

Re: Report bytes and transactions actually sent downtream

2025-12-11 Thread Chao Li
Hi, Ashutosh, I just quickly went through the patch. Obviously I need more time to fully understand the patch, I will do a deep review today. In the meantime, I just caught a nit issue. > On Dec 11, 2025, at 12:59, Ashutosh Bapat > wrote: > > > Please review. > > [1] > https://www.postgre

Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-11 Thread Chao Li
Hi, While working with logical replication and partitioned tables, I noticed an inconsistency between how publications treat partitions and how "ALTER TABLE ... REPLICA IDENTITY" behaves. When a publication is created on a partitioned table, e.g.: ``` CREATE PUBLICATION pub FOR TABLE parent; ```

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

2025-12-11 Thread shveta malik
On Thu, Dec 11, 2025 at 10:45 AM Ajin Cherian wrote: > > On Wed, Dec 10, 2025 at 4:23 PM Yilin Zhang wrote: > > > > Hi, > > Few comments for v34. > > > > Thanks for your review! > > I've addressed your comments. > > As patch 0001 has been pushed. I've rebased and created a new version > v36 with

Re: Consistently use palloc_object() and palloc_array()

2025-12-11 Thread David Geier
On 11.12.2025 06:33, Michael Paquier wrote: > On Thu, Dec 11, 2025 at 08:01:49AM +0900, Michael Paquier wrote: >> I still need to get through the remaining dubious changes you have >> posted, including the llvm one that was wrong. It seems like some of >> these things warrant a backpatch. > > I h

  1   2   >