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

2025-12-17 Thread Chao Li
> On Dec 18, 2025, at 15:43, Peter Eisentraut wrote: > > On 18.12.25 01:22, Chao Li wrote: >>> On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: >>> On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-

Re: [PATCH] Documentation

2025-12-17 Thread Andreas Karlsson
On 12/18/25 8:31 AM, Mikael Gustavsson wrote: This is my first ever patch to postgresql so please guide me if i'm doing something wrong. This patch updates some examples in documentation client-auth.sgml from md5 to scram-sha-256 Reference: https://www.postgresql.org/message- id/176595607507.

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

2025-12-17 Thread Peter Eisentraut
On 18.12.25 01:22, Chao Li wrote: On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, assigning the same numeric valu

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-12-17 Thread Nazir Bilal Yavuz
Hi, On Sat, 13 Dec 2025 at 02:09, Manni Wood wrote: > > Hello, Everyone! > > I have attached two files. 1) the shell script that Mark and I have been > using to get our test results, and 2) a screenshot of a spreadsheet of my > latest test results. (Please let me know if there's a different for

[PATCH] Documentation

2025-12-17 Thread Mikael Gustavsson
Hi This is my first ever patch to postgresql so please guide me if i'm doing something wrong. This patch updates some examples in documentation client-auth.sgml from md5 to scram-sha-256 Reference: https://www.postgresql.org/message-id/176595607507.978865.11597773194269211255%40wrigleys.postgr

DOC: fixes multiple errors in alter table doc

2025-12-17 Thread Chao Li
Hi Hacker, While working on a patch these days, my eyes are on the “alter table” doc, and found multiple errors: 1. Several sub-commands are missed in the top “action” list: * ALTER COLUMN SET * ALTER COLUMN RESTART * RENAME * SET SCHEMA * ATTACH PARTITION * DETACH PARTITION

Re: Logical Replication of sequences

2025-12-17 Thread Shlok Kyal
On Tue, 11 Nov 2025 at 16:41, vignesh C wrote: > > On Tue, 11 Nov 2025 at 11:23, Chao Li wrote: > > > > Hi Vignesh, > > > > A few more comments: > > > > > On Nov 7, 2025, at 22:47, vignesh C wrote: > > > > > > The attached v20251107_2 version patch has the changes for the same. > > > > > > Regar

Re: [Proposal] Adding Log File Capability to pg_createsubscriber

2025-12-17 Thread Amit Kapila
On Thu, Dec 18, 2025 at 6:59 AM Euler Taveira wrote: > > On Wed, Dec 17, 2025, at 7:07 AM, vignesh C wrote: > > > > By providing this as an option, users can store the log files outside > > the data directory, eliminating the need for any additional handling > > during backups. > > > > Do we reall

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-17 Thread vignesh C
On Thu, 18 Dec 2025 at 01:21, Noah Misch wrote: > > 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 ver

RE: Parallel Apply

2025-12-17 Thread Hayato Kuroda (Fujitsu)
Dear Andrei, > > 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 located far from the main instance. Ther

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

2025-12-17 Thread Michael Paquier
On Wed, Dec 17, 2025 at 04:11:38PM +0100, Peter Eisentraut wrote: > 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 larg

Fix outdated comments in catcache.h

2025-12-17 Thread cca5507
Hi, 473182c9523afad10e9507145690d902a0bc7f04 add a hash table for CatCList, this has made some comments outdated. Attach a small patch to fix it. -- Regards, ChangAo Chen v1-0001-Fix-outdated-comments-in-catcache.h.patch Description: Binary data

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

2025-12-17 Thread Amul Sul
On Wed, Dec 17, 2025 at 3:25 AM Oleg Tkachenko wrote: > > Hello, Robert > > I’ve created a small test that reproduces the issue. With the proposed fix > applied, the test passes, and the reconstruction behaves as expected. > > I’m attaching the test for review. Please let me know if this looks OK

Re: Skipping schema changes in publication

2025-12-17 Thread shveta malik
On Wed, Dec 17, 2025 at 11:24 AM shveta malik wrote: > > On Tue, Dec 16, 2025 at 2:50 PM Shlok Kyal wrote: > > > > I have also addressed the remaining comments and attached the latest patch. > > > > Thanks. A few comments: > > 1) > + if (!set_top && puballtables) > + set_top = !list_member_oid(ae

Re: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-17 Thread Chao Li
> On Dec 18, 2025, at 12:21, Chao Li wrote: > >> >> 2) Should we simply use the ONLY keyword to determine whether to propagate >> the >> replica identity to partitions instead of adding [NOT] INHERIT? For example, >> if >> a user specifies ONLY, it changes the identity of the parent table,

