Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-16 Thread Mihail Nikalayeu
Hello, Heikki! On Tue, Dec 16, 2025 at 2:43 PM Heikki Linnakangas wrote: > Firstly, I think the STIR approach is the right approach at the high > level. I don't like the logical decoding idea, for the reasons Matthias > and Mikhail already mentioned. Maybe there's some synergy with REPACK, > but

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

2025-12-16 Thread Oleg Tkachenko
Hello, RobertI’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 or if you would like it changed.Regards,Oleg 0001-Test-the-correctness

Re: [PATCH] Allow complex data for GUC extra.

2025-12-16 Thread Tom Lane
Robert Haas writes: > Another idea is to just keep track of which contexts need to be > deleted if we error out. Let's say that when we create a temporary > check-hook context, we add it to a linked list, similar to > guc_stack_list, but each element of the list is just a memory context > pointer

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

2025-12-16 Thread Nathan Bossart
Sorry for the noise. I discovered that this patch originated in another thread [0], so I spent some time updating the attributions. Please let me know if there are any inaccuracies. On Tue, Dec 16, 2025 at 12:07:34PM -0600, Nathan Bossart wrote: > Here's what I have staged for commit. I searche

pg_dump: Add ExecuteSqlCopy and simplify ExecuteSqlQuery

2025-12-16 Thread Corey Huinker
The thread about tablecmds.c being too large for some code inspection tooling got me thinking about ways to improve the second worst offender: pg_dump.c. Those investigations of mine haven't yet revealed a way to split the file that I find effective, let alone helpful. However, it has shown me a f

Re: Remaining dependency on setlocale()

2025-12-16 Thread Jeff Davis
On Tue, 2025-12-16 at 12:04 -0800, Jeff Davis wrote: > Probably a smaller case would do, but I think it requires page splits > to hit the bug. 0004 fixes the bug. Because it's a clear bug, I elected to backport 0004 to v18, where the casefolding APIs were introduced. It's a bug before that as well

Re: [PATCH] Allow complex data for GUC extra.

2025-12-16 Thread Robert Haas
On Mon, Dec 15, 2025 at 1:03 AM Bryan Green wrote: > TLDR; There is a possibility of GUCs using contexts that do not reset; > combined with a small window of opportunity this would lead to a leak > given correct timing. We could accept the leak risk, only allow extra > data as a context for PGC_US

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

2025-12-16 Thread Peter Smith
On Tue, Dec 16, 2025 at 7:39 PM Chao Li wrote: > > > > > On Dec 15, 2025, at 08:25, Peter Smith wrote: > > > > On Fri, Dec 12, 2025 at 12:32 PM Chao Li wrote: > >> > >> > >> > >>> On Dec 12, 2025, at 07:12, Jacob Champion > >>> wrote: > >>> > >>> On Thu, Dec 11, 2025 at 12:22 PM Peter Smith

Re: meson and check-tests

2025-12-16 Thread Andrew Dunstan
On 2025-12-08 Mo 3:12 AM, Bilal Yavuz wrote: Hi, On Mon, 1 Dec 2025 at 06:33, Ashutosh Bapat wrote: On Sun, Nov 30, 2025 at 11:39 PM Andrew Dunstan wrote: On 2025-11-27 Th 5:19 AM, Nazir Bilal Yavuz wrote: Hi, On Sat, 22 Nov 2025 at 01:16, Andrew Dunstan wrote: Committed Here is a small

Re: Periodic authorization expiration checks using GoAway message

2025-12-16 Thread Jacob Champion
On Tue, Dec 16, 2025 at 1:15 AM Ajit Awekar wrote: > >What I meant that we can already implement a background process that > >watches active (oauth) connections, and either: > > >Revalidates tokens periodically using introspection APIs > > +1 as this will offload validation logic to a dedicated b

Re: Periodic authorization expiration checks using GoAway message

2025-12-16 Thread Jacob Champion
On Tue, Dec 16, 2025 at 12:05 AM Zsolt Parragi wrote: > a. The user presses the "logout everywhere" button > b. The users permissions change > c. The user is deactivated (e.g. employee termination) > d. A security check invalidates the user's session > > From these four, I think graceful logout/co

Re: Remaining dependency on setlocale()

