Re: Adding REPACK [concurrently]

2025-12-02 Thread Antonin Houska
Mihail Nikalayeu wrote: > On Tue, Dec 2, 2025 at 5:14 PM Antonin Houska wrote: > > Not sure, cluster.sql already seems to do the same. > I think in the case of CONCURRENTLY it may behave a little bit > different, but not sure. > > > I miss the point. The current coding is such that this part >

domain for WITHOUT OVERLAPS

2025-12-02 Thread jian he
hi. While working on domain IS JSON, I found out that WITHOUT OVERLAPS does not support for domain too. but it does support user-defined range types (via CREATE TYPE). after looking around: check_exclusion_or_unique_constraint->ExecWithoutOverlapsNotEmpty ExecWithoutOverlapsNotEmpty typtype shoul

Re: Cleanup shadows variable warnings, round 1

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 14:42, Peter Smith wrote: > > Patch v2-0001. > > src/backend/backup/basebackup_incremental.c: > PrepareForIncrementalBackup: > > Instead of changing the var name from 'i' to 'u', you can fix this one > by changing all the for loops to declare 'i' within the 'for ('. > Th

Re: Cleanup shadows variable warnings, round 1

2025-12-02 Thread Peter Smith
Hi Chao. I always build with the shadow warnings enabled, so I am happy someone has taken up the challenge to try to clean them up. You probably found an old thread where I tried to do the same very thing several years ago/. I had fixed most of them in my local environment, but the thread became s

Re: Some optimizations for COALESCE expressions during constant folding