Re: Custom oauth validator options

2025-12-17 Thread VASUKI M
On Thu, Dec 18, 2025 at 12:31 AM Jacob Champion < [email protected]> wrote: > 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 >

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 callbacks run. This > * prevents accessing locks in detached DSM segments and allows callbacks > * to acquire new locks. > */ > > This looks good to me. Thank you, Rahila Syed

Re: Fix and improve allocation formulas

2025-12-17 Thread Michael Paquier
On Wed, Dec 17, 2025 at 09:24:31AM +, Bertrand Drouvot wrote: > I'd vote for just changing the palloc() like proposed in v1. It does not seem that bad if we treat the uint8 rule for actual bytes, but I'm going to leave that for others to comment for now. By the way, while checking again the w

Re: [PATCH] Expose checkpoint reason to completion log messages.

2025-12-17 Thread Soumya S Murali
Hi Andres, On Thu, Dec 18, 2025 at 5:49 AM Andres Freund wrote: > > Hi, > > On 2025-12-01 16:48:56 +0530, Soumya S Murali wrote: > > This patch is an update after reworking the “checkpoint reason” changes as > > a standalone patch, separate from the pg_stat_checkpointer additions as > > suggeste

Re: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

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

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

2025-12-17 Thread Amit Kapila
On Thu, Dec 18, 2025 at 1:42 AM Jacob Champion 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 documentation improvements? Otherwise no > one

Re: Fixing the btree_gist inet mess

2025-12-17 Thread Tom Lane
I wrote: > One potential path forward is to roll up the existing series of > update scripts to create a new installation-from-scratch script > btree-gist--1.9.sql which would not try to mark the opclasses as > default. > Matthias van de Meent writes: >> Could we either limit this hack to pg_upgra

Re: [PATCH] Add pg_lfind8_nonzero()

2025-12-17 Thread cca5507
Hi, > Maybe you could try popcount for this? > >  hasnull = (pg_popcount((char *) isnull, numberOfAttributes) > 0); It seems that pg_popcount() cannot early return when we find a nonzero value, so I don't think it's a good choice for this case. -- Regards, ChangAo Chen

Re: Report bytes and transactions actually sent downtream

2025-12-17 Thread Chao Li
> On Dec 17, 2025, at 13:55, Ashutosh Bapat > wrote: > > Thanks for pointing this out. I have fixed it my code. However, at > this point I am looking for a design review, especially to verify that > the new implementation addresses Andres's concern raised in [1] while > not introducing any de

Re: Adding REPACK [concurrently]

2025-12-17 Thread Mihail Nikalayeu
Hello, Antonin! On Sat, Dec 13, 2025 at 8:39 PM Antonin Houska wrote: > > --- > > > SpinLockAcquire(&shared->mutex); > > > valid = shared->sfs_valid; > > > SpinLockRelease(&shared->mutex); > > > > Better to remember last_exported here to avoid any races/misses. > > What races/misses exactly? Jus

Re: Adding REPACK [concurrently]

2025-12-17 Thread Mihail Nikalayeu
Hello! On Sat, Dec 13, 2025 at 7:45 PM Mihail Nikalayeu wrote: > Stress tests for REPACK concurrently in attachment. To run: ninja && meson test --suite setup && meson test --print-errorlogs --suite amcheck *007* ninja && meson test --suite setup && meson test --print-errorlogs --suite amcheck *

Re: [Proposal] Adding Log File Capability to pg_createsubscriber

2025-12-17 Thread Euler Taveira
On Wed, Dec 17, 2025, at 7:07 AM, vignesh C wrote: > > By providing this as an option, users can store the log files outside > the data directory, eliminating the need for any additional handling > during backups. > Do we really need an option to capture the stdout / stderr output to a file? I dou

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-12-17 Thread Peter Smith
On Thu, Dec 18, 2025 at 11:25 AM Andres Freund wrote: > > Hi, > > On 2025-12-17 12:40:13 +1100, Peter Smith wrote: > > Here is the latest set of VCI patches. > > This fails the tests under the undefined behaviour sanitizer. > > Se e.g. > https://cirrus-ci.com/task/6313371143766016 > > There are a