2025-12-16 Thread Jeff Davis
On Tue, 2025-12-16 at 09:32 +0800, Chao Li wrote: > I have re-reviewed 0003-0005 last week, they all look good to me. > > I have no comment on backport 0003. Committed 0003 and backported to 14. Committing 0004 also. For the archives, the bug in that case is: -- generate some randomly-cased n

Re: Periodic authorization expiration checks using GoAway message

2025-12-16 Thread Jacob Champion
On Mon, Dec 15, 2025 at 1:50 PM Jelte Fennema-Nio wrote: > What metadata > are you worried about changing mid transaction that could mess stuff > up? The primary one I can imagine is the username The HBA inputs can't be allowed to change; that's not what I'm worried about. The system_user might

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-16 Thread Noah Misch
On Tue, Dec 16, 2025 at 05:22:36PM +0530, vignesh C wrote: > On Tue, 16 Dec 2025 at 00:00, Noah Misch wrote: > > On Mon, Dec 15, 2025 at 11:35:35PM +0530, vignesh C wrote: > > > This issue has started failing after commit: > > > commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 > > > Sort dump objec

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

2025-12-16 Thread Jacob Champion
On Sun, Dec 14, 2025 at 3:13 AM Jonathan Gonzalez V. wrote: > > Okay, that's good to know. But I'm still missing how the end user (a > > human) trusts that magic CA within the browser or device they use to > > finish the actual flow? > > More than the end user "trusting" a "magic" CA, it's about w

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

2025-12-16 Thread Jacob Champion
On Fri, Dec 12, 2025 at 3:05 AM Zsolt Parragi wrote: > I implemented a simple patch based on the above suggestion > (PGOAUTHDEBUG=UNSAFE:http...). Thank you! > I added the new functions into a common source file which gets > included in both the oauth module and libpq. I'm not entirely happy > a

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

2025-12-16 Thread Robert Haas
On Tue, Dec 16, 2025 at 3:06 AM Chao Li wrote: > I guess you meant to say “larger (or greater) than” instead of “rather than”. Yes, thanks. -- Robert Haas EDB: http://www.enterprisedb.com

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

2025-12-16 Thread Nathan Bossart
On Tue, Dec 16, 2025 at 08:23:19AM -0500, Greg Burd wrote: > On Mon, Dec 15, 2025, at 6:08 PM, Andres Freund wrote: >> LGTM > > LGTM, thanks everyone. Here's what I have staged for commit. I searched around for anything else that might be missing, and I only found a couple of small things. Firs

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-16 Thread Christoph Berg
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 that the "touch all pages" logic is missing in some cod

Re: Replace is_publishable_class() with relispublishable column in pg_class

2025-12-16 Thread Andres Freund
Hi, On 2025-12-16 11:28:11 -0500, Andres Freund wrote: > On 2025-12-16 21:19:21 +0530, Dilip Kumar wrote: > > 2) As suggested by Amit Kpila [2], for the upcoming Conflict Log Table > > feature, we need a clean way to exclude these internal conflict log > > tables from publication. A catalog flag a

Re: Parallel query: Use TopTransactionContext for ReinitializeParallelDSM()

2025-12-16 Thread Robert Haas
On Wed, Dec 10, 2025 at 3:03 AM Jeevan Chalke wrote: > Although I was unable to reproduce the reported issue, a review of the code > flow confirms that to maintain consistency with all other Parallel Query > memory allocations, the context should be switched to TopTransactionContext. > This cha

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

2025-12-16 Thread Melanie Plageman
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 of the >> case where vacuum phase I sets the VM but no modifications ar

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

2025-12-16 Thread Srinath Reddy Sadipiralla
Hi Melanie, On Wed, Dec 10, 2025 at 11:21 PM Melanie Plageman wrote: > Hi, > > 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 of the > case where vacuum phase I sets the VM but no modifications are made to > the

Re: Replace is_publishable_class() with relispublishable column in pg_class

2025-12-16 Thread Andres Freund
Hi, On 2025-12-16 21:19:21 +0530, Dilip Kumar wrote: > Motivation > > 1) The check is performed frequently in the logical decoding path > (e.g., in pgoutput_change and pgoutput_truncate). Moving this to a > cached catalog attribute in pg_class allows for a simple check. You could solve t

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

