Re: Log a warning in pg_createsubscriber for max_slot_wal_keep_size

2024-12-29 Thread Shubham Khanna
On Mon, Dec 30, 2024 at 10:10 AM vignesh C wrote: > > On Mon, 30 Dec 2024 at 09:34, Shubham Khanna > wrote: > > > > Hi, > > > > Currently, there is a risk that pg_createsubscriber may fail to > > complete successfully when the max_slot_wal_keep_size value is set too > > low. This can occur if the

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-12-29 Thread Peter Smith
On Tue, Dec 24, 2024 at 10:37 PM Nisha Moond wrote: > > On Fri, Dec 20, 2024 at 3:12 PM Amit Kapila wrote: >> >> On Mon, Dec 16, 2024 at 4:10 PM Nisha Moond wrote: >> > >> > Here is the v56 patch set with the above comments incorporated. >> > >> >> Review comments: >> === >> 1. >> +

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-12-29 Thread Peter Smith
Hi Nisha, Here are some review comments for the patch v57-0001. == src/backend/replication/slot.c 1. +/* + * Invalidate replication slots that have remained idle longer than this + * duration; '0' disables it. + */ +int idle_replication_slot_timeout_min = HOURS_PER_DAY * MINS_PER_HOUR; IMO

Re: Memory leak in pg_logical_slot_{get,peek}_changes

2024-12-29 Thread Michael Paquier
On Fri, Dec 27, 2024 at 08:13:53AM +, Zhijie Hou (Fujitsu) wrote: > Thanks for updating patches ! They look good to me. Fine by me as well. I had a bit of time today, so I've taken care of all this one down to 15 for now after checking each branch. + cachectx_mcallback = palloc0(sizeof

Re: Log a warning in pg_createsubscriber for max_slot_wal_keep_size

2024-12-29 Thread vignesh C
On Mon, 30 Dec 2024 at 09:34, Shubham Khanna wrote: > > Hi, > > Currently, there is a risk that pg_createsubscriber may fail to > complete successfully when the max_slot_wal_keep_size value is set too > low. This can occur if the WAL is removed before the standby using the > replication slot is ab

Log a warning in pg_createsubscriber for max_slot_wal_keep_size

2024-12-29 Thread Shubham Khanna
Hi, Currently, there is a risk that pg_createsubscriber may fail to complete successfully when the max_slot_wal_keep_size value is set too low. This can occur if the WAL is removed before the standby using the replication slot is able to complete replication, as the required WAL files are no longe

Re: Should fix a comment referring to stats collector?

2024-12-29 Thread Michael Paquier
On Sat, Dec 28, 2024 at 03:25:46PM +0800, Junwang Zhao wrote: > I believe some redundant wording has been committed. > > K may be chosen may be chosen at ANALYZE time. > > Attached patch fixes it and with some line adjustments. Indeed. Fixed, thanks! -- Michael signature.asc Description: PGP

Re: Remove support for OpenSSL *eay32 libs on Windows

2024-12-29 Thread Michael Paquier
On Fri, Dec 27, 2024 at 03:09:48PM +0100, Daniel Gustafsson wrote: > The thread in [0] which adds Meson support for *eay32 OpenSSL library names on > Windows reminded me that we should remove these from master since we no longer > support OpenSSL 1.0.2 (which was the final version with those names)

Proposal: Progressive explain