Re: Segmentation fault on proc exit after dshash_find_or_insert

2025-12-17 Thread Amit Langote
On Wed, Dec 17, 2025 at 19:37 Rahila Syed wrote: > 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 >>

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

2025-12-17 Thread Chao Li
> On Dec 18, 2025, at 05:32, Zsolt Parragi wrote: > > 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 t

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

2025-12-17 Thread Chao Li
> On Dec 17, 2025, at 23:19, Andres Freund wrote: > > 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 t

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

2025-12-17 Thread Melanie Plageman
On Wed, Dec 17, 2025 at 2:29 PM Kirill Reshke wrote: > > I did run a test and this indeed triggers assertion if somebody writes > something like [0]. Code at [0] works (although never testes) only > because is passed > InvalidXLogRecPtr as recptr to visibilitymap_set. Maybe it is worth to > add co

Re: Report oldest xmin source when autovacuum cannot remove tuples

2025-12-17 Thread Andres Freund
Hi, On 2025-10-31 15:31:40 +0900, Shinya Kato wrote: > The patch is attached. What do you think? The added tests never seem to pass in CI: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F6188 Greetings, Andres Freund

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-12-17 Thread Andres Freund
Hi, On 2025-12-17 12:40:13 +1100, Peter Smith wrote: > Here is the latest set of VCI patches. This fails the tests under the undefined behaviour sanitizer. Se e.g. https://cirrus-ci.com/task/6313371143766016 There are a lot of crashes due to ubsan failures. One of them is: [21:22:15.116] stder

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

2025-12-17 Thread Chao Li
> On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: > > On 15.12.25 10:16, Chao Li wrote: >> The motivation for this patch comes from my 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

Re: [PATCH] Expose checkpoint reason to completion log messages.

2025-12-17 Thread Andres Freund
Hi, On 2025-12-01 16:48:56 +0530, Soumya S Murali wrote: > This patch is an update after reworking the “checkpoint reason” changes as > a standalone patch, separate from the pg_stat_checkpointer additions as > suggested [1]. This seems to not pass the tests on any platform: https://cirrus-ci.com/

Re: Serverside SNI support in libpq

2025-12-17 Thread Daniel Gustafsson
> On 18 Dec 2025, at 00:58, Jacob Champion > wrote: > > On Fri, Dec 12, 2025 at 3:41 AM Daniel Gustafsson wrote: >>> The comment for HostsLine.ssl_ca, and the code that assigns it, >>> implies to me that host->ssl_ca should never be NULL. Am I missing a >>> case where it could be? >> >> The at

Re: Serverside SNI support in libpq

2025-12-17 Thread Jacob Champion
On Fri, Dec 12, 2025 at 3:41 AM Daniel Gustafsson wrote: > > The comment for HostsLine.ssl_ca, and the code that assigns it, > > implies to me that host->ssl_ca should never be NULL. Am I missing a > > case where it could be? > > The attached version allows ssl_ca to be omitted from the pg_host co

Re: PRI?64 vs Visual Studio (2022)

2025-12-17 Thread Thomas Munro
On Tue, Dec 16, 2025 at 12:15 AM Thomas Munro wrote: > On Mon, Dec 15, 2025 at 8:01 PM Tom Lane wrote: > > So their gettext handles PRIu64 and PRIu32 and nothing else. > > Hah, I had predicted that three would work. Off by one. > > > What to do now? I could revert 8c498479d and followups, but >

Re: Custom oauth validator options

2025-12-17 Thread Zsolt Parragi
> I forgot to mention in my reply to Zsolt, but we've supported inline > inclusions in HBA for a few releases now. (I just frequently forget > they exist.) Thanks, I didn't know about that feature, that solves half of my problem. > What's the case where a user has multiple HBA lines that > all wa

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

2025-12-17 Thread Michael Paquier
On Wed, Dec 17, 2025 at 11:01:01AM -0600, Sami Imseih wrote: > I got the attached patch ready with some additional comments in > the callback definitions to clarify the API contract. We only need > to call out the "header' nuance since it's a const in one callback > and not the other. "key" is self

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":

  1   2   >