2025-12-16 Thread Melanie Plageman
On Tue, Dec 16, 2025 at 7:18 AM Peter Eisentraut wrote: > > You are not modifying deadoffsets in prune_freeze_setup(), but you are > assigning its address to a pointer variable that is not const-qualified, > and so it could be used to modify it later on. > > A caller to prune_freeze_setup() that s

Re: Fix uninitialized PruneFreezeResult in pruneheap and vacuumlazy

2025-12-16 Thread Melanie Plageman
On Thu, Dec 11, 2025 at 5:37 PM Chao Li wrote: > > > On Dec 11, 2025, at 22:59, Melanie Plageman > > wrote: > > > > The reason PruneFreezeResult is passed into prune_freeze_setup() is > > that we save a pointer to the deadoffsets array in the PruneState > > instead of having a copy of the whole

Replace is_publishable_class() with relispublishable column in pg_class

2025-12-16 Thread Dilip Kumar
Hello hackers, I would like to propose an improvement to the way PostgreSQL determines if a relation is eligible for logical replication. Currently, this check is performed dynamically via is_publishable_class(), which relies on hard-coded OID checks and relkind. As noted in the existing comments

Re: relfilenode statistics

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

Re: amcheck: support for GiST

2025-12-16 Thread Paul A Jungwirth
Hello, On Wed, Oct 22, 2025 at 11:58 AM Kirill Reshke wrote: > > > 1) There are several typos in verify_gist.c: > > > > downlinks -> downlink (header comment) > > discrepencies -> discrepancies > > Correctess -> Correctness > > hande -> handle > > Initaliaze -> Initialize > > numbmer -> num

Re: Fix and improve allocation formulas

2025-12-16 Thread Peter Eisentraut
On 12.12.25 10:53, Michael Paquier wrote: On Thu, Dec 11, 2025 at 11:43:27AM -0500, Tom Lane wrote: And before that, you'd have to get consensus that sizeof(*var) *is* the preferred style. I for one don't like it a bit. IMO what it mostly accomplishes is to remove a cue as to what we are alloc

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-16 Thread Tomas Vondra
On 12/16/25 15:48, Christoph Berg wrote: > Re: To Tomas Vondra >> I've managed to reproduce it once, running this loop on >> 18-as-of-today. It errored out after a few 100 iterations: >> >> while psql -c 'SELECT COUNT(*) >= 0 AS ok FROM pg_shmem_allocations_numa'; >> do :; done >> >> 2025-12-16 11

Re: Queries that should be canceled will get stuck on secure_write function

2025-12-16 Thread Adrien Nayrat
On 8/23/21 10:15 AM, 蔡梦娟(玊于) wrote: Hi, all Recently, I got a problem that the startup process of standby is stuck and keeps in a waiting state. The backtrace of startup process shows that it is waiting for a backend process which conflicts with recovery processing to exit, the guc parameter

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

2025-12-16 Thread Andres Freund
Hi, On 2025-12-16 09:45:34 +, Bertrand Drouvot wrote: > On Tue, Dec 16, 2025 at 04:39:05PM +0900, Michael Paquier wrote: > > On Tue, Dec 16, 2025 at 06:49:13AM +, Bertrand Drouvot wrote: > > > While working on relfilenode statistics, Andres suggested that we pass > > > the Relation > > >

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-16 Thread Christoph Berg
Re: To Tomas Vondra > I've managed to reproduce it once, running this loop on > 18-as-of-today. It errored out after a few 100 iterations: > > while psql -c 'SELECT COUNT(*) >= 0 AS ok FROM pg_shmem_allocations_numa'; do > :; done > > 2025-12-16 11:49:35.982 UTC [621807] myon@postgres ERROR: in

Re: Proposal : Use bump memory context for temp buffers

2025-12-16 Thread Daniil Davydov
Hi, On Tue, Dec 16, 2025 at 8:51 PM Heikki Linnakangas wrote: > > On 16/12/2025 15:05, Daniil Davydov wrote: > > I think that it will be useful for temp buffers : > > 1) We allocate them lazily and never try to free them. > > 2) Some users are very active in working with temporary tables, and as

Re: [PATCH]Remove the redundant assignment

