Re: IPC/MultixactCreation on the Standby server

2025-12-04 Thread Álvaro Herrera
On 2025-Dec-04, Heikki Linnakangas wrote: > While working on the 64-bit multixid offsets patch, I noticed one more bug > with this. At offset wraparound, when we set the next multixid's offset in > RecordNewMultiXact, we incorrectly set it to 0 instead of 1. We're supposed > to skip over offset 1,

Re: Proposal: Conflict log history table for Logical Replication

2025-12-04 Thread vignesh C
On Wed, 3 Dec 2025 at 16:57, Dilip Kumar wrote: > > On Wed, Dec 3, 2025 at 9:49 AM shveta malik wrote: > > > > > > relid | 16391 > > > schemaname| public > > > relname | conf_tab > > > conflict_type | multiple_unique_conflicts > > > remote_xid| 761 > > >

Re: IPC/MultixactCreation on the Standby server

2025-12-04 Thread Heikki Linnakangas
On 03/12/2025 19:19, Heikki Linnakangas wrote: On 03/12/2025 16:19, Dmitry Yurichev wrote: On 12/2/25 16:48, Heikki Linnakangas wrote: Thanks! Agreed, v14-16 were the same. v17 and v18 might be worth testing separately, to make sure I didn't e.g. screw up the locking differences. I tested on

Re: Remove unnecessary casts in printf format arguments

2025-12-04 Thread Bertrand Drouvot
Hi, On Thu, Dec 04, 2025 at 01:19:07PM +0100, Peter Eisentraut wrote: > Attached are some patches to remove unnecessary casts in printf format > arguments. Many of these are apparently left over from before use of > %zu/%zd and PRIu64/PRId64 were possible. Additionally, there are a few > where t

Re: Adding REPACK [concurrently]

2025-12-04 Thread Antonin Houska
jian he wrote: > if (params.options & CLUOPT_ANALYZE) > ereport(ERROR, > errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("cannot %s multiple tables", "REPACK (ANALYZE)")); > for this error case, adding a simple test case would be better? More options

Re: Cleanup shadows variable warnings, round 1

2025-12-04 Thread Bilal Yavuz
Hi, On Thu, 4 Dec 2025 at 14:21, Álvaro Herrera wrote: > > On 2025-Dec-04, Chao Li wrote: > > > The motivation is that CF’s CI currently fails on shadow-variable warnings. > > If you touch a file like a.c, and that file already has a legacy shadowing > > issue, CI will still fail your patch even

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2025-12-04 Thread Amul Sul
On Tue, Dec 2, 2025 at 1:23 PM jian he wrote: > > On Mon, Dec 1, 2025 at 8:09 PM Amul Sul wrote: > > > > Since you declared float8_div_safe() as static inline, I believe it > > wouldn't have any performance degradation since most compilers > > optimize it. Also, I suggest you pass the ErrorSafeCo

Re: Improve error reporting in 027_stream_regress test

2025-12-04 Thread Bilal Yavuz
Hi Michael, Brandon and Ben, Thank you for looking into this! On Thu, 4 Dec 2025 at 10:42, Michael Paquier wrote: > > On Wed, Dec 03, 2025 at 11:01:31PM -0800, Brandon Tat wrote: > > Regarding the function regression_log_helper(), this function reads > > all the lines in the logs at line 219 of

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

2025-12-04 Thread Michael Banck
Hi, On Thu, Dec 04, 2025 at 12:06:44PM +0530, Shlok Kyal wrote: > On Thu, 4 Dec 2025 at 08:54, Dilip Kumar wrote: > > On Wed, Dec 3, 2025 at 10:59 AM Amit Kapila wrote: > > > On Fri, Nov 28, 2025 at 3:37 PM Michael Banck wrote: > > > > On Fri, Nov 28, 2025 at 03:30:48PM +0530, Amit Kapila wrote

Remove unnecessary casts in printf format arguments

2025-12-04 Thread Peter Eisentraut
Attached are some patches to remove unnecessary casts in printf format arguments. Many of these are apparently left over from before use of %zu/%zd and PRIu64/PRId64 were possible. Additionally, there are a few where the cast just cast to the type the input already had, or it just uselessly c

