Re: A tidyup of pathkeys.c

2025-10-14 Thread Chao Li
> On Oct 14, 2025, at 14:02, David Rowley wrote: > > When working on a5a68dd6d I noticed that truncate_useless_pathkeys() > uses a bunch of different static helper functions that are mostly the > same as each other. Most of them differ only in which field of > PlannerInfo they look at. > > Th

memory context to complement ASAN

2025-10-14 Thread John Naylor
Some bugs have been found in ASAN builds using a compiled-in malloc-only memory context (see commits 54ab74865, 1fe5a347e, ccc8194e4 for the bugs fixed). The patch used was first mentioned here (attachment: malloc_allocator.patch): https://www.postgresql.org/message-id/193261e2c4d.3dd3cd7c1842.87

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-10-14 Thread Arseniy Mukhin
Hi, Thank you for the patch! I think it can make life easier in case of failure of affected tests. It has conflicts with the current master, so rebase is needed. Best regards, Arseniy Mukhin

Re: Panic during xlog building with big values

2025-10-14 Thread Maksim.Melnikov
Hi, Andy, thanks for your review! I've checked RecordTransactionCommit too, but I don't think it can fire similar error. Problem, that was described above, occurred because we used external column storage without compression and with REPLICA IDENTITY FULL. To be honest, it's degenerate case, t

Re: add function argument name to substring and substr

2025-10-14 Thread jian he
On Tue, Oct 14, 2025 at 12:11 AM Tom Lane wrote: > > Andrew Dunstan writes: > > I'm late to the party on this, but I wonder if it wouldn't be better to > > use a type-neutral parameter name here, like "source", which could cover > > all these cases, instead of "string", "bytes", etc. > > +1 for t

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

2025-10-14 Thread Peter Smith
Hi Sawada-San, I started to look again at this thread. Here are some comments for v18 (the documentation only). == doc/src/sgml/config.sgml 1. + +It is important to note that when wal_level is set to +replica, the effective WAL level can automatically change +b

Re: Executing pg_createsubscriber with a non-compatible control file

2025-10-14 Thread Michael Paquier
On Mon, Oct 13, 2025 at 03:35:06PM -0700, Masahiko Sawada wrote: > v1-0001-Introduce-API-able-to-retrieve-contents-of-PG_VER.patch: > > v1-0002-pg_upgrade-Use-PG_VERSION-generic-routine.patch: > v1-0003-pg_createsubscriber-Use-PG_VERSION-generic-routin.patch: Applied both of these. > The new log

Re: A tidyup of pathkeys.c

2025-10-14 Thread Richard Guo
On Tue, Oct 14, 2025 at 3:03 PM David Rowley wrote: > Here's a list of what I've changed: > > 1. Add count_common_leading_pathkeys_ordered() function to check for > leading common pathkeys and use that for sort_pathkeys, > window_pathkeys and window_pathkeys. > 2. Add count_common_leading_pathkeys

Re: Implement waiting for wal lsn replay: reloaded

2025-10-14 Thread Xuneng Zhou
Hi, On Sat, Oct 4, 2025 at 9:35 AM Xuneng Zhou wrote: > > Hi, > > On Sun, Sep 28, 2025 at 5:02 PM Xuneng Zhou wrote: > > > > Hi, > > > > On Fri, Sep 26, 2025 at 7:22 PM Xuneng Zhou wrote: > > > > > > Hi Álvaro, > > > > > > Thanks for your review. > > > > > > On Tue, Sep 16, 2025 at 4:24 AM Álva

RE: Logical Replication of sequences

2025-10-14 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Thanks for updating the patch. Here are comments for recent 0002. Others are still being reviewed 01. pg_subscription_rel.h ``` +#include "nodes/primnodes.h" ``` The inclusion is not needed because the 02. typedefs.list ``` +SubscriptionRelKind ``` Missing update. 03. subscritionc

Re: pageinspect some function no need superuser priv

2025-10-14 Thread Nathan Bossart
On Tue, Oct 14, 2025 at 10:29:39AM -0400, Tom Lane wrote: > Yeah, I do not think it follows that being table owner should > entitle you to such low-level access. I'm inclined to reject > this proposal. -1 here, too. IMHO all of pageinspect should remain superuser-only since it is meant for devel

Re: Patch for migration of the pg_commit_ts directory

2025-10-14 Thread ls7777
Hi,I applied the diff file.Deleted the $ts variable.   Кому: 'ls' ([email protected]);Копия: [email protected], [email protected], [email protected];Тема: Patch for migration of the pg_commit_ts directory;14.10.2025, 09:27, "Hayato Kuroda (Fujitsu)"

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-10-14 Thread Andrew Dunstan
On 2025-10-14 Tu 4:01 AM, Michael Paquier wrote: On Fri, Oct 10, 2025 at 09:33:10AM -0400, Andrew Dunstan wrote: Great, I think this is a definite improvement. I saw someone recently complaining about this overuse of ok(), so thanks for doing the work to improve it. Yeah, it's really cool to

Re: A tidyup of pathkeys.c