2025-12-16 Thread Heikki Linnakangas
On 16/12/2025 13:16, Dagfinn Ilmari Mannsåker wrote: A quick grep reveals a bunch of strncpy() calls followed by a '\0' assignment that could be replaced with strlcpy(): $ rg -A1 strncpy|rg -B1 "= '0';" src/interfaces/libpq/fe-secure-openssl.c: strncpy(buf, conn->sslpassword,

Running GSSAPI / Kerberos tests on Windows

2025-12-16 Thread Nazir Bilal Yavuz
Hi, I enabled GSSAPI on Windows CI by using dependencies from Dave Page's winpgbuild repository [1]. The problem is that Kerberos compilation does not generate the 'krb5-config' executable on Windows but we expect it while setting up KDC. Because of that, 'kerberos/001_auth' and 'libpq/005_negotia

Re: Proposal : Use bump memory context for temp buffers

2025-12-16 Thread Heikki Linnakangas
On 16/12/2025 15:05, Daniil Davydov wrote: Hi, Commit [1] introduced a new memory context suitable for situations when we should allocate a large amount of memory with no need to free or reallocate it. I think that it will be useful for temp buffers : 1) We allocate them lazily and never try to

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-16 Thread Heikki Linnakangas
Didn't know which part of this thread to quote and reply to, so I'll comment on the whole thing. This is a mix of a summary of the ideas already discussed, and a new proposal. Firstly, I think the STIR approach is the right approach at the high level. I don't like the logical decoding idea, fo

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

2025-12-16 Thread Chao Li
> On Dec 16, 2025, at 17:45, Bertrand Drouvot > wrote: > > Hi, > > On Tue, Dec 16, 2025 at 04:39:05PM +0900, Michael Paquier wrote: >> On Tue, Dec 16, 2025 at 06:49:13AM +, Bertrand Drouvot wrote: >>> While working on relfilenode statistics, Andres suggested that we pass the >>> Relatio

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

2025-12-16 Thread Arunprasad Rajkumar
Hello Amit, Yes, That's my understanding as well. > The behavior should be the same for both partition and inherited tables. I'm planning to tackle partition tables in the follow-up patch. What do you think? Thanks, Arun On Tue, 16 Dec 2025 at 15:04, Amit Kapila wrote: > On Tue, Dec 16, 2025

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

2025-12-16 Thread Greg Burd
On Mon, Dec 15, 2025, at 6:08 PM, Andres Freund wrote: > On December 15, 2025 6:00:47 PM EST, Nathan Bossart > wrote: >>Done. > > LGTM > -- Good morning Nathan, Andres, Thanks again to both of you for your help with this work. With the v11 patch on HEAD (b39013b7b1b) I was able to configur

Re: failed NUMA pages inquiry status: Operation not permitted

2025-12-16 Thread Christoph Berg
Re: Tomas Vondra > Hmmm, strange. -2 is ENOENT, which should mean this: > >-ENOENT > The page is not present. > > But what does "not present" mean in this context? And why would that be > only intermittent? Presumably this is still running in Docker, so maybe > it's another

Fix possible 'unexpected data beyond EOF' on replica restart

2025-12-16 Thread Anthonin Bonnefoy
Hi, On restart, a replica can fail with an 'unexpected data beyond EOF in block x of relation T/D/R' error. This happened on a PG17.7 and I've been able to reproduce it on PG 18. This can happen under the following circumstances: - A relation has a size of 400 blocks. - Blocks 201 to 400 are em

Proposal : Use bump memory context for temp buffers

2025-12-16 Thread Daniil Davydov
Hi, Commit [1] introduced a new memory context suitable for situations when we should allocate a large amount of memory with no need to free or reallocate it. I think that it will be useful for temp buffers : 1) We allocate them lazily and never try to free them. 2) Some users are very active in

Re: Error position support for ComputeIndexAttrs

2025-12-16 Thread Amul Sul
On Tue, Dec 16, 2025 at 12:51 PM jian he wrote: > > hi. > > Following the addition of error position support to ComputePartitionAttrs in > [0], we can extend this feature to ComputeIndexAttrs. > > Both partition keys and indexes support expressions and share a 32-column > limit, CREATE INDEX can b

[PATCH] Add regression test for aggregate NULL behavior

2025-12-16 Thread kateriny bispo
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 the pg_regress framework and follows the existing regression testing conventions. F

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

