Re: Improve logical replication usability when tables lack primary keys

2025-12-17 Thread GRANT ZHOU
On Wed, Dec 17, 2025 at 12:50 PM Euler Taveira wrote: > The ship has sailed a long time ago (version 9.4 to be precise -- commit > 07cacba983ef). The row identifier property was defined as an SQL command > (ALTER > TABLE ... REPLICA IDENTITY) and *not* a publication property. IMO that's > the > c

Re: Support named (destination) portals in extended proto for psql meta commands.

2025-12-17 Thread Sami Imseih
> > \portal name [max_rows] > > > > -- prepare the statements > > select from mytab limit $1 \parse p1 > > > > -- bind/execute the statement, optionally to a portal > > \bind_named p1 10 \portal portalname \g > > \bind_named p1 50 \portal portalname \g > > > > -- bind/execute the statement, optiona

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

2025-12-17 Thread Zsolt Parragi
Hello > . While working on [1]. I added an enum-typed GUC I wanted to check the original issue, but the linked patch adds a boolean GUC (logical_replication_fallback_to_full_identity), I did not see enum mentioned anywhere in the diff, did you link the correct thread? > Ideally, such a check wou

Re: Fixing the btree_gist inet mess

2025-12-17 Thread Tom Lane
Matthias van de Meent writes: > On Fri, 1 Aug 2025 at 20:17, Tom Lane wrote: >> Thoughts? > This was long overdue from a project perspective, so thanks for picking this > up. > I think we should still adjust btree-gist--1.2.sql, if only because it > adds stronger protections against any future

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

2025-12-17 Thread David G. Johnston
On Wednesday, December 17, 2025, Jacob Champion < [email protected]> wrote: > On Wed, Dec 17, 2025 at 4:04 AM Amit Kapila > wrote: > > LGTM. As this is not any bug fix rather a text improvement, so it is > > good to fix this in HEAD only. > > Don't we typically backpatch documentati

Re: Improve logical replication usability when tables lack primary keys

2025-12-17 Thread Euler Taveira
On Wed, Dec 17, 2025, at 8:09 AM, Zhijie Hou (Fujitsu) wrote: > > And I also prefer using a publication option as it's always beneficial to > minimize unnecessary WAL generation whenever possible. > The ship has sailed a long time ago (version 9.4 to be precise -- commit 07cacba983ef). The row ide

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

2025-12-17 Thread Jacob Champion
On Wed, Dec 17, 2025 at 4:04 AM Amit Kapila wrote: > LGTM. As this is not any bug fix rather a text improvement, so it is > good to fix this in HEAD only. Don't we typically backpatch documentation improvements? Otherwise no one gets the better docs for a year. --Jacob

Re: Visibility bug in tuple lock

2025-12-17 Thread Heikki Linnakangas
On 17/12/2025 17:42, Heikki Linnakangas wrote: On 17/12/2025 16:51, Jasper Smit wrote: Thanks! That's not quite correct though. This is very subtle, but the 'tuple' argument to heap_lock_updated_tuple() points to the buffer holding the original tuple. So doing HeapTupleHeaderGetUpdateXid(tuple->

Re: index prefetching