2025-12-02 Thread Richard Guo
On Mon, Dec 1, 2025 at 5:11 PM Richard Guo wrote: > Attached is the patch set rebased on current master. I have split the > patch into two parts: 0001 teaches eval_const_expressions to simplify > COALESCE arguments using NOT NULL constraints, and 0002 teaches > expr_is_nonnullable to handle COALE

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

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 13:54, Michael Paquier wrote: > > On Wed, Dec 03, 2025 at 01:41:44PM +0800, Chao Li wrote: >> Thanks for the patch, I do think the feature will be useful. After reading >> the patch, I got a concern on the design: >> >> This patch provides callbacks that requests (also a

RE: Newly created replication slot may be invalidated by checkpoint

2025-12-02 Thread Zhijie Hou (Fujitsu)
On Wednesday, December 3, 2025 12:26 AM Masahiko Sawada wrote: > > On Mon, Dec 1, 2025 at 10:19 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Tuesday, December 2, 2025 1:03 AM Masahiko Sawada > wrote: > > > > > > On Fri, Nov 21, 2025 at 12:14 AM Zhijie Hou (Fujitsu) > > > wrote: > > > > > > > >

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

2025-12-02 Thread Michael Paquier
On Wed, Dec 03, 2025 at 01:41:44PM +0800, Chao Li wrote: > Thanks for the patch, I do think the feature will be useful. After reading > the patch, I got a concern on the design: > > This patch provides callbacks that requests (also allows) custom > extensions to write stat files on their own beha

Re:Re: Add support for specifying tables in pg_createsubscriber.

2025-12-02 Thread tianbing
Hi, Peter, I have reviewed the v21 patch and noticed that there seems to be a memory leak. +static bool +check_publication_exists(PGconn *conn, const char *pubname, const char *dbname) +{ + PGresult *res; + bool exists; + char *query; + + query = psprintf("SELECT 1 FROM pg_publication WHERE pubn

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-02 Thread Amit Kapila
On Tue, Dec 2, 2025 at 8:30 PM Fujii Masao wrote: > > On Tue, Dec 2, 2025 at 9:08 PM Amit Kapila wrote: > > Is it possible that we append the predefined options to the options > > given by the user to avoid extra round-trip? > > One idea is to add a function, similar to libpqrcv_get_dbname_from_c

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

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 04:58, Sami Imseih wrote: > >>> Also, I am now leaning towards creating a separate test module rather than >>> trying to do too much unrelated testing in injection points. It is >>> definitely >>> convenient to use injection points, but I think we can do better testing >

Re: How can end users know the cause of LR slot sync delays?

2025-12-02 Thread Amit Kapila
On Fri, Nov 28, 2025 at 3:37 PM Michael Banck wrote: > > Hi, > > On Fri, Nov 28, 2025 at 03:30:48PM +0530, Amit Kapila wrote: > > I suggested the current one because having the last was making the > > column name bit longer, and anyway the description clarifies it, but I > > see your point. So, th

Re: Resetting recovery target parameters in pg_createsubscriber

2025-12-02 Thread Michael Paquier
On Wed, Nov 19, 2025 at 02:49:29PM -0500, Robert Haas wrote: > On Thu, Nov 13, 2025 at 7:46 AM Alena Vinter wrote: >> The root cause is that `pg_createsubscriber` leaves behind recovery >> parameters that interfere with the new standby's startup process, >> causing recovery to stop before reaching

Re: Resetting recovery target parameters in pg_createsubscriber

2025-12-02 Thread Michael Paquier
On Tue, Nov 25, 2025 at 01:45:56PM +0700, Alena Vinter wrote: > It seems my previous message isn't visible in the thread. I can see > Robert's reply, but not the original message he was responding to. I'm > resending the message and all attachments to ensure it's saved in the > thread. I don't und

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

2025-12-02 Thread Japin Li
On Tue, 02 Dec 2025 at 19:27, Ajin Cherian wrote: > On Fri, Nov 28, 2025 at 5:03 PM Japin Li wrote: >> >> 1. >> Initialize slot_persistence_pending to false (to avoid uninitialized values, >> or >> initialize to true by mistaken) in update_and_persist_local_synced_slot(). >> This >> aligns with

Re: Extended Statistics set/restore/clear functions.

2025-12-02 Thread Michael Paquier
On Wed, Nov 26, 2025 at 03:21:46AM -0600, Corey Huinker wrote: > There was a debate about whether statistics were data or not, and I'd > rather not restart that, so I went with PREPQUERY_DUMPEXTSTATSOBJSTATS for > now. > > Incorporated these fixes, and some other lessons learned. I've managed to

Re: Index functions and INDEX_CREATE_SKIP_BUILD

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 09:07:54AM +0100, Antonin Houska wrote: > I'm just wondering if these measures regarding GUCs and security context are > necessary at this place. I think that no index functions should be called if > we only create the catalog entry for the index, but I may be mistaken. See

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-02 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > Pushed this one also, and marked the commitfest item as committed. BF member prion has been failing since 5dee7a603 went in. Apparently that solution doesn't work under -DRELCACHE_FORCE_RELEASE and/or -DCATCACHE_FORCE_RELEASE (so I'm expecting the CLOBBE

Re: Proposal: Conflict log history table for Logical Replication

2025-12-02 Thread shveta malik
On Tue, Dec 2, 2025 at 8:40 PM Dilip Kumar wrote: > > On Tue, Dec 2, 2025 at 4:45 PM Dilip Kumar wrote: > > > > On Tue, Dec 2, 2025 at 2:47 PM Amit Kapila wrote: > > > > > > On Tue, Dec 2, 2025 at 12:38 PM Dilip Kumar wrote: > > > > > > > > On Tue, Dec 2, 2025 at 12:06 PM Dilip Kumar > > > >

Re: Refactor how we form HeapTuples for CatalogTuple(Insert|Update)

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 10:21:36AM -0500, Greg Burd wrote: > On Dec 2 2025, at 2:09 am, Michael Paquier wrote: > Thanks for taking the time to review this chunky patch. I've been > quietly reworking it a bit, I'll go over that in a bit because I'd > appreciate opinions before I'm too far into the

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

2025-12-02 Thread shveta malik
On Wed, Dec 3, 2025 at 8:51 AM Ajin Cherian wrote: > > On Tue, Dec 2, 2025 at 8:35 PM shveta malik wrote: > > > > On Tue, Dec 2, 2025 at 1:58 PM Ajin Cherian wrote: > > > > > > > > > Attached patch v27 addresses the above comments. > > > > > > > Thanks for the patch. Please find a few comments:

Re: Skipping schema changes in publication

2025-12-02 Thread shveta malik
On Wed, Nov 19, 2025 at 3:34 PM Shlok Kyal wrote: > > > I have also addressed the comments in [1], [2]. > > [1]: > https://www.postgresql.org/message-id/CAHut%2BPtRzCD4-0894cutkU_h8cPNtosN0_oSHn2iAKEfg2ENOQ%40mail.gmail.com > [2]: > https://www.postgresql.org/message-id/CAHut+PuHn-hohA4OdEJz+Zfu

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

2025-12-02 Thread Ajin Cherian
On Tue, Dec 2, 2025 at 8:35 PM shveta malik wrote: > > On Tue, Dec 2, 2025 at 1:58 PM Ajin Cherian wrote: > > > > > > Attached patch v27 addresses the above comments. > > > > Thanks for the patch. Please find a few comments: > > 1) > + /* The worker pid must not be already assigned in SlotSyncCtx

Re: Returning nbtree posting list TIDs in DESC order during backwards scans

2025-12-02 Thread Peter Geoghegan
On Sun, Jul 27, 2025 at 9:43 AM Andy Fan wrote: > At last, I can get the same test result as you. The buffer hits go back to > 23 in the test case, thank for working on this! > > > I think that this patch isn't too far off being committable. > > I think so. Coming back to this patch now, after se

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

2025-12-02 Thread Andres Freund
Hi, On 2025-12-02 20:12:14 -0500, Peter Geoghegan wrote: > On Tue, Dec 2, 2025 at 7:47 PM 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 th

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

2025-12-02 Thread Peter Geoghegan
On Tue, Dec 2, 2025 at 7:47 PM 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

Re: PG version is not seen in pg_upgrade test log

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 11:22:36AM +0100, Daniel Gustafsson wrote: > This seems like a correct change, reading the history around this code makes > it > seem like it just happened to end up in the wrong place in one of many > refactorings. Indeed. It looks like this should be backpatched down to

Re: Consistently use palloc_object() and palloc_array()

2025-12-02 Thread Tom Lane
Michael Paquier writes: > It may be a good idea to split the patch into two parts, at least: > - One for the bulk of the changes, for the straight-forward changes. > Most of what you are suggesting are that for palloc_object and > palloc_array which are dropped-in replacements. Checking that thes

Re: Consistently use palloc_object() and palloc_array()

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 04:13:01PM +0100, David Geier wrote: > So reviewing this patch can now be done by only going through all files > that have changes in the disassembly. This is only 54 out of which most > are because of changes in the number of LOC or where the brackets are > placed. It may

Re: Add support for specifying tables in pg_createsubscriber.

2025-12-02 Thread Peter Smith
On Mon, Dec 1, 2025 at 9:48 AM Peter Smith wrote: > > Hi Shubham. > > Some minor review comments for v20-0001. > > == > 1. > +# Test publication reuse and creation behavior with --dry-run. > +# This should reuse existing 'test_pub_existing' and create new > 'test_pub_new', > +# demonstrating

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

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 02:58:32PM -0600, Sami Imseih wrote: > By "template" code, do you mean Something like? > > include/utils/custom_statkinds.h > backend/utils/misc/custom_statkinds.c > > Where the template code here is PgStat_kind definition, callbacks, etc. for > injection_points or the new

Re: pgindent versus struct members and typedefs

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 07:13, Tom Lane wrote: > > Chao Li writes: >>> On Dec 3, 2025, at 06:51, Tom Lane wrote: >>> In this case, I think pgindent is indirectly enforcing good style. >>> I do not like omitting braces around anything that's more than one >>> line; readers have to pay close atte

Re: pgindent versus struct members and typedefs

2025-12-02 Thread Tom Lane
Chao Li writes: >> On Dec 3, 2025, at 06:51, Tom Lane wrote: >> In this case, I think pgindent is indirectly enforcing good style. >> I do not like omitting braces around anything that's more than one >> line; readers have to pay close attention to whether the code is >> doing what it was intende

Re: pgindent versus struct members and typedefs

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 06:51, Tom Lane wrote: > > Chao Li writes: >> On Dec 3, 2025, at 06:00, Nathan Bossart wrote: >>> I tried to fix pgindent for a few, but the code is basically impenetrable. >>> I didn't find any fixes upstream [0], either. As noted above, we could >>> also fix it by avo

Re: pgindent versus struct members and typedefs

2025-12-02 Thread Tom Lane
Chao Li writes: > On Dec 3, 2025, at 06:00, Nathan Bossart wrote: >> I tried to fix pgindent for a few, but the code is basically impenetrable. >> I didn't find any fixes upstream [0], either. As noted above, we could >> also fix it by avoiding the naming conflicts. However, I can't imagine >>

Re: pgindent versus struct members and typedefs

2025-12-02 Thread Chao Li
> On Dec 3, 2025, at 06:00, Nathan Bossart wrote: > > On Mon, Dec 01, 2025 at 05:04:23PM -0600, Nathan Bossart wrote: >> On Tue, Dec 02, 2025 at 05:35:34AM +0800, Chao Li wrote: >>> ``` >>> + else if (entry->type == DSMR_ENTRY_TYPE_DSH && >>> + entry->dsh.dsa_handle !=DSA_HANDLE_INVALID) >>> `

Re: use LW_SHARED in dsa_get_total_size()

2025-12-02 Thread Nathan Bossart
On Tue, Dec 02, 2025 at 12:41:15PM -0600, Sami Imseih wrote: > I think this is a good idea. Exclusive here is not necessarily for the > size lookups. Committed, thanks for reviewing. -- nathan

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

2025-12-02 Thread Peter Smith
On Mon, Dec 1, 2025 at 4:50 PM Masahiko Sawada wrote: > > On Thu, Nov 27, 2025 at 12:33 AM Peter Smith wrote: > > > > Hi Sawada-San. > > > > Some review comments for v30-0001. > > Thank you for the comments! > > > == > > src/backend/replication/logical/logicalctl.c > > > > 6b. > > Would it be

pgindent versus struct members and typedefs

2025-12-02 Thread Nathan Bossart
On Mon, Dec 01, 2025 at 05:04:23PM -0600, Nathan Bossart wrote: > On Tue, Dec 02, 2025 at 05:35:34AM +0800, Chao Li wrote: >> ``` >> +else if (entry->type == DSMR_ENTRY_TYPE_DSH && >> + entry->dsh.dsa_handle !=DSA_HANDLE_INVALID) >> ``` >> >> Missing a white

Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement

2025-12-02 Thread Florin Irion
Hello, On 20/11/25 07:55, Man Zeng wrote: Quick correction with an apology: I accidentally created a new thread (https://www.postgresql.org/message-id/tencent_64301BB7627E58CD256CE15F%40qq.com) and submitted the patch there—my apologies for the mix-up! Let’s just continue the discussion here

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

2025-12-02 Thread Sami Imseih
> > Also, I am now leaning towards creating a separate test module rather than > > trying to do too much unrelated testing in injection points. It is > > definitely > > convenient to use injection points, but I think we can do better testing > > with > > a separate module. This module can also se

Re: Remove useless pointer advance in StatsShmemInit()

2025-12-02 Thread Andres Freund
Hi, On 2025-12-02 07:40:44 +, Bertrand Drouvot wrote: > From 2fefb69f1462ce1057bb5c3d07ed70c769ec961a Mon Sep 17 00:00:00 2001 > From: Bertrand Drouvot > Date: Sat, 22 Nov 2025 14:47:25 + > Subject: [PATCH v1] Remove useless pointer updates > > Same idea as in commit 9b7eb6f02e8. Those p

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Andres Freund
Hi, On 2025-12-02 21:39:42 +0200, Heikki Linnakangas wrote: > On 02/12/2025 21:13, Melanie Plageman wrote: > > In terms of finding some XID to set it to, could we do what updates > > and deletes do and use the XLogRecord->xl_xid? > > A prune record can have XLogRecord->xl_xid == InvalidTransactio

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 21:13, Melanie Plageman wrote: In terms of finding some XID to set it to, could we do what updates and deletes do and use the XLogRecord->xl_xid? A prune record can have XLogRecord->xl_xid == InvalidTransactionId, if the transaction hasn't been assigned a transaction ID yet. I th

Re: Early December Commitfest app release

2025-12-02 Thread Jelte Fennema-Nio
On Tue, 11 Nov 2025 at 11:12, Jelte Fennema-Nio wrote: > 1. Add a "Requeue CFBot" button to the patch page when logged in > 2. Allow using all the filtering (by tag/author/etc) on the global > search page too > 3. Make user dropdowns searchable when not logged in > 4. Fix a few typos This is depl

Re: Bug in amcheck?

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 19:59, Peter Geoghegan wrote: On Mon, Dec 1, 2025 at 4:20 PM Heikki Linnakangas wrote: Summary of the patches: Patch 0001 adds an injection point test for incomplete splits. We already had such a test for GIN, which handles incomplete splits the same way as B-tree. I copy-pasted

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Melanie Plageman
On Tue, Dec 2, 2025 at 1:41 PM Andres Freund wrote: > > On December 2, 2025 1:23:57 PM EST, Melanie Plageman > wrote: > > >What about on-access pruning during SELECT queries on a hot standby? > > There's no on-access-pruning on the hot standby itself, it'd lead to > divergence between primary a

Re: Minor LLVM cleanups

2025-12-02 Thread Matheus Alcantara
Hi, I did a quick look at the patches and here are my comments. On Fri Nov 28, 2025 at 12:41 AM -03, Thomas Munro wrote: > 0001: These days we handle LLVM API evolution with LLVM_VERSION_MAJOR > guards. These GDB and Perf support probes escaped recent garbage > collection cycles by not being phr

Re: use LW_SHARED in dsa_get_total_size()

2025-12-02 Thread Sami Imseih
> On Tue, Dec 02, 2025 at 10:31:33AM -0600, Nathan Bossart wrote: > > On Tue, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote: > >> Thank you for highlighting the discussions. I'm unsure about the best > >> approach here, but I think it would be safe to stay consistent with the > >> rest of the

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Andres Freund
Hi, On December 2, 2025 1:23:57 PM EST, Melanie Plageman wrote: >On Tue, Dec 2, 2025 at 12:49 PM Heikki Linnakangas wrote: >> >> Hmm. If the page has no prunable tuples left, it makes sense to set >> pd_prune_xid to InvalidTransactionId to avoid the useless round of >> pruning. In other cases,

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Melanie Plageman
On Tue, Dec 2, 2025 at 12:49 PM Heikki Linnakangas wrote: > > Hmm. If the page has no prunable tuples left, it makes sense to set > pd_prune_xid to InvalidTransactionId to avoid the useless round of > pruning. In other cases, it would make sense to set it to some XID so > that it gets pruned later

Re: Bug in amcheck?

2025-12-02 Thread Peter Geoghegan
On Mon, Dec 1, 2025 at 4:20 PM Heikki Linnakangas wrote: > Ok, here's a proper patch with tests. The patch itself is the above > one-liner. It's in patch 0004. > > While testing this, I bumped into another similar amcheck bug: if the > root page split is interrupted, verify_btree() complains: > >

Re: All-visible pages with valid prune xid are confusing

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 18:20, Melanie Plageman wrote: Hi, We currently do not set pd_prune_xid (the oldest prunable XID) when replaying XLOG_HEAP2_PRUNE* records. We've never done this, AFAICT. Since 8.3, this comment has been in the pruning redo function: * Note: we don't worry about updating the

use LW_SHARED in dsa_get_total_size()

2025-12-02 Thread Nathan Bossart
On Tue, Dec 02, 2025 at 10:31:33AM -0600, Nathan Bossart wrote: > On Tue, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote: >> Thank you for highlighting the discussions. I'm unsure about the best >> approach here, but I think it would be safe to stay consistent with the >> rest of the code in d

Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations

2025-12-02 Thread Nathan Bossart
On Tue, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote: > Thank you for highlighting the discussions. I'm unsure about the best > approach here, but I think it would be safe to stay consistent with the > rest of the code in dsa.c, especially since it's unclear that the use of > LW_EXCLUSIVE fo

Re: Newly created replication slot may be invalidated by checkpoint

2025-12-02 Thread Masahiko Sawada
On Mon, Dec 1, 2025 at 10:19 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, December 2, 2025 1:03 AM Masahiko Sawada > wrote: > > > > On Fri, Nov 21, 2025 at 12:14 AM Zhijie Hou (Fujitsu) > > wrote: > > > > > > OK, I think it makes sense to start separate threads. > > > > > > I have split the p

Re: Adding REPACK [concurrently]

2025-12-02 Thread Mihail Nikalayeu
Hi! On Tue, Dec 2, 2025 at 5:14 PM Antonin Houska wrote: > Not sure, cluster.sql already seems to do the same. I think in the case of CONCURRENTLY it may behave a little bit different, but not sure. > I miss the point. The current coding is such that this part I mean call it periodically in both

All-visible pages with valid prune xid are confusing

2025-12-02 Thread Melanie Plageman
Hi, We currently do not set pd_prune_xid (the oldest prunable XID) when replaying XLOG_HEAP2_PRUNE* records. We've never done this, AFAICT. Since 8.3, this comment has been in the pruning redo function: * Note: we don't worry about updating the page's prunability hints. * At worst this w

Re: Adding REPACK [concurrently]

2025-12-02 Thread Antonin Houska
Mihail Nikalayeu wrote: > Hello, Antonin! > > On Mon, Nov 3, 2025 at 8:56 AM Antonin Houska wrote: > > I'll fix all the problems in the next version. Thanks! > > A few more moments I mentioned: > > > switch ((vis = HeapTupleSatisfiesVacuum(tuple, OldestXmin, buf))) > vis is unused, also to do

increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-02 Thread Tomas Vondra
Hi, I have two buildfarm animals running tests with -DCLOBBER_CACHE_ALWAYS, and both of them started having issues with timeouts Last file mtime in snapshot: Sat Nov 29 21:41:49 2025 GMT === timed out after 14400 secs The animals are avocet a

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-02 Thread Mihail Nikalayeu
Hello, Álvaro! > Maybe now would be a good time to dust off your > stress tests and verify that everything is still working as intended. Done, passing without any issues. > I bet we can make this visible in a profile with an > inheritance hierarchy not terribly deep and a few hundred partitions.

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

2025-12-02 Thread Masahiko Sawada
On Tue, Dec 2, 2025 at 2:53 AM vignesh C wrote: > > On Mon, 1 Dec 2025 at 12:33, Masahiko Sawada wrote: > > > > On Mon, Dec 1, 2025 at 12:20 AM Masahiko Sawada > > wrote: > > > > I've attached the patch. All the comments I got so far have been > > addressed in this version unless I'm missing so

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-02 Thread Álvaro Herrera
> From 5dc3e4eb50e445a291a13663fc9ce93d0db96b1c Mon Sep 17 00:00:00 2001 > From: Mikhail Nikalayeu > Date: Sun, 30 Nov 2025 16:49:20 +0100 > Subject: [PATCH v16 2/3] Revert "Doc: cover index CONCURRENTLY causing errors > in INSERT ... ON CONFLICT." > > This reverts commit 8b18ed6dfbb8b3e4483801b

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-02 Thread Álvaro Herrera
On 2025-Dec-01, Mihail Nikalayeu wrote: > I think I have implemented a better solution - without any additional NOTICE. > It just actually waits for the other backend to hang on the injection point. Pushed. I changed it to be a loop in a DO block rather than a procedure recursively calling itsel

Re: Refactor how we form HeapTuples for CatalogTuple(Insert|Update)

2025-12-02 Thread Greg Burd
On Dec 2 2025, at 2:09 am, Michael Paquier wrote: > On Fri, Nov 14, 2025 at 10:31:28AM -0500, Greg Burd wrote: >> Catalog tuples have knowledge of what attributes are mutated implicitly, >> but they don't preserve that information and so >> HeapDetermineColumnsInfo() has to re-discover that lat

Re: Consistently use palloc_object() and palloc_array()

2025-12-02 Thread David Geier
On 28.11.2025 23:31, Thomas Munro wrote: > On Sat, Nov 29, 2025 at 10:47 AM David Geier wrote: >> I intentionally tried to avoid any semantic changes but it's of course >> possible something slipped through by accident. > > Do you expect the generated code to be identical? Is it? In the majorit

Re: Proposal: Conflict log history table for Logical Replication

2025-12-02 Thread Dilip Kumar
On Tue, Dec 2, 2025 at 4:45 PM Dilip Kumar wrote: > > On Tue, Dec 2, 2025 at 2:47 PM Amit Kapila wrote: > > > > On Tue, Dec 2, 2025 at 12:38 PM Dilip Kumar wrote: > > > > > > On Tue, Dec 2, 2025 at 12:06 PM Dilip Kumar wrote: > > > > > > > > > > > > Okay, I will try to make multiple local rows

Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT

2025-12-02 Thread jian he
On Wed, Nov 19, 2025 at 1:01 AM Tom Lane wrote: > > jian he writes: > > [ v1-0001-IS-JSON-predicate-work-with-domain-type.patch ] > > This looks like a large patch with a small patch struggling to > get out of it. Why didn't you simply do > > - *exprtype = exprType(expr); > + *exprty

Re: foreign key on virtual generated column

2025-12-02 Thread Srinath Reddy Sadipiralla
Hi Jian, while continuing my review , i observed these: 1) if we have multiple virtual generated columns in table, and foreign key on a virtual generated column, during RI check in RI_FKey_check, i observed that we are computing other virtual generated columns which are not part of foreign key,wh

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-02 Thread Fujii Masao
On Tue, Dec 2, 2025 at 9:08 PM Amit Kapila wrote: > Is it possible that we append the predefined options to the options > given by the user to avoid extra round-trip? One idea is to add a function, similar to libpqrcv_get_dbname_from_conninfo() in libpqwalreceiver.c, that extracts the options str

Re: POC: make mxidoff 64 bits

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 16:11, Alexander Korotkov wrote: I'd like to raise the question about compression again. You have fairly criticized non-deterministic compression, but what do you think about deterministic one that I've proposed [1]. I understand that multixact offsets are subject of growth and th

Fix PrivateRefCount hash table key size

2025-12-02 Thread Bertrand Drouvot
Hi hackers, While working on [1], I noticed that there is a type mismatch when computing the key size for the PrivateRefCount hash table. Indeed, the first PrivateRefCountEntry member type is Buffer (int), so the keysize should be sizeof(Buffer) and not sizeof(int32). PFA attached a patch to fix

Re: Remove useless casting to the same type

2025-12-02 Thread Bertrand Drouvot
Hi, On Mon, Dec 01, 2025 at 09:50:43AM -0800, Jacob Champion wrote: > Fine by me. Thanks for the review! > Thanks for this cleanup work! That's fun and useful to do! Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.co

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-12-02 Thread Bertrand Drouvot
Hi, On Tue, Dec 02, 2025 at 08:44:28AM +0100, Peter Eisentraut wrote: > On 01.12.25 08:14, Bertrand Drouvot wrote: > > Hi, > > > > On Tue, Nov 18, 2025 at 04:54:32PM +0100, Peter Eisentraut wrote: > > > I mean, some people like writing if (!foo) and some like writing if > > > (foo == NULL), but w

Re: Remove unused function parameters, part 2: replication

2025-12-02 Thread Bertrand Drouvot
Hi, On Tue, Dec 02, 2025 at 09:31:34AM +0100, Daniel Gustafsson wrote: > > On 2 Dec 2025, at 08:32, Michael Paquier wrote: > > > Simple example I have seen in the past: a Relation argument not used > > (I think there has been at least one such example in tablecmds.c, > > whatever). Removing thi

Re: Remove unused function parameters, part 2: replication

2025-12-02 Thread Bertrand Drouvot
Hi, On Tue, Dec 02, 2025 at 04:32:09PM +0900, Michael Paquier wrote: > On Mon, Dec 01, 2025 at 06:49:25AM +, Bertrand Drouvot wrote: > > We can still continue to fix them when we cross them "accidentally". > > > > That said, it somehow sounds weird to wait to cross them accidentally > > know

Re: POC: make mxidoff 64 bits

2025-12-02 Thread Alexander Korotkov
Hi, Heikki! On Tue, Nov 25, 2025 at 12:07 PM Heikki Linnakangas wrote: > Looking at the upgrade code, in light of the "IPC/MultixactCreation on > the Standby server" thread [1], I think we need to make it more > tolerant. It's possible that there are 0 offsets in > pg_multixact/offsets. That migh

Re: IPC/MultixactCreation on the Standby server

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 15:44, Andrey Borodin wrote: On 1 Dec 2025, at 20:29, Andrey Borodin wrote: I'm looking through patchsets. I'll look in the morning with fresh eyes. So far I have no findings. I also tried to stress-test v14. I assumed that if regression slipped in, most probably it is inherite

Re: IPC/MultixactCreation on the Standby server

2025-12-02 Thread Andrey Borodin
> On 1 Dec 2025, at 20:29, Andrey Borodin wrote: > > I'm looking through patchsets. I'll look in the morning with fresh eyes. So far I have no findings. I also tried to stress-test v14. I assumed that if regression slipped in, most probably it is inherited by 14 from higher versions. I used

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

2025-12-02 Thread Heikki Linnakangas
On 02/12/2025 15:20, Andres Freund wrote: On 2025-12-02 10:01:06 +0200, Heikki Linnakangas wrote: But speaking of that: why do we not allow two processes to concurrently set hint bits on a page anymore? It'd make the locking a lot more complicated without much of a benefit. The new share-excl

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

2025-12-02 Thread Andres Freund
Hi, On 2025-12-02 10:01:06 +0200, Heikki Linnakangas wrote: > On 25/11/2025 22:46, Andres Freund wrote: > > > > > diff --git a/src/backend/storage/freespace/fsmpage.c > > > > > b/src/backend/storage/freesp> > > > > > /* > > > > > * Update the next-target pointer. Note that we do this even if we're

Re: Non-text mode for pg_dumpall

2025-12-02 Thread tushar
On Mon, Dec 1, 2025 at 10:47 PM tushar wrote: > >> > I have observed that when combining the --globals-only option with certain > other switches during a pg_restore - operation fails silently. > The attempted restore does not execute, but no error message or warning is > displayed unless the --ve

Re: Proposal: Support Logical replication of large objects

2025-12-02 Thread Bernd Helmle
Am Montag, dem 01.12.2025 um 09:27 +0530 schrieb Dilip Kumar: > The decoder will then translate the standard single-row > insert/update WAL records generated for the internal pg_largeobject > table rows into logical operations formatted as LOWRITE: OID, OFFSET, > DATA, LENGTH, where the OFFSET is c

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-02 Thread Álvaro Herrera
On 2025-Dec-01, Mihail Nikalayeu wrote: > From af5e27d4150dd53d313122c02da7ce4d3c07f332 Mon Sep 17 00:00:00 2001 > From: Mikhail Nikalayeu > Date: Sun, 30 Nov 2025 16:48:55 +0100 > Subject: [PATCH v16 1/3] Modify the ExecInitPartitionInfo function to consider > partitioned indexes that are pote

Custom oauth validator options

2025-12-02 Thread Zsolt Parragi
Hello hackers, The current OAuth code allows validators to add custom validation logic, but does not allow them to introduce custom authentication-related parameters in the place where they belong: pg_hba.conf. As a workaround, both pg_oidc_validator and postgres-keycloak-oauth-validator (and like

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

2025-12-02 Thread Chengpeng Yan
Hi, > On Dec 2, 2025, at 18:56, Tomas Vondra wrote: > > I think a much broader evaluation will be needed, comparing not just the > planning time, but also the quality of the final plan. Which for the > starjoin tests does not really matter, as the plans are all equal in > this regard. Many t

Re: Adding basic NUMA awareness

2025-12-02 Thread Jakub Wartak
On Wed, Nov 26, 2025 at 5:19 PM Tomas Vondra wrote: > Rebased patch series attached. Thanks. BTW still with the old patchset series, One additional thing that I've found out related to interleave is that in CreateAnonymousSegment() with the default check_debug='', we still issue numa_interleave_

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-02 Thread Amit Kapila
On Tue, Nov 18, 2025 at 9:29 PM Fujii Masao wrote: > > In logical replication, any GUC settings specified in the CONNECTION clause of > CREATE SUBSCRIPTION are currently ignored. For example: > > CREATE SUBSCRIPTION mysub > CONNECTION 'options=''-c wal_sender_timeout=1000''' >

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-02 Thread Matthias van de Meent
On Fri, 28 Nov 2025 at 20:08, Hannu Krosing wrote: > > On Fri, Nov 28, 2025 at 7:31 PM Matthias van de Meent > wrote: > > > > On Fri, 28 Nov 2025 at 18:58, Hannu Krosing wrote: > > > > > > On Fri, Nov 28, 2025 at 5:58 PM Matthias van de Meent > > > wrote: > > > > > > > ... > > > > I'm a bit wor

Re: [PATCH] Add error hints for invalid COPY options

2025-12-02 Thread Sugamoto Shinya
On Sat, Nov 29, 2025 at 9:36 PM Sugamoto Shinya wrote: > > > On Fri, Nov 28, 2025 at 2:59 AM Kirill Reshke > wrote: > >> On Wed, 26 Nov 2025 at 11:55, Sugamoto Shinya >> wrote: >> > >> > >> > >> > 2025年11月25日(火) 6:50 Nathan Bossart : >> >> >> >> On Mon, Nov 24, 2025 at 11:56:34AM -0800, Masahik

Re: Proposal: Conflict log history table for Logical Replication

2025-12-02 Thread Dilip Kumar
On Tue, Dec 2, 2025 at 2:47 PM Amit Kapila wrote: > > On Tue, Dec 2, 2025 at 12:38 PM Dilip Kumar wrote: > > > > On Tue, Dec 2, 2025 at 12:06 PM Dilip Kumar wrote: > > > > > > > > > Okay, I will try to make multiple local rows as JSON Array in the next > > > version. > > > > > Just to clarify s

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-02 Thread Matthias van de Meent
On Tue, 2 Dec 2025 at 11:27, Mihail Nikalayeu wrote: > > Hello, Antonin! > > On Tue, Dec 2, 2025 at 8:28 AM Antonin Houska wrote: > > I suppose you don't want to use logical decoding for CIC, do you? How can > > then > > it be "the same" like in REPACK (CONCURRENTLY)? Or do you propose to rework

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

2025-12-02 Thread Tomas Vondra
On 12/2/25 04:48, Chengpeng Yan wrote: > Hi hackers, > > This patch implements GOO (Greedy Operator Ordering), a greedy > join-order search method for large join problems, based on Fegaras (DEXA > ’98) [1]. The algorithm repeatedly selects, among all legal joins, the > join pair with the lowest es

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-02 Thread Matthias van de Meent
On Mon, 1 Dec 2025 at 10:09, Antonin Houska wrote: > > Matthias van de Meent wrote: > > > I'm a bit worried, though, that LR may lose updates due to commit > > order differences between WAL and PGPROC. I don't know how that's > > handled in logical decoding, and can't find much literature about i

Re: oid2name : add objects file path

2025-12-02 Thread David Bidoc
> Hi David, Hi Guillaume, > I just looked at the commit fest entry and the bot says your patch needs > a rebase. Can you do it? Thanks. I attached the rebased patch. Any feedback would be appreciated. Regards. On Wed, Nov 26, 2025 at 9:02 PM Guillaume Lelarge wrote: > > Hi David, > > I just l

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-02 Thread Mihail Nikalayeu
Hello, Antonin! On Tue, Dec 2, 2025 at 8:28 AM Antonin Houska wrote: > I suppose you don't want to use logical decoding for CIC, do you? How can then > it be "the same" like in REPACK (CONCURRENTLY)? Or do you propose to rework > REPACK (CONCURRENTLY) from scratch so that it does not use logical

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

2025-12-02 Thread Chengpeng Yan
Hi, Thanks for taking a look. > On Dec 2, 2025, at 13:36, Dilip Kumar wrote: > > Is pgbench the right workload to test this, I mean what are we trying > to compare here the planning time taken by DP vs GEQO vs GOO or the > quality of the plans generated by different join ordering algorithms > o

Re: PG version is not seen in pg_upgrade test log

2025-12-02 Thread Daniel Gustafsson
> On 30 Nov 2025, at 10:11, Potapov Alexander wrote: > I ran pg_upgrade tests (make check -C src/bin/pg_upgrade) and found that test > log does not contain PG version: > -$node->dump_info; > - > $node->_set_pg_version; > +$node->dump_info; > + This seems like a correct ch

Re: Implement waiting for wal lsn replay: reloaded

2025-12-02 Thread Xuneng Zhou
Hi, On Tue, Dec 2, 2025 at 11:08 AM Xuneng Zhou wrote: > > Hi, > > On Mon, Dec 1, 2025 at 12:33 PM Xuneng Zhou wrote: > > > > Hi hackers, > > > > On Tue, Nov 25, 2025 at 7:51 PM Xuneng Zhou wrote: > > > > > > Hi! > > > > > > > > > > At the moment, the WAIT FOR LSN command supports only the repl

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

2025-12-02 Thread shveta malik
On Tue, Dec 2, 2025 at 1:58 PM Ajin Cherian wrote: > > > Attached patch v27 addresses the above comments. > Thanks for the patch. Please find a few comments: 1) + /* The worker pid must not be already assigned in SlotSyncCtx */ + Assert(SlotSyncCtx->pid == InvalidPid); + We can mention just 'pi

  1   2   >