Re: Cleanup shadows variable warnings, round 1

2025-12-04 Thread Álvaro Herrera
On 2025-Dec-04, Chao Li wrote: > The motivation is that CF’s CI currently fails on shadow-variable warnings. > If you touch a file like a.c, and that file already has a legacy shadowing > issue, CI will still fail your patch even if your changes are correct. Then > you’re forced to fix unrelated s

Re: headerscheck ccache support

2025-12-04 Thread Peter Eisentraut
On 28.11.25 15:16, Álvaro Herrera wrote: On 2025-Nov-28, Peter Eisentraut wrote: But this doesn't seem to buy very much. The overhead of the shell script to write out the test files appears to become significant compared the the actual compile commands. If you wanted to save some shell execu

Re: headerscheck ccache support

2025-12-04 Thread Peter Eisentraut
On 28.11.25 14:29, Álvaro Herrera wrote: Another approach I had in mind for some time is to just write out a makefile with the test compile commands, and run that with make -j. Demo patch attached. (I'm not seriously proposing this. For one thing, we probably wouldn't want to introduce a depend

Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM

2025-12-04 Thread Kirill Reshke
On Thu, 4 Dec 2025 at 14:17, Jelte Fennema-Nio wrote: > > On Thu, 4 Dec 2025 at 05:11, Kirill Reshke wrote: > > Hi! Superuser can change archive command to arbitrary bash, which is also > > useful for attacker. What should we do in this case? We definitely cannot > > restrict archive command ma

Re: headerscheck ccache support

2025-12-04 Thread Peter Eisentraut
On 28.11.25 14:10, Peter Eisentraut wrote: On 28.11.25 13:59, Álvaro Herrera wrote: On 2025-Nov-28, Nazir Bilal Yavuz wrote: I could not apply patches cleanly. Am I missing something? Yeah, I couldn't get `git am` or `git apply` to accept the patches either, not even with -3.  However, `patc

Re: Proposal: Conflict log history table for Logical Replication

2025-12-04 Thread Amit Kapila
On Thu, Dec 4, 2025 at 10:49 AM Dilip Kumar wrote: > > On Thu, Dec 4, 2025 at 7:31 AM Masahiko Sawada wrote: > > > > > The patch utilizes SPI for creating and dropping the conflict history > > table, but I'm really not sure if it's okay because it's actually > > affected by some GUC parameters su

Re: POC: make mxidoff 64 bits

2025-12-04 Thread Heikki Linnakangas
On 26/11/2025 17:50, Heikki Linnakangas wrote: On 26/11/2025 17:23, Maxim Orlov wrote: On Tue, 25 Nov 2025 at 13:07, Heikki Linnakangas > wrote: GetOldMultiXactIdSingleMember() currently asserts that the offset is never zero, but it should try to do something sensible in

Re: POC: make mxidoff 64 bits

2025-12-04 Thread Ashutosh Bapat
On Wed, Dec 3, 2025 at 5:34 PM Heikki Linnakangas wrote: > > On 03/12/2025 11:54, Maxim Orlov wrote: > > The biggest problem with compression, in my opinion, is that losing > > even one byte causes the loss of the entire compressed block in the > > worst case scenario. After all, we still don't ha

Re: Remove unused function parameters, part 2: replication

2025-12-04 Thread Bertrand Drouvot
Hi, On Thu, Dec 04, 2025 at 10:34:34AM +0100, Daniel Gustafsson wrote: > > On 2 Dec 2025, at 15:28, Bertrand Drouvot > > wrote: > > > That said I'm still skeptical that we need to provide a strong > > justification (as the one above) to remove an unused parameter. > > If it breaks an existing

Re: Use func(void) for functions with no parameters

2025-12-04 Thread Bertrand Drouvot
Hi, On Wed, Dec 03, 2025 at 11:32:10PM -0500, Tom Lane wrote: > Bertrand Drouvot writes: > > The buildfarm animal remark makes me think to check with -Wstrict-prototypes > > and -Wold-style-definition. I just did that and found two more (added in v2 > > attached) that the coccinelle script missed

Re: POC: make mxidoff 64 bits

2025-12-04 Thread Maxim Orlov
On Wed, 3 Dec 2025 at 15:04, Heikki Linnakangas wrote: > > There are plenty of such critical bytes in the system where a single bit > flip renders the whole block unreadable. Actually, if we had checksums > on SLRU pages, a single bit flip anywhere in the page would make the > checksum fail and r

Re: Using MyDatabaseId in SET_LOCKTAG_APPLY_TRANSACTION

2025-12-04 Thread Maxim Orlov
On Wed, 3 Dec 2025 at 15:27, Hayato Kuroda (Fujitsu) < [email protected]> wrote: > Dear Maxim, > > I recalled my post [1]. The database id is helpful when we output lock > information by DescribeLockTag(). Since it would be called when the system > might > be under the deadlock, any locks

Re:Re: pg_recvlogical: Prevent flushed data from being re-sent after restarting replication

2025-12-04 Thread Yilin Zhang
On 28/11/2025 02:15, Fujii Masao wrote: > I've made a few minor adjustments to the test patch. > The updated version is attached. Hi, I was reading your code and had a question about the new code you added in the main() function of pg_recvlogical.c: if (outfd != -1 && strcmp(outfile, "-") !=

Re: Remove unused function parameters, part 2: replication

2025-12-04 Thread Daniel Gustafsson
> On 2 Dec 2025, at 15:28, Bertrand Drouvot > wrote: > That said I'm still skeptical that we need to provide a strong > justification (as the one above) to remove an unused parameter. If it breaks an existing published API thus causing extensions to fail to compile then IMHO that's a pretty str

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

2025-12-04 Thread shveta malik
On Thu, Dec 4, 2025 at 1:54 PM Masahiko Sawada wrote: > > > I've attached the updated patch that incorporated the review comments > and is rebased to the current HEAD. > Thanks, a few things: 1) +The system automatically increases the +effective WAL level to logical when creatin

Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM

2025-12-04 Thread Jelte Fennema-Nio
On Thu, 4 Dec 2025 at 05:11, Kirill Reshke wrote: > Hi! Superuser can change archive command to arbitrary bash, which is also > useful for attacker. What should we do in this case? We definitely cannot > restrict archive command management to localhost, are we? I'm curious why you think we cann

Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...

2025-12-04 Thread VASUKI M
Kindly review the attached patch , As i saw the proposed patch by Ian failed with CI https://commitfest.postgresql.org/patch/6244/ Guide me with the patch Regards, Vasuki M On Thu, Nov 27, 2025 at 2:50 PM VASUKI M wrote: > Hello all, > > Based on the discussion, I have updated the patch to hand

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

2025-12-04 Thread Ajin Cherian
On Thu, Dec 4, 2025 at 5:04 PM shveta malik wrote: > > > I have just 2 trivial comments for v29-001: > > 1) > -   * receives a SIGINT from the startup process, or when there is an error. > +   * receives a SIGUSR1 from the startup process, or when there is an error. > > In above we should mention

Re: Fix crash during recovery when redo segment is missing

2025-12-04 Thread Michael Paquier
On Thu, Dec 04, 2025 at 12:00:23PM +0500, Kirill Reshke wrote: > Your tests are using a busy loop with usleep which nowadays is > considered as bad practice. There 3 of such places, and I think the > first two of them > can be replaced with injection point wait. (This fell off my radar, apologies

Re: tuple radix sort

2025-12-04 Thread Chao Li
> On Dec 4, 2025, at 13:30, John Naylor wrote: > > On Wed, Dec 3, 2025 at 3:22 PM Chao Li wrote: >> I played with this again today and found an optimization that seems to >> dramatically improve the performance: >> >> ``` >> +static void >> +radix_sort_tuple(SortTuple *begin, size_t n_elems

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-04 Thread Antonin Houska
Matthias van de Meent wrote: > 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 dec

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2025-12-04 Thread David Geier
On 03.12.2025 10:50, David Geier wrote: > On 19.11.2025 08:20, David Geier wrote: >> >> On 20.10.2025 21:59, Robert Haas wrote: >>> On Sun, Oct 19, 2025 at 2:16 PM Álvaro Herrera wrote: If I were a consultant trying to understand a customer's system, I would have to ask them to run