Re: Simplify code building the LR conflict messages

2025-11-28 Thread Amit Kapila
On Fri, Nov 28, 2025 at 6:38 PM Álvaro Herrera wrote: > > So, what we're doing here is to append further row-identifying details > to an errdetail string that already contains some explanation of the > problem. That is, we have something like > > DETAIL: The row to be updated was deleted. > > an

Re: Remove unused function parameters, part 2: replication

2025-11-28 Thread Amit Kapila
On Fri, Nov 28, 2025 at 2:54 PM Bertrand Drouvot wrote: > > RetainDeadTuplesData *rdt_data in can_advance_nonremovable_xid(): 228c37086855 > RetainDeadTuplesData *rdt_data in resume_conflict_info_retention(): > 0d48d393d465 > All nearby static functions introduced for the same feature have passe

Re: Emitting JSON to file using COPY TO

2025-11-28 Thread jian he
hi. https://commitfest.postgresql.org/patch/4716/ says need rebase. turns out only copy.sgml has conflict. it conflict with https://git.postgresql.org/cgit/postgresql.git/commit/?id=e4018f891dec09ff95ac97e5b1a2307349aeeffa So the rebase only needs to update copy.sgml. -- jian https://www.enterp

Re: pgsql: Inline pg_ascii_tolower() and pg_ascii_toupper().