2025-10-14 Thread Chao Li
> On Oct 14, 2025, at 19:22, David Rowley wrote: > > What makes you think making them inline would make the performance the > same as before? The previous functions were not inlined, and I've not > made any changes that should affect the compiler's ability to choose > to inline these functions

Re: Improve read_local_xlog_page_guts by replacing polling with latch-based waiting

2025-10-14 Thread Xuneng Zhou
Hi, On Sat, Oct 11, 2025 at 11:02 AM Xuneng Zhou wrote: > > Hi, > > The following is the split patch set. There are certain limitations to > this simplification effort, particularly in patch 2. The > read_local_xlog_page_guts callback demands more functionality from the > facility than the WAIT F

Re: pg_createsubscriber - more logging to say if there are no pubs to drop

2025-10-14 Thread Masahiko Sawada
On Tue, Oct 14, 2025 at 5:26 PM Peter Smith wrote: > > On Wed, Oct 15, 2025 at 11:11 AM Masahiko Sawada > wrote: > > > > On Tue, Oct 14, 2025 at 4:29 PM Peter Smith wrote: > > > > > > On Wed, Oct 15, 2025 at 4:42 AM Masahiko Sawada > > > wrote: > > > > > > > > On Wed, Oct 8, 2025 at 6:34 PM P

Re: pg_createsubscriber - more logging to say if there are no pubs to drop

2025-10-14 Thread Masahiko Sawada
On Wed, Oct 8, 2025 at 6:34 PM Peter Smith wrote: > > Hi hackers, > > While reviewing pg_createsubscriber in another thread, I found some of > the current logging to be confusing. Specifically, there is one part > that drops all existing publications. Sometimes it might look like > this: > > -

Re: Making pg_rewind faster

2025-10-14 Thread John H
Hi, On Fri, Oct 10, 2025 at 12:45 AM Srinath Reddy Sadipiralla wrote: > > ... > XLogFilePath , then validate this new path with the given path > ,this helps to catch invalid xlog files like pg_wal/0001FF10. > ... Are you concerned that somehow these files, which are named like XL

Re: Non-blocking archiver process

2025-10-14 Thread Robert Haas
Here are a few comments from me: I think that by calling system(), anything that is printed out by the child process ends up in the PostgreSQL log. With the patch, the output of the command seems like it will be read into a buffer and discarded. That's a significant behavior difference. This patc

Re: plpython: Remove support for major version conflict detection

2025-10-14 Thread Peter Eisentraut
On 08.10.25 18:41, Nathan Bossart wrote: On Wed, Oct 08, 2025 at 12:28:45PM -0300, Mario González Troncoso wrote: I'm attaching the same patch after rebasing from master. LGTM Committed, thanks.

Re: get rid of RM_HEAP2_ID

2025-10-14 Thread John Naylor
On Wed, Oct 15, 2025 at 6:55 AM Michael Paquier wrote: > > On Tue, Oct 14, 2025 at 03:20:16PM +0300, Heikki Linnakangas wrote: > > I'm not sure I agree with the premise that we should try to get rid of > > RM_HEAP2_ID. There's nothing wrong with that scheme as such. As an > > alternative, we could

Re: get rid of RM_HEAP2_ID

2025-10-14 Thread Michael Paquier
On Wed, Oct 15, 2025 at 12:01:44PM +0700, John Naylor wrote: > On Wed, Oct 15, 2025 at 6:55 AM Michael Paquier wrote: >> We could move out xl_xid, which should not be required for all >> records, shaving 4 bytes from the base XLogRecord. I'm afraid of the >> duplication this would create if we pu

Re: Optimize LISTEN/NOTIFY

2025-10-14 Thread Chao Li
> On Oct 15, 2025, at 05:19, Tom Lane wrote: > > "Joel Jacobson" writes: >> Having investigated this, the "direct advancement" approach seems >> correct to me. > >> (I understand the exclusive lock in PreCommit_Notify on NotifyQueueLock >> is of course needed because there are other operation

Re: new environment variable INITDB_LOCALE_PROVIDER

2025-10-14 Thread Peter Eisentraut
On 10.10.25 20:09, Jeff Davis wrote: On Fri, 2025-10-10 at 11:32 +0200, Peter Eisentraut wrote: * Use environment variable name PG_LOCALE_PROVIDER, which seems more consistent. Is this not something that could already be done using PG_TEST_INITDB_EXTRA_OPTS ? 1. PG_LOCALE_PROVIDER is a docum

Re: Clarification on Role Access Rights to Table Indexes

2025-10-14 Thread Tom Lane
Jeff Davis writes: > On Mon, 2025-10-13 at 17:21 -0400, Tom Lane wrote: >> I don't think so.  Even AccessShareLock is enough to block another >> session trying to acquire AccessExclusiveLock, and then not only >> have you DoS'd that session, but everything else trying to access >> the table will q

Re: Optimize LISTEN/NOTIFY

2025-10-14 Thread Joel Jacobson
On Sat, Oct 11, 2025, at 09:43, Joel Jacobson wrote: > On Sat, Oct 11, 2025, at 08:43, Joel Jacobson wrote: >> In addition to previously suggested optimization, there is another major ... >> I'm not entirely sure this approach is correct though Having investigated this, the "direct advancement" ap