2025-12-17 Thread Peter Geoghegan
On Wed, Dec 17, 2025 at 2:30 PM Andres Freund wrote: > Note that due to the tuple size and fillfactor in Konstantin's workload, there > will be one tuple per page... That should allow for some prefetching. I don't see how, unless he also set leaf fillfactor very low (though probably not even then

Re: index prefetching

2025-12-17 Thread Tomas Vondra
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 that the current heuristics t

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-17 Thread Noah Misch
On Wed, Dec 17, 2025 at 10:11:58AM +0530, vignesh C wrote: > The attached v3 version patch has the changes for the same. The "tag" variable needed a change to compensate for the subrinfo->dobj.name change. I plan to push the attached version. commit d15c9e5 (HEAD, zzy_test-commit-master) Author:

Re: pg_dump: Remove trivial usage of PQExpBuffer

2025-12-17 Thread Corey Huinker
> > > It also just seems like a pain for backpatching. If this were a huge > improvement or if the code in question was being newly added, it'd perhaps > be > a different story, but as is... Yeah, it's not a "wow" level cleanup. I'll consider this one dropped.

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

2025-12-17 Thread Jeff Davis
On Tue, 2025-12-16 at 07:34 +0800, Chao Li wrote: > > > > V2 LGTM. On second thought, if we're going to change something here, we should probably have a more flexible API for both utf8_to_unicode() and unicode_to_utf8(). Looking at the callers, I think we want to have signatures something like:

Re: index prefetching

2025-12-17 Thread Andres Freund
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 that the current heuristics that trigger > prefetching would have ever allowed

Re: Adding vacuum test case of setting the VM when heap page is unmodified

2025-12-17 Thread Kirill Reshke
On Tue, 16 Dec 2025 at 22:17, Melanie Plageman wrote: > > Thanks for the review! > > On Tue, Dec 16, 2025 at 11:39 AM Srinath Reddy Sadipiralla > wrote: > > > >> While working on a patch to set the VM in the same WAL record as > >> pruning and freezing [1], I discovered we have no test coverage o

Re: index prefetching

2025-12-17 Thread Tomas Vondra
On 12/17/25 19:49, Peter Geoghegan wrote: > On Wed, Dec 17, 2025 at 12:19 PM Konstantin Knizhnik > wrote: >> create table t (pk integer primary key, payload text default repeat('x', >> 1000)) with (fillfactor=10); >> insert into t values (generate_series(1,1000)) >> >> So it creates table

Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur

2025-12-17 Thread Tom Lane
I wrote: > Christoph Berg writes: >> "regress-19.mo" is a pretty generic name for a file installed in a >> system-wide location. Perhaps it could be named postgresql-regress-19.mo? >> (pg_regress(-19).mo doesn't exist yet, but might appear independently.) > Fair point, I'll look into renaming tha

Re: Custom oauth validator options

2025-12-17 Thread Jacob Champion
On Wed, Dec 17, 2025 at 1:28 AM Zsolt Parragi wrote: > Instead we decided to let everyone configure which claim they want to > use for user mapping. But because of that, this is a GUC, and they can > only configure it once pre server. We're getting closer; I agree that this needs to be more flexi

Re: index prefetching

2025-12-17 Thread Peter Geoghegan
On Wed, Dec 17, 2025 at 12:19 PM Konstantin Knizhnik wrote: > create table t (pk integer primary key, payload text default repeat('x', > 1000)) with (fillfactor=10); > insert into t values (generate_series(1,1000)) > > So it creates table with size 80Gb (160 after vacuum) which doesn't fit > i

Re: libxml2 video about its abandonment

2025-12-17 Thread Tom Lane
=?UTF-8?Q?Iv=C3=A1n_Chavero?= writes: > As of december 9th libxml2 has two maintainers: > Daniel Garcia Moreno and Iván Chavero (me), we're trying to > steer the project in a more positive direction. This is good news indeed. Best of luck! regards, tom lane

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

2025-12-17 Thread Greg Burd
On Tue, Dec 16, 2025, at 8:57 PM, Thomas Munro wrote: > On Wed, Dec 17, 2025 at 10:40 AM Nathan Bossart > wrote: Hey Nathan, Thomas, thanks for your continued investment of time in this patch. More thoughts below, but I wonder if the thing to do is to commit this and then for me to follow-on

Re: Custom oauth validator options

2025-12-17 Thread Jacob Champion
On Tue, Dec 16, 2025 at 10:30 PM VASUKI M wrote: > Overall, +1 that this limitation is real and worth discussing.I’ll plan to > send a patch shortly exploring option (b). Thanks! > Reg very long HBA lines: totally agree this is a real readability issue,but > allowing per-line includes or exter

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

2025-12-17 Thread Kirill Reshke
Hi! in v27-0001: > Melanie Plageman wrote: > > The last vacuum is expected to set vm bits, but the test doesn’t verify > > that. Should we verify that like: > > ``` > > evantest=# SELECT blkno, all_visible, all_frozen FROM > > pg_visibility_map('test_vac_unmodified_heap'); > > blkno | all_visib

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-17 Thread Matthias van de Meent
On Tue, 16 Dec 2025 at 14:43, Heikki Linnakangas wrote: > > Summary of CIC as it is today > - > > To recap, the CIC approach at very high level is: > > 1. Build the index, while backends are modifying the table concurrently > > 2. Retail insert all the tuples that we mi

Re: Updating IPC::Run in CI?

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 09:46:11 -0800, Jacob Champion wrote: > On Wed, Dec 17, 2025 at 9:24 AM Andres Freund wrote: > > If you promise to not push a thousand times a day, I'll add you as a > > contributor to the repo so CI automatically runs and therefore builds the > > images [1]... > > That'd be he

Re: Updating IPC::Run in CI?

2025-12-17 Thread Jacob Champion
On Wed, Dec 17, 2025 at 9:24 AM Andres Freund wrote: > If you promise to not push a thousand times a day, I'll add you as a > contributor to the repo so CI automatically runs and therefore builds the > images [1]... That'd be helpful. What scary power does this entail, though -- > [1] They are b

Re: Updating IPC::Run in CI?

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 09:14:11 -0800, Jacob Champion wrote: > On Wed, Dec 17, 2025 at 9:06 AM Andres Freund wrote: > > Are you stuck on anything right now, or just busy otherwise? > > Busy otherwise; the work-in-progress is at > > https://github.com/anarazel/pg-vm-images/pull/125 Huh. I comple

Re: index prefetching

2025-12-17 Thread Konstantin Knizhnik
On 11/12/2025 4:21 AM, Peter Geoghegan wrote: On Wed, Dec 10, 2025 at 5:41 PM Peter Geoghegan wrote: Attached is v3. This is another revision whose sole purpose is to keep the patch applying cleanly. No real changes compared to v1 to report here, either. Attached is v4. Same story again (ano

Re: Visibility bug in tuple lock

2025-12-17 Thread Heikki Linnakangas
On 17/12/2025 19:11, Andres Freund wrote: On 2025-12-15 21:52:29 +0200, Heikki Linnakangas wrote: Attached is a new patch version: Note that the tests included in this seem to fail reliably on 32bit: https://cirrus-ci.com/task/5787424783073280 Ah yeah, the test is sensitive to how exactly th

Re: Updating IPC::Run in CI?

2025-12-17 Thread Jacob Champion
On Wed, Dec 17, 2025 at 9:06 AM Andres Freund wrote: > Are you stuck on anything right now, or just busy otherwise? Busy otherwise; the work-in-progress is at https://github.com/anarazel/pg-vm-images/pull/125 I need to fix the NetBSD installation recipe and then shave the next yak. (The cy

Re: Updating IPC::Run in CI?

2025-12-17 Thread Andres Freund
Hi, On 2025-11-18 09:14:38 -0800, Noah Misch wrote: > On Tue, Nov 18, 2025 at 08:29:14AM -0800, Jacob Champion wrote: > > On Mon, Nov 17, 2025 at 12:22 PM Noah Misch wrote: > > > It's a CPAN-managed key. See if the key here gives what you need: > > > http://pgpkeys.eu/pks/lookup?search=071B46850

Re: Visibility bug in tuple lock

2025-12-17 Thread Andres Freund
Hi, On 2025-12-15 21:52:29 +0200, Heikki Linnakangas wrote: > Attached is a new patch version: Note that the tests included in this seem to fail reliably on 32bit: https://cirrus-ci.com/task/5787424783073280 Greetings, Andres Freund

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

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 10:28:28 +, Zhijie Hou (Fujitsu) wrote: > On Monday, December 15, 2025 7:06 PM Amit Kapila > wrote: > > > > On Fri, Dec 12, 2025 at 8:53 AM shveta malik > > wrote: > > > > > > On Fri, Dec 12, 2025 at 5:35 AM Ajin Cherian wrote: > > > > > > > > > > > > I have included the

Re: Adding vacuum test case of setting the VM when heap page is unmodified

2025-12-17 Thread Srinath Reddy Sadipiralla
On Tue, Dec 16, 2025 at 10:47 PM Melanie Plageman wrote: > Thanks for the review! > > On Tue, Dec 16, 2025 at 11:39 AM Srinath Reddy Sadipiralla > wrote: > > > >> While working on a patch to set the VM in the same WAL record as > >> pruning and freezing [1], I discovered we have no test coverage

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

2025-12-17 Thread Sami Imseih
> On Wed, Dec 17, 2025 at 08:03:36AM +0100, Peter Eisentraut wrote: > > So it seems to me that either the callbacks API needs some adjustments, or > > this particular implementation of the callback function is incorrect. > > Hmm, you are right that this is not aligned. This can be improved > with

Re: pg_dump: Remove trivial usage of PQExpBuffer

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 16:15:21 +0100, Peter Eisentraut wrote: > On 16.12.25 23:03, Corey Huinker wrote: > > I've been looking at ways to reorganize and/or clean up pg_dump.c. > > > > One thing I have noticed is the usage of PQExpBuffer in situations where > > the query has no optional parts and no st

Re: libxml2 video about its abandonment

2025-12-17 Thread Iván Chavero
Hello, As of december 9th libxml2 has two maintainers: Daniel Garcia Moreno and Iván Chavero (me), we're trying to steer the project in a more positive direction. Contributions are welcome! Cheers, Iván En 17/12/25 8:21 a.m., Bruce Momjian escribió: Here is a video about the current

Re: RFC: adding pytest as a supported test framework

2025-12-17 Thread Andres Freund
On 2025-11-10 22:11:50 +0100, Jelte Fennema-Nio wrote: > On Wed Oct 22, 2025 at 2:44 PM CEST, Jelte Fennema-Nio wrote: > > So here's your patchset with an additional commit on top that does a > > bunch of refactoring/renaming and adding features. > > Rebased to fix conflicts. I assume this intent

Re: Additional message in pg_terminate_backend

2025-12-17 Thread Daniel Gustafsson
> On 13 Dec 2025, at 08:44, Roman Khapov wrote: > Recently I started working on patch for adding additional message from admin > in pg_terminate_backend for one of our greenplum fork. Greenplum already has support for passing a message in the terminate command doesnt it? Or at least it used to

Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur

2025-12-17 Thread Tom Lane
Christoph Berg writes: > "regress-19.mo" is a pretty generic name for a file installed in a > system-wide location. Perhaps it could be named postgresql-regress-19.mo? > (pg_regress(-19).mo doesn't exist yet, but might appear independently.) Fair point, I'll look into renaming that later.

Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur

2025-12-17 Thread Christoph Berg
Re: Tom Lane > Is it possible to override that packaging complaint? Sure, we'd just have to install it. It just seemed asymmetric to do that when regress.so isn't installed. (TBH I've been pondering to do that anyway to make re-running the regression tests later easier.) "regress-19.mo" is a pret

Re: Fix memory leak in tzparser.c

2025-12-17 Thread Tom Lane
Ashutosh Bapat writes: > On Tue, Dec 16, 2025 at 1:29 PM Michael Paquier wrote: >> Why does it matter? load_tzoffsets() is the sole caller of >> ParseTzFile() and it uses a temporary memory context named >> TZParserMemory to not have to do cleanups like the one you are >> proposing here. > +1.

Re: Visibility bug in tuple lock

2025-12-17 Thread Heikki Linnakangas
On 17/12/2025 16:51, Jasper Smit wrote: Thanks! That's not quite correct though. This is very subtle, but the 'tuple' argument to heap_lock_updated_tuple() points to the buffer holding the original tuple. So doing HeapTupleHeaderGetUpdateXid(tuple->t_data) reads the current xmax of the tuple, whi

Re: Checkpointer write combining

2025-12-17 Thread Melanie Plageman
On Tue, Dec 16, 2025 at 11:46 PM Soumya S Murali wrote: > > Thank you for the clarification. > I understand the concern, and apologies for the earlier confusion. My > intention is to stay aligned with the direction of your v11 series, so > this patch contains only small, incremental changes intend

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

2025-12-17 Thread Pavel Stehule
Hi st 17. 12. 2025 v 14:31 odesílatel Aya Iwata (Fujitsu) < [email protected]> napsal: > Hi Pavel-san, > > >> So maybe there should be ALTER DATABASE ... RENAME ... FORCE - or if > FORCE can terminare all workers (without special FLAG) ? > > > > For the proposed feature, we've added a flag al

Re: [PATCH] Add regression test for aggregate NULL behavior

2025-12-17 Thread Ashutosh Bapat
Hi Kateriny, On Tue, Dec 16, 2025 at 6:21 PM kateriny bispo wrote: > > Hi, > > This patch adds a new regression test covering the behavior of aggregate > functions when handling NULL values, including COUNT, COUNT(*) and AVG > on non-empty and empty relations. > > The test was implemented using t

Re: Replace is_publishable_class() with relispublishable column in pg_class

2025-12-17 Thread Peter Eisentraut
On 17.12.25 08:07, Peter Smith wrote: 0. AFAIK, anything named with a "pg_" prefix generally means that the named thing is intended for PG internal use, right? This might be a convention, but it's not enforced by the system, except for some object types like schemas and tablespaces.

Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur

2025-12-17 Thread Tom Lane
Christoph Berg writes: > The Debian package builds are complaining that there is now a > usr/share/locale/es/LC_MESSAGES/regress-19.mo > file that needs sorting into one of the .deb packages. > Since regress.so itself doesn't get installed by autoconf's Makefiles, > shouldn't that .mo file not get

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

2025-12-17 Thread Andres Freund
Hi, On 2025-12-15 17:16:56 +0800, Chao Li wrote: > The motivation for this patch comes from my own experience. While working > on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, > assigning the same numeric value to two different enum entries. This > resulted in confusing runtime

Re: pg_dump: Remove trivial usage of PQExpBuffer

2025-12-17 Thread Peter Eisentraut
On 16.12.25 23:03, Corey Huinker wrote: I've been looking at ways to reorganize and/or clean up pg_dump.c. One thing I have noticed is the usage of PQExpBuffer in situations where the query has no optional parts and no string interpolation. Attached is a patch to replace those usages with the

Do not emit FPW for unlogged relations in BRIN empty-page

2025-12-17 Thread Kirill Reshke
Hi hackers. I have been reviewing other patches, and spotted code in `brin_initialize_empty_new_buffer`. This function emits FPW for newly-initialized BRIN bufferafter `MarkBufferDirty`. It seems to me that this is unnecessary for UNLOGGED relations. I have re-checked instances of `MarkBufferDirt

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

2025-12-17 Thread Peter Eisentraut
On 16.12.25 11:51, Dharin Shah wrote: - Zstd only applies to external TOAST, not inline compression. The 2-bit limit in va_tcinfo stays as-is for inline data, where pglz/lz4 work fine anyway. Zstd's wins show up on larger values. This is a very complicated patch. To motivate it, you should sh

Re: [PATCH] Add pg_lfind8_nonzero()

2025-12-17 Thread Peter Eisentraut
On 14.12.25 14:33, cca5507 wrote: With pg_lfind8_nonzero(), we can write the code like this: ``` if (likely(numberOfAttributes > 0)) hasnull = pg_lfind8_nonzero((uint8 *) isnull, numberOfAttributes); ``` The pg_lfind8_nonzero() is faster because we can handle 8 bool val

Re: Flaky 003_start_stop.pl test

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 16:46:25 +0200, Heikki Linnakangas wrote: > > The pattern is similar in other failed tests. There has been a spate of > > errors > > on postgres/postgres' CI, which made me look at this again. > > I see what's going on here. Before the loop that opens all the connections > with

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

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 11:25:50 +0200, Heikki Linnakangas wrote: > On 03/12/2025 02:47, Andres Freund wrote: > > On 2025-11-25 11:54:00 -0500, Andres Freund wrote: > > > Thanks a lot for that detailed review! A few questions and comments, > > > before I > > > try to address the comments in the next v

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

2025-12-17 Thread Peter Eisentraut
On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, assigning the same numeric value to two different enum entries. This resulted in confusing runtime behavior and cost m

Re: Visibility bug in tuple lock

2025-12-17 Thread Jasper Smit
> Thanks! That's not quite correct though. This is very subtle, but the > 'tuple' argument to heap_lock_updated_tuple() points to the buffer > holding the original tuple. So doing > HeapTupleHeaderGetUpdateXid(tuple->t_data) reads the current xmax of the > tuple, which can now be different than wha

Re: Flaky 003_start_stop.pl test

2025-12-17 Thread Heikki Linnakangas
Thanks for the analysis! On 05/03/2025 02:41, Andres Freund wrote: On 2025-03-04 09:48:45 +1300, Thomas Munro wrote: On Tue, Mar 4, 2025 at 5:48 AM Andres Freund wrote: On 2025-02-24 11:26:56 +0100, Jelte Fennema-Nio wrote: [1]: https://cirrus-ci.com/task/5571017969500160?logs=test_world#L25

libxml2 video about its abandonment

2025-12-17 Thread Bruce Momjian
Here is a video about the current status of libxml2's abandonment status: https://www.youtube.com/watch?v=GDr4fKXmUvc The current libxml2 security text is below -- I think this is a positive development. It was rewritten on December 10 to create "a more positive Security section":

[Proposal] Generate pkg-config for server module development

2025-12-17 Thread Anders Åstrand
Hello hackers! I've been looking into making it easier for extension authors to use other build systems than make. I don't have everything in place just yet, but I believe this first part where we generate pkg-config files for building server modules can be useful on it's own. I'm not entire

Re: Bypassing cursors in postgres_fdw to enable parallel plans

2025-12-17 Thread Alexander Pyhalov
Rafia Sabih писал(а) 2025-11-27 13:50: On Tue, 25 Nov 2025 at 15:24, KENAN YILMAZ wrote: Hello Hackers, I have executed use_cursor = true/false with quick tests. Hi. I've looked at this patch, because also was playing with tuplestore in PgFdwScanState to have more predictable memory usag

Re: pg_plan_advice

2025-12-17 Thread Jakub Wartak
On Wed, Dec 17, 2025 at 11:12 AM Jakub Wartak wrote: > > On Mon, Dec 15, 2025 at 9:06 PM Robert Haas wrote: > > > > Here's v7. > [..] >[..q20..] OK, now for the q10: Sort Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount DESC -> Finalize GroupAggregate

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

2025-12-17 Thread Aya Iwata (Fujitsu)
Hi Pavel-san, >> So maybe there should be ALTER DATABASE ... RENAME ... FORCE - or if FORCE >> can terminare all workers (without special FLAG) ? > > For the proposed feature, we've added a flag allowing each extension > developer to decide whether to terminate it via DROP/ALTER DATABASE. > Add

Re: CREATE SCHEMA ... CREATE DOMAIN support

2025-12-17 Thread jian he
On Wed, Sep 3, 2025 at 5:24 AM Tom Lane wrote: > > jian he writes: > > Please check the latest attached. > > v7-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-SCHEMA.patch > I think this is still kind of blocked, because it's not clear to me > whether we have consensus about it being okay

Re: Fix memory leak in tzparser.c

2025-12-17 Thread Ashutosh Bapat
On Tue, Dec 16, 2025 at 1:29 PM Michael Paquier wrote: > > On Tue, Dec 16, 2025 at 05:55:32AM +, Shixin Wang wrote: > > While the memory is managed by a temp memory context that gets cleaned up > > eventually, the coarse-grained management might cause some memory to > > accumulate during Parse

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

2025-12-17 Thread Zsolt Parragi
> 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, not enough to introduce a new way of > configuring things for th

Re: Replace is_publishable_class() with relispublishable column in pg_class

2025-12-17 Thread Amit Kapila
On Wed, Dec 17, 2025 at 12:37 PM Peter Smith wrote: > > Here is a completely different idea. This may solve the immediate > problem re the replication of the Conflict Log Table (CLT) at least... > Another idea could be that at the startup (pgoutput_startup), we can form a conflict_table cache and

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

2025-12-17 Thread Amit Kapila
On Wed, Dec 17, 2025 at 2:29 AM Peter Smith wrote: > > On Tue, Dec 16, 2025 at 7:39 PM Chao Li wrote: > > > > > > > > AFAIK, Chao's improved text is mostly good, except I think there might > > > be some nuances when there are multiple levels of partitioning. > > > > > > For example, maybe you nee

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-17 Thread Bertrand Drouvot
Hi, On Mon, Dec 15, 2025 at 01:08:44PM +0900, Michael Paquier wrote: > While passing through, I have applied 0001. Out of curiosity, I searched for other mismatched index_open/relation_close pairs in the tree and found a few more with the help of [1]. They are fixed in the attached. Please not

Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur

2025-12-17 Thread Christoph Berg
Re: Tom Lane > src/test/regress/po/es.po | 159 +++ The Debian package builds are complaining that there is now a usr/share/locale/es/LC_MESSAGES/regress-19.mo file that needs sorting into one of the .deb packages. Since regress.so itself doesn't get insta

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-17 Thread Mihail Nikalayeu
Hello! On Tue, Dec 16, 2025 at 3:48 AM Mihail Nikalayeu wrote: > First version of TAP-based test in attachment. I think we should not > hurry with push - let's make sure it really stable now. Second version - some issues fixed, added some log and diagnostic for the next fail. Mikhail. From f53

Re: Additional message in pg_terminate_backend

2025-12-17 Thread Andrey Borodin
> On 13 Dec 2025, at 12:44, Roman Khapov wrote: > > Recently I started working on patch for adding additional message from admin > in pg_terminate_backend for one of our greenplum fork. The main idea is that > there must be > done little investigation every time you see 'FATAL: terminating

Re: Parallel Apply

2025-12-17 Thread Andrei Lepikhov
On 16/12/25 12:35, Hayato Kuroda (Fujitsu) wrote: Dear hackers, I have been spending time for benchmarking the patch set. Here is an updated report. I apologise if my question is incorrect. But what about asynchronous replication? Does this method help to reduce lag? My case is a replica loc

RE: Improve logical replication usability when tables lack primary keys

2025-12-17 Thread Zhijie Hou (Fujitsu)
On Tuesday, December 16, 2025 2:47 PM Chao Li wrote: > > On Dec 15, 2025, at 13:48, Amit Kapila wrote: > > > > So, without patch, there is no way we can silently replicate the > > UPDATE/DELETE. Ideally, users should alter the tables and make RI as > > FULL in such cases if they don't have PK for

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-17 Thread Tomas Vondra
On 12/16/25 18:54, Christoph Berg wrote: > Re: Tomas Vondra >> 1) right after opening a connection, I get this >> >> test=# select numa_node, count(*) from pg_buffercache_numa group by 1; >> numa_node | count >> ---+--- >> 0 | 290 >> -2 | 32478 > > Does that mean

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-12-17 Thread Ashutosh Bapat
On Fri, Dec 5, 2025 at 11:48 PM Robert Haas wrote: > > On Wed, Dec 3, 2025 at 9:53 PM Richard Guo wrote: > > But I admit that I am unsure if this addresses > > any real problems, so the effort might not be justified. I agree that > > maybe we should just go ahead with your current patch and see

Re: Periodic authorization expiration checks using GoAway message

2025-12-17 Thread Zsolt Parragi
> To me that seems like a matter of policy and not protocol. (As long as > we come to some agreement on the semantics of what a client is and is > not allowed to do before reauthenticating.) It's great if this is configurable, as long as DBAs can choose both the immediate and graceful options. >

Re: Remaining dependency on setlocale()

2025-12-17 Thread Peter Eisentraut
On 12.12.25 21:11, Jeff Davis wrote: case '\xc7':    /* C with cedilla */ so the premise that "fuzzystrmatch is designed for ASCII" does not appear to be correct.  Needs more analysis. (But apparently it's not multibyte aware at all, so I don't know what to do about that.) I didn't notice

Re: Segmentation fault on proc exit after dshash_find_or_insert

2025-12-17 Thread Rahila Syed
Hi Amit, > /* > * Release any LWLocks we might be holding, before running callbacks > that > - * may detach the memory containing those locks. > + * may detach the memory containing those locks. Releasing all the > locks > + * ensures that any callbacks executed afterward w

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

2025-12-17 Thread Zhijie Hou (Fujitsu)
On Monday, December 15, 2025 7:06 PM Amit Kapila wrote: > > On Fri, Dec 12, 2025 at 8:53 AM shveta malik > wrote: > > > > On Fri, Dec 12, 2025 at 5:35 AM Ajin Cherian wrote: > > > > > > > > > I have included these changes as well as comments by Chao. Attaching > > > v37 with the changes. > > >

Re: Proposal: Conflict log history table for Logical Replication

2025-12-17 Thread shveta malik
On Wed, Dec 17, 2025 at 3:29 PM Dilip Kumar wrote: > > On Wed, Dec 17, 2025 at 3:14 PM shveta malik wrote: > > > > I don’t think a user intentionally dropping information_schema and > > creating their own schema (with different definitions and tables) is a > > practical scenario. While it isn’t e

Re: pg_plan_advice

2025-12-17 Thread Jakub Wartak
On Mon, Dec 15, 2025 at 9:06 PM Robert Haas wrote: > > Here's v7. [..] OK, so I've tested today from Your's branch directly, so I hope that was also v7. Given the following q20 query: SELECT s_name, s_address FROM supplier, nation WHERE s_suppkey in (SELECT ps_suppkey FROM partsupp

Re: [Proposal] Adding Log File Capability to pg_createsubscriber

2025-12-17 Thread vignesh C
On Tue, 16 Dec 2025 at 12:31, Hayato Kuroda (Fujitsu) wrote: > > 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,

Re: Periodic authorization expiration checks using GoAway message

2025-12-17 Thread Ajit Awekar
Background process will help us to gain performance so as it will be seamless to users and user queries will not be impacted. Thanks & Best Regards, Ajit On Wed, 17 Dec 2025 at 01:52, Jacob Champion < [email protected]> wrote: > On Tue, Dec 16, 2025 at 1:15 AM Ajit Awekar > wrote:

Re: More const-marking cleanup

2025-12-17 Thread Bertrand Drouvot
Hi, On Mon, Dec 08, 2025 at 07:43:34AM +, Bertrand Drouvot wrote: > That said I improved the script [1] so that: > > - It found one more (see the attached) I had another look and it seems to me that the one (src/port/getopt.c) reported and fixed in the attached of the previous email is the o

Re: Proposal: Conflict log history table for Logical Replication

2025-12-17 Thread Dilip Kumar
On Wed, Dec 17, 2025 at 3:14 PM shveta malik wrote: > > I don’t think a user intentionally dropping information_schema and > creating their own schema (with different definitions and tables) is a > practical scenario. While it isn’t explicitly restricted, I don’t see > a strong need for it. OTOH,

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

2025-12-17 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: Proposal: Conflict log history table for Logical Replication

2025-12-17 Thread shveta malik
On Wed, Dec 17, 2025 at 9:59 AM Dilip Kumar wrote: > > On Tue, Dec 16, 2025 at 10:33 AM shveta malik wrote: > > > The OID check may be unreliable, as mentioned in the comment. I tested > > this by dropping and recreating information_schema, and observed that > > after recreation it became eligibl

Re: Custom oauth validator options

2025-12-17 Thread Zsolt Parragi
> Overall, +1 that this limitation is real and worth discussing.I’ll plan to > send a patch shortly exploring option (b). Personally I would go with either (a) or (c), and I was planning to clean up / improve / share my (c) patch as a second attempt for this thread, if it didn't receive any repli

Re: Custom oauth validator options

2025-12-17 Thread Zsolt Parragi
> What kinds of parameters? Having a motivating use case would be > helpful; HBA isn't always as flexible as people assume and I want to > make sure that we can end with a usable feature. One issue we have is that some providers don't allow users to select what goes into the subject claim, but do

Re: Improve logical replication usability when tables lack primary keys

2025-12-17 Thread GRANT ZHOU
On Tue, Dec 16, 2025 at 4:59 PM Chao Li wrote: > > On Dec 15, 2025, at 13:48, Amit Kapila wrote: > > > So, without patch, there is no way we can silently replicate the > > UPDATE/DELETE. Ideally, users should alter the tables and make RI as > > FULL in such cases if they don't have PK for such t

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

2025-12-17 Thread Heikki Linnakangas
On 03/12/2025 02:47, Andres Freund wrote: On 2025-11-25 11:54:00 -0500, Andres Freund wrote: Thanks a lot for that detailed review! A few questions and comments, before I try to address the comments in the next version. Here's that new new version, with the following changes - Some more micr

Re: Fix and improve allocation formulas

2025-12-17 Thread Bertrand Drouvot
Hi, On Wed, Dec 17, 2025 at 05:19:33PM +0900, Michael Paquier wrote: > On Thu, Dec 11, 2025 at 01:27:56PM +, Bertrand Drouvot wrote: > diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c > b/src/bin/pg_verifybackup/pg_verifybackup.c > index c9b24df7c05..1cd5fa791c0 100644 > --- a/src/bin/

Re: Replace is_publishable_class() with relispublishable column in pg_class

2025-12-17 Thread Amit Kapila
On Wed, Dec 17, 2025 at 12:37 PM Peter Smith wrote: > > Here is a completely different idea. This may solve the immediate > problem re the replication of the Conflict Log Table (CLT) at least... > > 0. AFAIK, anything named with a "pg_" prefix generally means that the > named thing is intended for

Re: Serverside SNI support in libpq

2025-12-17 Thread Heikki Linnakangas
On 17/12/2025 11:03, Heikki Linnakangas wrote: On 12/12/2025 13:41, Daniel Gustafsson wrote: I wonder if the way forward is to do both?  Heikki has a good point that when working with pg_hosts.conf it should be clear from just that file what the final config will be, and in the previous version

Re: Serverside SNI support in libpq

2025-12-17 Thread Heikki Linnakangas
On 12/12/2025 13:41, Daniel Gustafsson wrote: On Wed, Dec 3, 2025 at 1:57 AM Heikki Linnakangas wrote: Maybe. I'm not a big fan of magic-file-exist configurations Me neither. (I especially don't like the idea of ignoring a certificate+key setting that a user has taken the time to put into a

Re: SQL Property Graph Queries (SQL/PGQ)

2025-12-17 Thread Peter Eisentraut
On 17.12.25 06:32, Ashutosh Bapat wrote: On Mon, Dec 15, 2025 at 6:43 PM Ashutosh Bapat wrote: Rebased patches on the latest HEAD which required me to move graph_table.sql to another parallel group. Huh, the movement resulted in losing that test from parallel_schedule. Fixed in the attached

RE: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-17 Thread Zhijie Hou (Fujitsu)
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 patch. > > On Wed, Dec 17, 2025 at 8:11 AM Euler Taveira > wrote: > > > I wondering if we use INHERIT as d

Re: Report bytes and transactions actually sent downtream

2025-12-17 Thread Bertrand Drouvot
Hi, On Thu, Dec 11, 2025 at 10:29:42AM +0530, Ashutosh Bapat wrote: > Sorry for the delayed response. PFA the patch implementing the idea > discussed above. It relies on the output plugin callback to return > correct boolean but maintains the statistics in the core itself. Thanks for the new patc

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

2025-12-17 Thread Anthonin Bonnefoy
On Wed, Dec 17, 2025 at 8:26 AM Amul Sul wrote: > Thanks for detailed reproducible steps, I can see the reported issue > and proposed patch fixes the same. Thanks for the review! > The deleted code you moved to mdtruncate() should be kept where it > was. We cannot ensure that every extension

  1   2   >