2025-11-28 Thread Chao Li
> On Nov 29, 2025, at 04:40, Tom Lane wrote: > > =?utf-8?Q?=C3=81lvaro?= Herrera writes: >> On 2025-Nov-26, Jeff Davis wrote: >>> Inline pg_ascii_tolower() and pg_ascii_toupper(). > >> I think this broke the CI on (some flavors of?) Windows. In >> https://cirrus-ci.com/task/6080935063453696

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-28 Thread Tomas Vondra
On 11/28/25 23:50, Robert Haas wrote: > On Fri, Nov 28, 2025 at 2:21 PM Tomas Vondra wrote:= >> The patch identifies dimensions without restrictions, moves them aside, >> and does regular join search on the rest of the relations (some of which >> may be dimensions with restrictions). >> >> So the

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-28 Thread Robert Haas
On Fri, Nov 28, 2025 at 2:21 PM Tomas Vondra wrote:= > The patch identifies dimensions without restrictions, moves them aside, > and does regular join search on the rest of the relations (some of which > may be dimensions with restrictions). > > So the presence of dimensions with restrictions does

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread Thomas Munro
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?

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread David Geier
On 28.11.2025 22:28, Tom Lane wrote: > David Geier writes: >> On 27.11.2025 00:03, Chao Li wrote: >>> This is a large patch, I just take a quick look, and found that: >>> - *phoned_word = palloc(sizeof(char) * strlen(word) + 1); >>> + *phoned_word = palloc_array(char, strlen(wo

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread David Geier
Hi Thomas! On 27.11.2025 03:53, Thomas Munro wrote: > On Thu, Nov 27, 2025 at 11:10 AM David Geier wrote: >> I've changed all code to use the "new" palloc_object(), palloc_array(), >> palloc0_object(), palloc0_array, repalloc_array() and repalloc0_array() >> macros. This makes the code more reada

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread David Geier
Hi Michael! On 27.11.2025 01:24, Michael Paquier wrote: > On Wed, Nov 26, 2025 at 11:09:31PM +0100, David Geier wrote: >> I've changed all code to use the "new" palloc_object(), palloc_array(), >> palloc0_object(), palloc0_array, repalloc_array() and repalloc0_array() >> macros. This makes the cod

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread Tom Lane
David Geier writes: > On 27.11.2025 00:03, Chao Li wrote: >> This is a large patch, I just take a quick look, and found that: >> -*phoned_word = palloc(sizeof(char) * strlen(word) + 1); >> +*phoned_word = palloc_array(char, strlen(word) + 1); >> And >> -params =

Re: Consistently use palloc_object() and palloc_array()

2025-11-28 Thread David Geier
Hi! Thanks for taking a look. On 27.11.2025 00:03, Chao Li wrote: > > This is a large patch, I just take a quick look, and found that: > > ``` > - *phoned_word = palloc(sizeof(char) * strlen(word) + 1); > + *phoned_word = palloc_array(char, strlen(word) + 1); > ``` > >

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Hannu Krosing
On Fri, Nov 28, 2025 at 9:42 PM Mihail Nikalayeu wrote: > > Hi, Hannu! > > I think you pressed "Reply" instead of "Reply All" - so, I put it to > the list (looks like nothing is secret here). > Mostly it is because of my opinion at the end of the mail which I want > to share with the list. Thanks

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Álvaro Herrera
On 2025-11-28, Mihail Nikalayeu wrote: > Also, I think it is good to mention changes in parse_clause.c in the > commit message. Oh rats, no, thanks for noticing, that's a mostly unrelated change that I intend to commit separately, mentioned in another thread, that I happened to merge here accide

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Mihail Nikalayeu
Hi, Hannu! I think you pressed "Reply" instead of "Reply All" - so, I put it to the list (looks like nothing is secret here). Mostly it is because of my opinion at the end of the mail which I want to share with the list. On Fri, Nov 28, 2025 at 8:33 PM Hannu Krosing wrote: > If it is an *index A

Re: pgsql: Inline pg_ascii_tolower() and pg_ascii_toupper().

2025-11-28 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Nov-26, Jeff Davis wrote: >> Inline pg_ascii_tolower() and pg_ascii_toupper(). > I think this broke the CI on (some flavors of?) Windows. In > https://cirrus-ci.com/task/6080935063453696 > I got > [19:09:39.518] > C:/msys64/ucrt64/bin/../lib/gc

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Mihail Nikalayeu
Also, I think it is good to mention changes in parse_clause.c in the commit message.

Re: [PoC] XMLCast (SQL/XML X025)

2025-11-28 Thread Jim Jones
On 28/11/2025 19:27, Marcos Pegoraro wrote: > You wrote character only on the SGML part, all others are text. When > you write numeric, the user understands that it can be bigint, integer, > numeric, etc, so users can get confused about TEXT and CHAR(N), because > the only place you wrote charac

Re: IPC/MultixactCreation on the Standby server

2025-11-28 Thread Heikki Linnakangas
On 28/11/2025 20:17, Andrey Borodin wrote: latest_page_number looks great! though I'm slightly worried by this commend: /* * During XLOG replay, latest_page_number isn't necessarily set up * yet; insert a suitable value to bypass the sanity test in * SimpleLruTruncate. */ and by /* *

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-28 Thread Tomas Vondra
On 11/28/25 19:57, Robert Haas wrote: > On Wed, Nov 26, 2025 at 1:30 PM Tomas Vondra wrote: >>> In my experience, restriction clauses on dimension tables are very common. >> >> Sure, but does that imply the inverse case (dimensions without non-join >> restrictions) are not? I'm not sure. > > Obvi

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Hannu Krosing
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 worried, though, that LR may lose updates due to commit > > > order differenc

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-28 Thread Robert Haas
On Wed, Nov 26, 2025 at 1:30 PM Tomas Vondra wrote: > > In my experience, restriction clauses on dimension tables are very common. > > Sure, but does that imply the inverse case (dimensions without non-join > restrictions) are not? I'm not sure. Obviously that depends on a lot of things, and I do

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Mihail Nikalayeu
Hi! On Fri, Nov 28, 2025 at 7:09 PM Hannu Krosing wrote: > Please also check my (very raw) proposal in the thread "Revisiting > {CREATE INDEX, REINDEX} CONCURRENTLY improvements" > > TL;DR - use logical decoding for adding index entries for tuples added > during CIC. No, the current issue is cau

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Mihail Nikalayeu
Hello! On Fri, Nov 28, 2025 at 7:05 PM Hannu Krosing wrote: > 1. While the first pass of CIC is collecting the visible tuple for > index the logical decoding collector also collects any new tuples > added after the CIC start. > 2. When the first pass collection finishes, it also gets the indexes

Re: Remove unused function parameters, part 2: replication

2025-11-28 Thread Andres Freund
Hi, On 2025-11-28 18:29:15 +, Bertrand Drouvot wrote: > On Fri, Nov 28, 2025 at 12:14:08PM -0500, Andres Freund wrote: > > On 2025-11-28 09:24:23 +, Bertrand Drouvot wrote: > > > PFA a patch to remove unused function parameters in replication (means > > > focusing on src/backend/replicatio

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Matthias van de Meent
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 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 decodi

Re: Remove unused function parameters, part 2: replication

2025-11-28 Thread Bertrand Drouvot
Hi, On Fri, Nov 28, 2025 at 12:14:08PM -0500, Andres Freund wrote: > Hi, > > On 2025-11-28 09:24:23 +, Bertrand Drouvot wrote: > > PFA a patch to remove unused function parameters in replication (means > > focusing on src/backend/replication). > > > > Those have been detected by a coccinelle

Re: [PoC] XMLCast (SQL/XML X025)

2025-11-28 Thread Marcos Pegoraro
Em sex., 28 de nov. de 2025 às 12:30, Jim Jones escreveu: > With "character type" I meant to include text, varchar, and char, as in > the docs[1] > You wrote character only on the SGML part, all others are text. When you write numeric, the user understands that it can be bigint, integer, numeric

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Mihail Nikalayeu
Hello! On Fri, Nov 28, 2025 at 6:30 PM Álvaro Herrera wrote: > I wasn't happy with the idea of opening all indexes twice in > infer_arbiter_indexes(), so I instead made it collect all Relations from > those indexes in an initial loop, then process them in the two places > that wanted them, and we

Re: IPC/MultixactCreation on the Standby server

2025-11-28 Thread Andrey Borodin
> On 28 Nov 2025, at 21:21, Heikki Linnakangas wrote: > > On 27/11/2025 20:25, Andrey Borodin wrote: >>> On 27 Nov 2025, at 01:59, Heikki Linnakangas wrote: >>> >>> This is because the WAL, created with old version, contains records like >>> this: >>> >>> lsn: 0/05561030, prev 0/05561008,

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Hannu Krosing
Please also check my (very raw) proposal in the thread "Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements" TL;DR - use logical decoding for adding index entries for tuples added during CIC. Maybe this also makes the issue with ON CONFLICT UPDATE and REINDEX CONCURRENTLY go away. On Fr

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Hannu Krosing
On Fri, Nov 28, 2025 at 6:58 PM Hannu Krosing wrote: > > On Fri, Nov 28, 2025 at 5:58 PM 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 deco

Re: pgsql: Inline pg_ascii_tolower() and pg_ascii_toupper().

2025-11-28 Thread Álvaro Herrera
On 2025-Nov-26, Jeff Davis wrote: > Inline pg_ascii_tolower() and pg_ascii_toupper(). I think this broke the CI on (some flavors of?) Windows. In https://cirrus-ci.com/task/6080935063453696 I got [19:09:39.518] [1597/2357] Linking target src/backend/postgres.exe [19:09:39.518] FAILED: [code=1]

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Hannu Krosing
On Fri, Nov 28, 2025 at 5:58 PM 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 it > in the repo either. N

Re: Periodic authorization expiration checks using GoAway message

2025-11-28 Thread Hannu Krosing
Also have not looked at the patch, but we should also make sure that there is not just be GoAway, but also a way to re-authenticate or "extend lease" or whatever the terminology is for a specific authentication method. So maybe the message should be ReAuthentiocateOrElse" ? On Fri, Nov 28, 2025 a

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-28 Thread Álvaro Herrera
Hello, Here's a slightly different approach for the fix proposed in your 0003. I wasn't happy with the idea of opening all indexes twice in infer_arbiter_indexes(), so I instead made it collect all Relations from those indexes in an initial loop, then process them in the two places that wanted the

Re: Periodic authorization expiration checks using GoAway message

2025-11-28 Thread Jelte Fennema-Nio
On Fri, Nov 28, 2025, 04:39 Ajit Awekar wrote: > This patch depends on the "GoAway" protocol message proposal currently > under review here: > https://www.postgresql.org/message-id/DDPQ1RV5FE9U.I2WW34NGRD8Z%40jeltef.nl > Please apply this patch on top of the GoAway patch. > A review of the GoAwa

Re: Remove unused function parameters, part 2: replication

2025-11-28 Thread Andres Freund
Hi, On 2025-11-28 09:24:23 +, Bertrand Drouvot wrote: > PFA a patch to remove unused function parameters in replication (means > focusing on src/backend/replication). > > Those have been detected by a coccinelle script (that I need to polish before > sharing). It currently only focuses on sta

Re: Bypassing cursors in postgres_fdw to enable parallel plans

2025-11-28 Thread KENAN YILMAZ
Hello Hackers, I have executed another quick tests based on v4-0001-Fetch-without-cursors patch. I also recompiled PostgreSQL from the latest main branch. Here are the execution time results; ** Local t1 table select (1st run) → 35049.790 ms — Parallel workers launched ** postgres_fdw.use_cursor

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Matthias van de Meent
On Fri, 28 Nov 2025 at 15:50, Mihail Nikalayeu wrote: > > Hello! > > On Thu, Nov 27, 2025 at 9:07 PM Matthias van de Meent > wrote: > > While it might not break, and might not hold back other tables' > > visibility horizons, it'll still hold back pruning on the table we're > > acting on, and that

Re: IPC/MultixactCreation on the Standby server

2025-11-28 Thread Álvaro Herrera
On 2025-Nov-28, Heikki Linnakangas wrote: > Heh, ok, fixed that. You also came up with a last name for Dmitry that I > haven't seen that mentioned anywhere in this thread, either. https://postgr.es/m/[email protected] -- Álvaro Herrera 48°01'N 7°57'E

Re: IPC/MultixactCreation on the Standby server

2025-11-28 Thread Heikki Linnakangas
On 27/11/2025 20:25, Andrey Borodin wrote: On 27 Nov 2025, at 01:59, Heikki Linnakangas wrote: This is because the WAL, created with old version, contains records like this: lsn: 0/05561030, prev 0/05561008, desc: CREATE_ID 2047 offset 4093 nmembers 2: 2830 (keysh) 2831 (keysh) lsn: 0/055611A

Re: Revisiting ALTER COLUMN POSITION support

2025-11-28 Thread Álvaro Herrera
Hello Daniel, On 2025-Nov-28, Daniel Cyran wrote: > I'd like to reopen the discussion about adding support for reorderable > columns (e.g. ALTER COLUMN POSITION or ALTER COLUMN ... AFTER ...). Yeah, I've been planning to work on this after completing the REPACK project -- I have an old patch for

Re: Metadata and record block access stats for indexes

2025-11-28 Thread Mircea Cadariu
Hi, Aleksander! On 20/11/2025 14:56, Aleksander Alekseev wrote: Hi Mircea, Rebased and dusted off this patch. Thanks for the patch. Here are my two cents. IMO it would be helpful if you could come up with a few more practical use cases. This change is going to affect pretty much everyone. If

Re: [PATCH] Add `headerscheck` run_target to meson

2025-11-28 Thread Nazir Bilal Yavuz
Hi, On Fri, 28 Nov 2025 at 18:05, Nazir Bilal Yavuz wrote: > > On Fri, 28 Nov 2025 at 17:03, Miłosz Bieniek > wrote: > > > > pt., 28 lis 2025 o 12:53 Peter Eisentraut napisał(a): > > > > > > On 27.11.25 10:28, Miłosz Bieniek wrote: > > > > While reviewing a patch I noticed that we have a `make

Re: [PATCH] Add `headerscheck` run_target to meson

2025-11-28 Thread Nazir Bilal Yavuz
Hi, Thank you for working on this! On Fri, 28 Nov 2025 at 17:03, Miłosz Bieniek wrote: > > pt., 28 lis 2025 o 12:53 Peter Eisentraut napisał(a): > > > > On 27.11.25 10:28, Miłosz Bieniek wrote: > > > While reviewing a patch I noticed that we have a `make -s headerscheck` > > > but there is no e

Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors

2025-11-28 Thread Hannu Krosing
There are some differences in what kind of session-level objects ar e there. For example pg_bouncer now supports prepared statements as these are essentially "read-only" can be easily re-created without disturbing their existing copies. Temp tables, hold cursors and advisory locks are supposed to

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Mihail Nikalayeu
Hello! On Thu, Nov 27, 2025 at 9:07 PM Matthias van de Meent wrote: > While it might not break, and might not hold back other tables' > visibility horizons, it'll still hold back pruning on the table we're > acting on, and that's likely one which already had bloat issues if > you're running RIC (

Re: Fix comments in execTuples.c

2025-11-28 Thread cca5507
Hi Ashutosh, > Those lines in the comment advise the caller. We need them there. They > do not describe the behaviour of the function, at least directly, as > you seem to be assuming. > > > See comment in store_returning_result() for example. Oh yeah, you are right. Thank you for pointing it ou

Re: Remove useless casting to the same type

2025-11-28 Thread Bertrand Drouvot
Hi, On Fri, Nov 28, 2025 at 02:20:25PM +0100, Peter Eisentraut wrote: > On 28.11.25 10:06, Bertrand Drouvot wrote: > > On Fri, Nov 28, 2025 at 09:11:16AM +0100, Peter Eisentraut wrote: > > > I think this whole thing could be simplified by overlaying a uint32 over > > > "data" and just accessing th

Re: Fix comments in execTuples.c

2025-11-28 Thread Ashutosh Bapat
On Fri, Nov 28, 2025 at 6:03 PM cca5507 wrote: > > Hi hackers, > > ``` > diff --git a/src/backend/executor/execTuples.c > b/src/backend/executor/execTuples.c > index 8e02d68824f..b77e9513e7e 100644 > --- a/src/backend/executor/execTuples.c > +++ b/src/backend/executor/execTuples.c > @@ -1532,9 +1

Re: headerscheck ccache support

2025-11-28 Thread Álvaro Herrera
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 execution time, you could move the `tr` call

Re: [PATCH] Add `headerscheck` run_target to meson

2025-11-28 Thread Miłosz Bieniek
pt., 28 lis 2025 o 12:53 Peter Eisentraut napisał(a): > > On 27.11.25 10:28, Miłosz Bieniek wrote: > > While reviewing a patch I noticed that we have a `make -s headerscheck` > > but there is no equivalent in meson. > > I prepared a small patch that adds `headerscheck` and `cpluspluscheck` > > tar

Revisiting ALTER COLUMN POSITION support

2025-11-28 Thread Daniel Cyran
Hi, I'd like to reopen the discussion about adding support for reorderable columns (e.g. ALTER COLUMN POSITION or ALTER COLUMN ... AFTER ...). This request has existed for many years, and there is already a documented outline and reasoning here: https://wiki.postgresql.org/wiki/Alter_column_posit

Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors

2025-11-28 Thread Andrey Borodin
> On 28 Nov 2025, at 18:28, Kirill Reshke wrote: > > If we can inform the client that his postgresql backend has some > session-level objects (like prepared statement, temp table, advisory > lock or cursor), this will be very helpful. +1. Roman was starting discussion with very similar topic

Re: Cleanup shadows variable warnings, round 1

2025-11-28 Thread Chao Li
> On Nov 28, 2025, at 16:16, Chao Li wrote: > > Hi Hackers, > > While reviewing [1], it makes me recall an experience where I had a patch > ready locally, but CommitFest CI failed with a shadows-variable warning. Now > I understand that -Wall doesn't by default enable -Wshadows with some >

Re: headerscheck ccache support

2025-11-28 Thread Álvaro Herrera
On 2025-Nov-28, Peter Eisentraut wrote: > Here is another patch set. I have made some tweaks to address the issue you > raise, and I took some code and inspiration from Thomas Munro's patch. The > solution I chose is to create a temporary subdirectory in the build > directory, and create the tes

Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors

2025-11-28 Thread Kirill Reshke
On Fri, 28 Nov 2025 at 14:48, Hannu Krosing wrote: > > Would it make sense to add one more byte ('H' ?) at the end of the > ReadyForQuery backend message to indicate that there are cursors that > live across transactions, so thet the connection pooler knows to not > give the database connections t

Re: Remove useless casting to the same type

2025-11-28 Thread Peter Eisentraut
On 28.11.25 10:06, Bertrand Drouvot wrote: Hi, On Fri, Nov 28, 2025 at 09:11:16AM +0100, Peter Eisentraut wrote: On 25.11.25 06:46, Bertrand Drouvot wrote: @@ -389,7 +389,7 @@ hash_xlog_split_allocate_page(XLogReaderState *record) /* extract low and high masks. */ memcpy(&lowmask, dat

Re: POC: make mxidoff 64 bits

2025-11-28 Thread Ashutosh Bapat
On Fri, Nov 28, 2025 at 6:35 PM Ashutosh Bapat wrote: > > On Fri, Nov 21, 2025 at 7:26 PM Heikki Linnakangas wrote: > > > > > > > I have reviewed patch 0002 and multxact.c changes in 0003. So far I > > > have only these comments. I will review the pg_upgrade.c changes next. > > 007_multixact_conv

Re: headerscheck ccache support

2025-11-28 Thread Peter Eisentraut
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, `patch -p1` does accept it. Weird. I had anoth

Re: Simplify code building the LR conflict messages

2025-11-28 Thread Álvaro Herrera
Hello, So, what we're doing here is to append further row-identifying details to an errdetail string that already contains some explanation of the problem. That is, we have something like DETAIL: The row to be updated was deleted. and then we add whatever this function produces, after a newli

Re: POC: make mxidoff 64 bits

2025-11-28 Thread Ashutosh Bapat
On Fri, Nov 21, 2025 at 7:26 PM Heikki Linnakangas wrote: > > > > I have reviewed patch 0002 and multxact.c changes in 0003. So far I > > have only these comments. I will review the pg_upgrade.c changes next. 007_multixact_conversion.pl fires thousands of queries through BackgroundPsql which prin

Re: headerscheck ccache support

2025-11-28 Thread Álvaro Herrera
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, `patch -p1` does accept it. Weird. I have git 2.47.3 and the patch says 2.52.0. Maybe som

Re: headerscheck ccache support

2025-11-28 Thread Nazir Bilal Yavuz
Hi On Fri, 28 Nov 2025 at 14:39, Peter Eisentraut wrote: > > On 21.11.25 13:14, Álvaro Herrera wrote: > >> Now ccache works. > > > > Sounds reasonable. I notice that you're cleaning this file in a `rm` > > line in the loop, > > > >> @@ -253,10 +249,11 @@ do > >> if ! $COMPILER $COMPILER_FLA

Fix comments in execTuples.c

2025-11-28 Thread cca5507
Hi hackers, ``` diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 8e02d68824f..b77e9513e7e 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -1532,9 +1532,6 @@ ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to ch

Re: Proposal: Conflict log history table for Logical Replication

2025-11-28 Thread Amit Kapila
On Tue, Nov 18, 2025 at 3:40 PM shveta malik wrote: > > On Thu, Nov 13, 2025 at 9:17 PM Dilip Kumar wrote: > > > > On Thu, Nov 13, 2025 at 2:39 PM shveta malik wrote: > > > > > > 3) > > > We also need to think how we are going to display the info in case of > > > multiple_unique_conflicts as the

Re: [PoC] XMLCast (SQL/XML X025)

2025-11-28 Thread Marcos Pegoraro
Em sex., 28 de nov. de 2025 às 07:48, Jim Jones escreveu: > rebased + + It supports casting between xml and character, numeric, date/time, and boolean data types. + Did you forget the interval and bytea types here ? Why are saying character instead of text ? I found it

Re: [PATCH] Add `headerscheck` run_target to meson

2025-11-28 Thread Peter Eisentraut
On 27.11.25 10:28, Miłosz Bieniek wrote: While reviewing a patch I noticed that we have a `make -s headerscheck` but there is no equivalent in meson. I prepared a small patch that adds `headerscheck` and `cpluspluscheck` targets. This would be good to have, but I don't think your patch works.

Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors

2025-11-28 Thread Hannu Krosing
Hi PostgreSQL Hackers I started to look around for a solution of current pgJDBC shortcoming of having to emulate WITH HOLD cursors and found this discussion (https://github.com/pgjdbc/pgjdbc/discussions/3323) mentioning connection pooling. I did not find anything in the wire protocol documentatio

Periodic authorization expiration checks using GoAway message

2025-11-28 Thread Ajit Awekar
This patch introduces a mechanism to address the security issue of stale, authorized connections persisting beyond their validity period. . Currently, once a session is established, postgres does not automatically re-validate credentials. If a password expires (rolvaliduntil) the session remains a

Re: headerscheck ccache support

2025-11-28 Thread Peter Eisentraut
On 21.11.25 13:14, Álvaro Herrera wrote: Now ccache works. Sounds reasonable. I notice that you're cleaning this file in a `rm` line in the loop, @@ -253,10 +249,11 @@ do if ! $COMPILER $COMPILER_FLAGS -I $builddir -I $srcdir \ -I $builddir/src/include -I $srcdir/src/

Re: Proposal: adding --enable-shadows-warning

2025-11-28 Thread Nazir Bilal Yavuz
Hi, On Fri, 28 Nov 2025 at 12:40, Chao Li wrote: > > > On Nov 28, 2025, at 17:20, Daniel Gustafsson wrote: > > > >> On 28 Nov 2025, at 10:02, Chao Li wrote: > > > >> To make hacker’s life easier, it would make sense to always enable > >> “-Wshadow”, however, that may have a risk of breaking so

refactor ExecInitPartitionInfo

2025-11-28 Thread jian he
hi. I noticed the following code pattern repeated several times in ExecInitPartitionInfo. ``` if (part_attmap == NULL) build_attrmap_by_name(RelationGetDescr(partrel), RelationGetDescr(firstResultRel), false); ``` we

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2025-11-28 Thread jian he
On Wed, Oct 29, 2025 at 3:39 AM David E. Wheeler wrote: > > Updated patches attached. > > Best, > > David > hi. /* * All node's type of jsonpath expression * * These become part of the on-disk representation of the jsonpath type. * Therefore, to preserve pg_upgradability, the order must not

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

2025-11-28 Thread Michael Banck
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, the other options could be > slotsync_last_skip_time, sync_last_skip_

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

2025-11-28 Thread Amit Kapila
On Fri, Nov 28, 2025 at 2:45 PM Michael Banck wrote: > > Hi, > > On Fri, Nov 21, 2025 at 11:00:36AM +0530, shveta malik wrote: > > 2) > > +s.slotsync_skip_count, > > +s.last_slotsync_skip_at, > > > > Shall we rename last_slotsync_skip_at to slotsync_last_skip_at. That > > w

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Matthias van de Meent
On Fri, 28 Nov 2025 at 10:05, Antonin Houska wrote: > Matthias van de Meent wrote: > > 3. Having the index marked indisready before it contains any data is > > going to slow down the indexing process significantly: > > a. The main index build now must go through shared memory and buffer > > locki

Re: Proposal: adding --enable-shadows-warning

2025-11-28 Thread Chao Li
> On Nov 28, 2025, at 17:20, Daniel Gustafsson wrote: > >> On 28 Nov 2025, at 10:02, Chao Li wrote: > >> To make hacker’s life easier, it would make sense to always enable >> “-Wshadow”, however, that may have a risk of breaking some compilers. So >> thinking over, I just fell adding an op

Re: Fix a recent "shadow warning" in subscriptioncmds.c

2025-11-28 Thread vignesh C
On Fri, 28 Nov 2025 at 09:29, Peter Smith wrote: > > I noticed that recently, a shadow warning has crept into the code I am > building. > > -- > subscriptioncmds.c:1125:30: warning: declaration of ‘rel’ shadows a > previous local [-Wshadow] >foreach_ptr(SubRemoveRels, rel, sub_remove_

Re: Add support for specifying tables in pg_createsubscriber.

2025-11-28 Thread Shubham Khanna
On Fri, Nov 28, 2025 at 11:36 AM vignesh C wrote: > > On Thu, 6 Nov 2025 at 09:35, Shubham Khanna > wrote: > > > > On Thu, Nov 6, 2025 at 7:18 AM Peter Smith wrote: > > > > > > On Wed, Nov 5, 2025 at 3:42 PM Shubham Khanna > > > wrote: > > > > > > > > On Mon, Nov 3, 2025 at 12:55 PM Peter Smit

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

2025-11-28 Thread Michael Banck
Hi, On Thu, Nov 27, 2025 at 11:08:00AM +0530, Shlok Kyal wrote: > I have addressed the comments and attached the updated patch. Maybe it would be better to break out the slotsync parts of pg_replication_slots into a new view? I think people are using pg_replication_slots a lot for monitoring and

Remove unused function parameters, part 2: replication

2025-11-28 Thread Bertrand Drouvot
Hi hackers, PFA a patch to remove unused function parameters in replication (means focusing on src/backend/replication). Those have been detected by a coccinelle script (that I need to polish before sharing). It currently only focuses on static functions. While reviewing the coccinelle script ou

Re: Enhancing Memory Context Statistics Reporting

2025-11-28 Thread Rahila Syed
Hi, I'm attaching the updated patches, which primarily include cleanup and have been rebased following the CFbot report. Thank you, Rahila Syed On Tue, Nov 25, 2025 at 12:50 PM Rahila Syed wrote: > Hi Daniel, > > Thank you for your comments. Please find attached v41 with all the > comments add

Re: Second RewriteQuery complains about first RewriteQuery in edge case

2025-11-28 Thread Bernice Southey
Dean Rasheed wrote: > Here's an update, doing it that way. It does appear somewhat neater. This is neat. Should the test be the rules one? Updatable views are more used, but your rules example has more coverage. Thanks, Bernice

Re: Proposal: adding --enable-shadows-warning

2025-11-28 Thread Daniel Gustafsson
> On 28 Nov 2025, at 10:02, Chao Li wrote: > To make hacker’s life easier, it would make sense to always enable > “-Wshadow”, however, that may have a risk of breaking some compilers. So > thinking over, I just fell adding an opt-in “—enable-shadows-warnings” could > be a solution. I'm not su

Re: Migrate to autoconf 2.72?

2025-11-28 Thread Chao Li
> On Nov 28, 2025, at 17:02, Jakub Wartak wrote: > > Outside the main $thread question or updating on MacOS, I usually just > grab https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz and > ./configure && make install and it should work (and it's really tiny > and compiles in like 500ms). >

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

2025-11-28 Thread Michael Banck
Hi, On Fri, Nov 21, 2025 at 11:00:36AM +0530, shveta malik wrote: > 2) > +s.slotsync_skip_count, > +s.last_slotsync_skip_at, > > Shall we rename last_slotsync_skip_at to slotsync_last_skip_at. That > way all slotsync related stats columns will have same prefix. I am not s

Re: Cleanup shadows variable warnings, round 1

2025-11-28 Thread Heikki Linnakangas
On 28/11/2025 10:16, Chao Li wrote: Hi Hackers, While reviewing [1], it makes me recall an experience where I had a patch ready locally, but CommitFest CI failed with a shadows-variable warning. Now I understand that -Wall doesn't by default enable -Wshadows with some compilers like clang.

Re: Remove useless casting to the same type

2025-11-28 Thread Bertrand Drouvot
Hi, On Fri, Nov 28, 2025 at 09:11:16AM +0100, Peter Eisentraut wrote: > On 25.11.25 06:46, Bertrand Drouvot wrote: > > > > @@ -389,7 +389,7 @@ hash_xlog_split_allocate_page(XLogReaderState > > > > *record) > > > > > > > >/* extract low and high masks. */ > > > >memcpy(&lowmask, data, siz

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-11-28 Thread Antonin Houska
Matthias van de Meent wrote: > On Thu, 27 Nov 2025 at 17:56, Antonin Houska wrote: > > > > Michail Nikolaev wrote: > > > > > I think about revisiting (1) ({CREATE INDEX, REINDEX} CONCURRENTLY > > > improvements) in some lighter way. > > > > I haven't read the whole thread yet, but the effort to

Re: Migrate to autoconf 2.72?

2025-11-28 Thread Jakub Wartak
On Fri, Nov 28, 2025 at 9:35 AM Chao Li wrote: > > Hi Hackers, > > I wanted to add “—enable-shadows-warning” to “./configure”, I updated > configure.ac, then installed autoconf on my MacBook, then when I tried to run > autoconf, I got an error: > > ``` > % autoconf > configure.ac:22: error: Auto

Proposal: adding --enable-shadows-warning

2025-11-28 Thread Chao Li
Hi Hackers, I had an experience where I made a patch ready locally, build passed without any warning, however, CommitFest CI failed with a compile waring of shadows variable. I felt strange at the time but now I understand that is because some compilers, like clang I am using, don’t enable -Wsh

Re: Proposal: Conflict log history table for Logical Replication

2025-11-28 Thread shveta malik
On Thu, Nov 27, 2025 at 5:50 PM Dilip Kumar wrote: > > > I have fixed all these comments and also the comments of 0002, now I > feel we can actually merge 0001 and 0002, so I have merged both of > them. > > Now pending work status > 1) fixed review comments of 0003 > 2) Run pgindent -- planning to

Re: Fix typo 586/686 in atomics/arch-x86.h

2025-11-28 Thread Daniel Gustafsson
> On 28 Nov 2025, at 09:44, Jakub Wartak wrote: > > That's a typo in src/include/port/atomics/arch-x86.h, isn't it ?: > if defined(__i568__) || defined(__i668__) || /* gcc i586+ */ > If yes, then a patch is attached. Not that it harms something or > somebody has such old hardware, but I've just

Fix typo 586/686 in atomics/arch-x86.h

2025-11-28 Thread Jakub Wartak
That's a typo in src/include/port/atomics/arch-x86.h, isn't it ?: if defined(__i568__) || defined(__i668__) || /* gcc i586+ */ If yes, then a patch is attached. Not that it harms something or somebody has such old hardware, but I've just spotted it while looking for something else. -J. From c10

Re: ON CONFLICT DO SELECT (take 3)

2025-11-28 Thread jian he
On Tue, Nov 25, 2025 at 9:24 PM Viktor Holmberg wrote: > > In conclusion: > Attached is v17, with: > - Jians latest patches minus the injection point testing > - Doc for MVCC > - ExecOnConflictSelect with a default clause for lockStrength. > hi. + + Insert a new distributor if the name doesn

Re: Remove useless casting to the same type

2025-11-28 Thread Peter Eisentraut
On 25.11.25 06:46, Bertrand Drouvot wrote: Maybe we should make the code compile cleanly under -Wformat-signedness at some point... good idea, will give it a try later on outside the context of this patch. I test this once in a while and fix the issues that I find. But it's very picky and yo

Migrate to autoconf 2.72?

2025-11-28 Thread Chao Li
Hi Hackers, I wanted to add “—enable-shadows-warning” to “./configure”, I updated configure.ac, then installed autoconf on my MacBook, then when I tried to run autoconf, I got an error: ``` % autoconf configure.ac:22: error: Autoconf version 2.69 is required. Untested combinations of 'autoconf'

Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache

2025-11-28 Thread Nazir Bilal Yavuz
Hi, On Fri, 28 Nov 2025 at 03:36, Michael Paquier wrote: > > On Thu, Nov 27, 2025 at 10:59:47AM +0300, Nazir Bilal Yavuz wrote: > > I agree with you, the patches make more sense this way. > > > > The patches are split into two in v10. There are no changes from v9, > > except that one extra blank

  1   2   >