2025-12-16 Thread Greg Burd
On Mon, Dec 15, 2025, at 5:32 PM, Andres Freund wrote: > Hi, > > On 2025-12-15 15:38:49 -0600, Nathan Bossart wrote: >> +++ b/meson.build >> @@ -2523,7 +2523,8 @@ int main(void) >> } >> ''' >> >> - if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd >> without -march=arm

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

2025-12-16 Thread Greg Burd
On Mon, Dec 15, 2025, at 4:38 PM, Nathan Bossart wrote: > On Mon, Dec 15, 2025 at 12:27:25PM -0500, Greg Burd wrote: >> Got it, fixed in v9. > > I tried to rearrange the s_lock.h changes to make it more obvious what is > specific to AArch64. WDYT? Hey Nathan, thanks for taking another look and

Re: Make copyObject work in C++

2025-12-16 Thread Peter Eisentraut
On 05.12.25 15:46, Jelte Fennema-Nio wrote: Calling copyObject fails in C++ with an error like in most setups: error: use of undeclared identifier 'typeof'; did you mean 'typeid' This is due to the C compiler supporting used to compile postgres supporting typeof, but that function actually not

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

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

Re: amcheck: support for GiST

2025-12-16 Thread Andrey Borodin
Hi Miłosz and Sergey! Thanks a lot for reviewing this patch! > On 9 Dec 2025, at 23:54, Miłosz Bieniek wrote: > > Hi, > Together with Sergey we did a review and found a few things that need fixing: > > - `contrib/amcheck/amcheck--1.5--1.6.sql:14` - missing space after comma Fixed. > - `verif

Re: pg_dump crash due to incomplete ordering of DO_SUBSCRIPTION_REL objects

2025-12-16 Thread vignesh C
On Tue, 16 Dec 2025 at 00:00, Noah Misch wrote: > > On Mon, Dec 15, 2025 at 11:35:35PM +0530, vignesh C wrote: > > While verifying upgrade of subscriber instance, I noticed pg_dump > > crash caused by incomplete sorting logic for DO_SUBSCRIPTION_REL > > objects in DOTypeNameCompare(). When multipl

Re: [PATCH]Remove the redundant assignment

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

A small problem when rehashing catalog cache

2025-12-16 Thread cca5507
Hi, When we search catalog cache, we move the searched tuple to the front of the list: ``` /* * We found a match in the cache. Move it to the front of the list * for its hashbucket, in order to speed subsequent searches. (The

Change checkpoint‑record‑missing PANIC to FATAL

2025-12-16 Thread Nitin Jadhav
Hi, While working on [1], we discussed whether the redo-record-missing error should be a PANIC or a FATAL. We concluded that FATAL is more appropriate, as it is more appropriate for the current situation and achieves the intended behavior and also it is consistent with the backup_label path, which

Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array

2025-12-16 Thread Xuneng Zhou
Hi, On Tue, Dec 16, 2025 at 6:29 PM Xuneng Zhou wrote: > > On Mon, Nov 10, 2025 at 11:22 AM Xuneng Zhou wrote: > > > > Hi, > > > > With a sorted commited.xip array, we could replace the iteration with > > two binary searches to find the interval to keep. > > > > Proposed Optimization > > ---

Re: Optimize SnapBuild by maintaining committed.xip in sorted order

2025-12-16 Thread Xuneng Zhou
Hi, On Tue, Dec 16, 2025 at 6:20 PM Xuneng Zhou wrote: > > Hi, > > On Fri, Nov 7, 2025 at 12:55 PM Xuneng Zhou wrote: > > > > Hi hackers, > > > > I'd like to propose an optimization for logical decoding's snapshot building > > mechanism that eliminates repeated sorting overhead once a replicatio

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

2025-12-16 Thread Dharin Shah
Hello PG Hackers, Want to submit a patch that implements zstd compression for TOAST data using a 20-byte TOAST pointer format, directly addressing the concerns raised in prior discussions [1

Re: Fix crash during recovery when redo segment is missing

2025-12-16 Thread Michael Paquier
On Tue, Dec 16, 2025 at 03:31:58PM +0530, Nitin Jadhav wrote: > I would prefer to discuss this in a separate thread with a more > accurate subject line so we can get more opinions. Please let me know > if it is ok or you would rather continue the discussion here. Yes, let's do that. -- Michael s

Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array

2025-12-16 Thread Xuneng Zhou
On Mon, Nov 10, 2025 at 11:22 AM Xuneng Zhou wrote: > > Hi, > > With a sorted commited.xip array, we could replace the iteration with > two binary searches to find the interval to keep. > > Proposed Optimization > - > > Use binary search to locate the boundaries of XIDs to remo

Re: doc: create table improvements

2025-12-16 Thread Laurenz Albe
On Tue, 2025-12-16 at 10:14 +0800, Chao Li wrote: > > On Oct 23, 2025, at 12:43, Laurenz Albe wrote: > > > > Overall the change looks good to me. I have only one comment about the naming > of “oversize_storage”. Why not just “storage_parameters” or similar that > sounds more straightforward? "S

Re: relfilenode statistics

2025-12-16 Thread Bertrand Drouvot
Hi, On Tue, Dec 16, 2025 at 04:33:17PM +0900, Michael Paquier wrote: > > Hence, why don't we split PgStat_StatTabEntry into three things from > the start, even if it means to duplicate some of them? Say: > - Table fields: includes [auto]vacuum/analyze data, block fields, > fields of pg_stat_all_

Re: relfilenode statistics

2025-12-16 Thread Bertrand Drouvot
Hi, On Mon, Dec 15, 2025 at 12:48:25PM -0500, Andres Freund wrote: > On 2025-12-15 16:29:18 +, Bertrand Drouvot wrote: > > From 7908ba56cb8b6255b869af6be13077aa0315d5f1 Mon Sep 17 00:00:00 2001 > > I think this needs to make more explicit that this works because the object ID > now is a uint6

Re: Optimize SnapBuild by maintaining committed.xip in sorted order

2025-12-16 Thread Xuneng Zhou
Hi, On Fri, Nov 7, 2025 at 12:55 PM Xuneng Zhou wrote: > > Hi hackers, > > I'd like to propose an optimization for logical decoding's snapshot building > mechanism that eliminates repeated sorting overhead once a replication slot > reaches the CONSISTENT state. > > 1) Problem > > Currently, SnapB

Re: Proposal: Cascade REPLICA IDENTITY changes to leaf partitions

2025-12-16 Thread Amit Kapila
On Mon, Dec 15, 2025 at 12:44 PM Chao Li wrote: > > Thank you very much for the guidance. > > > On Dec 13, 2025, at 19:10, Amit Kapila wrote: > > > > On Fri, Dec 12, 2025 at 9:28 AM Chao Li wrote: > >> > >> Hi Amit, > >> > >> Thanks for pointing out that my assumption of “RI of parent is not use

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

2025-12-16 Thread Chao Li
> On Dec 16, 2025, at 17:45, Bertrand Drouvot > wrote: > > Hi, > > On Tue, Dec 16, 2025 at 04:39:05PM +0900, Michael Paquier wrote: >> On Tue, Dec 16, 2025 at 06:49:13AM +, Bertrand Drouvot wrote: >>> While working on relfilenode statistics, Andres suggested that we pass the >>> Relatio

Re: Fix crash during recovery when redo segment is missing

2025-12-16 Thread Nitin Jadhav
> An argument that would sound in favor of a switch from PANIC to FATAL > is the testing side: if one removes the segment where the checkpoint > record resides, we crash. Of course, one should not do that, but I > have been wondering for years if it would not be a good thing idea to > lift that a

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

2025-12-16 Thread Bertrand Drouvot
Hi, On Tue, Dec 16, 2025 at 04:39:05PM +0900, Michael Paquier wrote: > On Tue, Dec 16, 2025 at 06:49:13AM +, Bertrand Drouvot wrote: > > While working on relfilenode statistics, Andres suggested that we pass the > > Relation > > to pgstat_report_vacuum() (instead of the parameters inherited f

Re: Segmentation fault on proc exit after dshash_find_or_insert

2025-12-16 Thread Amit Langote
On Tue, Dec 16, 2025 at 6:29 PM Amit Langote wrote: > On Fri, Dec 5, 2025 at 1:03 AM Amit Langote wrote: > > On Fri, Dec 5, 2025 at 12:33 AM Andres Freund wrote: > > > On 2025-12-04 11:06:20 +0900, Amit Langote wrote: > > > > On Thu, Dec 4, 2025 at 12:33 AM Andres Freund > > > > wrote: > > > >

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

2025-12-16 Thread Amit Kapila
On Tue, Dec 16, 2025 at 9:21 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, December 16, 2025 7:28 AM Euler Taveira wrote: > > > > On Mon, Dec 15, 2025, at 3:57 AM, Amit Kapila wrote: > > > > > > I think the unlogged table is afterwards silently ignored during > > > replication. > > > > > > > The

Re: Segmentation fault on proc exit after dshash_find_or_insert

2025-12-16 Thread Amit Langote
On Fri, Dec 5, 2025 at 1:03 AM Amit Langote wrote: > On Fri, Dec 5, 2025 at 12:33 AM Andres Freund wrote: > > On 2025-12-04 11:06:20 +0900, Amit Langote wrote: > > > On Thu, Dec 4, 2025 at 12:33 AM Andres Freund wrote: > > > > I don't agree. You *cannot* rely on lwlocks working after an error >

Re: Skipping schema changes in publication

2025-12-16 Thread Shlok Kyal
On Thu, 11 Dec 2025 at 04:31, Peter Smith wrote: > > On Wed, Dec 10, 2025 at 4:49 AM Shlok Kyal wrote: > > > > On Mon, 24 Nov 2025 at 13:03, Peter Smith wrote: > > > > ... > > > 21. > > > I was wondering if the "describe" for tables (e.g. \d+) should also > > > show the publications where the ta

Re: Skipping schema changes in publication

2025-12-16 Thread Shlok Kyal
On Thu, 11 Dec 2025 at 04:10, Peter Smith wrote: > > Hi Shlok - > > Here are some review comments for v31-0001 (EXCEPT (tablelist)) > > == > Commit message > > 1. > The new syntax allows specifying excluded relations when creating or altering > a publication. For example: > CREATE PUBLICATION

Re: Periodic authorization expiration checks using GoAway message

2025-12-16 Thread Ajit Awekar
>What I meant that we can already implement a background process that >watches active (oauth) connections, and either: >Revalidates tokens periodically using introspection APIs +1 as this will offload validation logic to a dedicated background process. Thanks & Best Regards, Ajit On Tue, 16 De

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

2025-12-16 Thread Amit Kapila
On Tue, Dec 16, 2025 at 9:54 AM Joao Foltran wrote: > > Thank you for clarifying this behavior to me! I've tested it and it > really doesn't hold back wals anymore once it has been invalidated due > to the check inside ReplicationSlotsComputeRequiredLSN(). > > You are correct that simply letting t

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

2025-12-16 Thread Chao Li
> On Dec 15, 2025, at 08:25, Peter Smith wrote: > > On Fri, Dec 12, 2025 at 12:32 PM Chao Li wrote: >> >> >> >>> 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? >>

Re: [PATCH] Refactor bytea_sortsupport(), take two

2025-12-16 Thread John Naylor
On Thu, Nov 27, 2025 at 7:45 PM Aleksander Alekseev wrote: > > "Short byteas will have terminating NUL bytes in the abbreviated > > datum. Abbreviated comparison need not make a distinction between > > thse NUL bytes, and NUL bytes representing actual NULs in the > > authoritative representation.

Re: Periodic authorization expiration checks using GoAway message

2025-12-16 Thread Zsolt Parragi
> I think this is related to the async concern and the "what is a client > allowed to do before reauthentication" question. Yes, but my point was that I think the different situations (normally expired token, we most likely still have a valid refresh token vs token that was for some reason revoked

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

2025-12-16 Thread Chao Li
> On Dec 16, 2025, at 00:35, Robert Haas wrote: > > [ sorry for not noticing this thread sooner; thanks to Andres for > pointing me to it ] > > On Mon, Dec 15, 2025 at 9:01 AM Amul Sul wrote: >> Thanks for the reproducer; I can see the reported issue, but I am not >> quite sure the proposed

Re: Fix memory leak in tzparser.c

2025-12-16 Thread Michael Paquier
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 ParseTzFile() recursive calls when processing @INCLUDE > directives. >