2024-12-29 Thread Rafael Thofehrn Castro
Hello community, CONTEXT: Back in October I presented the talk "Debugging active queries with mid-flight instrumented explain plans" at PGConf EU 2024 (recording: https://www.youtube.com/watch?v=6ahTb-7C05c) presenting an experimental feature that enables visualization of in progress EXPLAIN ANAL

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-12-29 Thread Peter Smith
Hi Nisha. Here are some review comments for patch v57-0001. == src/backend/replication/slot.c 1. + +/* + * Raise an error based on the invalidation cause of the slot. + */ +static void +RaiseSlotInvalidationError(ReplicationSlot *slot) +{ + StringInfoData err_detail; + + initStringInfo(&err_

Re: An improvement of ProcessTwoPhaseBuffer logic

2024-12-29 Thread Michael Paquier
On Fri, Dec 27, 2024 at 06:16:24PM +0300, Vitaly Davydov wrote: > In general, I like your solution to use FullTransactionId. I haven't > found any evident problems. I just would like to propose to create a > couple of new functions like RemoveTwoPhaseFileInCurrentEpoch, > TwoPhaseFilePathInCurrentE

Re: IANA timezone abbreviations versus timezone_abbreviations

2024-12-29 Thread Tom Lane
"Jelte Fennema-Nio" writes: > I think it would be good to add some additional clarify here. It was > fairly confusing to me. Especially the last sentence, due to the use of > "active zone", even though it's really talking about the currently > active abbreviations list. Probably my confusion mostl

Re: IANA timezone abbreviations versus timezone_abbreviations

2024-12-29 Thread Jelte Fennema-Nio
On Mon Dec 16, 2024 at 8:57 PM CET, Tom Lane wrote: Andreas Karlsson writes: On 12/13/24 12:33 AM, Tom Lane wrote: I am not convinced this is an improvement. While this patch removes the round-trip hazard it also makes it confusing to use the timezone_abbreviations GUC since it can be overrid

Re: IANA timezone abbreviations versus timezone_abbreviations

2024-12-29 Thread Jelte Fennema-Nio
On Sun Dec 29, 2024 at 12:47 AM CET, Bruce Momjian wrote: On Mon, Dec 16, 2024 at 02:57:59PM -0500, Tom Lane wrote: Yes, your patch seems like a big improvement. +1 +Before consulting the timezone_abbreviations file, +PostgreSQL checks to see whether an +abbreviation used in date

Re: Converting contrib SQL functions to new style

2024-12-29 Thread Tom Lane
I wrote: > I reviewed and pushed these. Let's not forget that the pageinspect > one is still pending, though. We were waiting on Tomas' fix, which > is now pushed at 957ba9ff1, so I suppose it needs a rebase. Actually ... that one's quite trivial, so I went ahead and pushed it. The submitted pa

Re: Converting contrib SQL functions to new style

2024-12-29 Thread Tom Lane
I wrote: > Here's the remaining two patches in the current set. This is just > to pacify the cfbot: I've not done anything to them, just verified > that they still apply and pass regression. I reviewed and pushed these. Let's not forget that the pageinspect one is still pending, though. We were

Re: PoC: history of recent vacuum/checkpoint runs (using new hooks)

2024-12-29 Thread Tomas Vondra
On 12/29/24 16:39, Robert Treat wrote: > On Fri, Dec 27, 2024 at 8:25 PM Tomas Vondra wrote: >> On 12/27/24 05:00, Michael Paquier wrote: >>> On Thu, Dec 26, 2024 at 06:58:11PM +0100, Tomas Vondra wrote: If 128MB is insufficient, why would 256MB be OK? A factor of 2x does not make a fund

Re: PoC: history of recent vacuum/checkpoint runs (using new hooks)

2024-12-29 Thread Robert Treat
On Fri, Dec 27, 2024 at 8:25 PM Tomas Vondra wrote: > On 12/27/24 05:00, Michael Paquier wrote: > > On Thu, Dec 26, 2024 at 06:58:11PM +0100, Tomas Vondra wrote: > >> If 128MB is insufficient, why would 256MB be OK? A factor of 2x does not > >> make a fundamental difference ... > >> > >> Anyway, t

meson: Fix missing name arguments of cc.compiles() calls

2024-12-29 Thread Peter Eisentraut
I noticed a few cc.compiles() checks in meson.build don't show up in the "meson setup" output, because they don't have a "name" argument. Also, the "typeof" test doesn't show the name of the symbol that is currently being tested. All this makes remote debugging a bit harder. This patch fixes

table_tuple_lock's snapshot argument

2024-12-29 Thread Heikki Linnakangas
/* * Lock a tuple in the specified mode. * * Input parameters: * relation: relation containing tuple (caller must hold suitable lock) * tid: TID of tuple to lock * snapshot: snapshot to use for visibility determinations * cid: current command ID (used for visibility test

Re: Query regarding pg_prewarm extension

2024-12-29 Thread David Rowley
On Sun, 29 Dec 2024 at 14:00, Bruce Momjian wrote: > It feels like we should document what the block range is used for, so > attached is a doc patch to do that. - means prewarm through the last block in the relation). The return value - is the number of blocks prewarmed. + means prewarm th