[PATCH] psql: add size-based sorting options (O/o) for tables and indexes

2025-11-25 Thread M . Atıf Ceylan
Hello, This patch adds two new meta-command modifiers for \dt(+) and \di(+): - O : sort by total relation size descending - o : sort by total relation size ascending This makes it easier to identify the largest tables and indexes without writing custom SQL queries. Help message (\?) is upd

Re: transformJsonFuncExpr pathspec cache lookup failed

2025-11-25 Thread Amit Langote
Hi, On Wed, Nov 19, 2025 at 11:55 AM jian he wrote: > On Fri, Nov 7, 2025 at 2:26 PM Kirill Reshke wrote: > > > > Hi! > > I tried your fix and this indeed fixes an issue. Two minor comments: > > > > First, > > in the `src/backend/parser/parse_expr.c` fil there are multiple > > examples of workin

Re: pg_waldump: support decoding of WAL inside tarfile

2025-11-25 Thread Chao Li
> On Nov 26, 2025, at 14:02, Amul Sul wrote: > >> 9 - 0004 >> ``` >> +/* >> + * Create an astreamer that can read WAL from tar file. >> + */ >> +static astreamer * >> +astreamer_waldump_new(XLogDumpPrivate *privateInfo) >> +{ >> + astreamer_waldump *streamer; >> + >> + streamer = p

Re: [PATCH] Refactor bytea_sortsupport(), take two

2025-11-25 Thread John Naylor
On Mon, Nov 17, 2025 at 5:57 PM Aleksander Alekseev wrote: > > > > - * More generally, it's okay that bytea callers can have NUL bytes in > > > > - * strings because abbreviated cmp need not make a distinction between > > > > - * terminating NUL bytes, and NUL bytes representing actual NULs in the

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

2025-11-25 Thread shveta malik
On Wed, Nov 26, 2025 at 11:58 AM Shlok Kyal wrote: > > > I have also addressed the remaining comments and attached the updated patch. > Thanks. Please find a few comment: 1) + slotsync_skip_reasontext + + + The reason for the last slot synchronization skip. Slot synchroni

Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)

2025-11-25 Thread Nikhil Kumar Veldanda
Hi Michael, On Tue, Nov 25, 2025 at 8:54 PM Michael Paquier wrote: > > Tom, you are registered as a reviewer of the patch. The point of > > contention of the patch, where I see there is no consensus yet, is if > > my approach of using a redirection for the external TOAST pointers > > with a new

Re: [PATCH] Avoid pallocs in async.c's "critical section"

2025-11-25 Thread Arseniy Mukhin
Hi, On Tue, Nov 25, 2025 at 9:14 PM Joel Jacobson wrote: > > ... > Darn, I forgot about the edge-case where something fails in xact.c > in between PreCommit_Notify(); and AtCommit_Notify(); > causing an abort. > > In this case, AtAbort_Notify() would need to undo the effect > of the LISTEN/UNLIST

Re: tuple radix sort

2025-11-25 Thread John Naylor
On Wed, Nov 26, 2025 at 1:52 PM John Naylor wrote: > This made me think of something tangential: v4's common prefix > skipping doesn't take into account that the upper 4 bytes can't > matter. With a mix of positive and negative integers, I think it will > do the radix sort on all 8 bytes of "datum

Re: tuple radix sort

2025-11-25 Thread John Naylor
On Sun, Nov 23, 2025 at 12:33 PM Chengpeng Yan wrote: > > > On Nov 12, 2025, at 21:57, John Naylor wrote: > I have reviewed the v4 patch set. I applied the patches and ran > "make check" on macOS 14.2.1 (M1), and all regression tests passed. > > Overall, the implementation looks solid and the fea

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-25 Thread Vaibhav Dalvi
Hi Peter, Thank you for your latest review comments. I will let the committer decide on those two points. To all reviewers, thank you for your feedback. Given that the CFBot is green for v8 at https://commitfest.postgresql.org/patch/6208/ ( https://commitfest.postgresql.org/patch/6208/), I belie

Re: Some optimizations for COALESCE expressions during constant folding

2025-11-25 Thread Richard Guo
On Tue, Nov 25, 2025 at 9:07 PM Tender Wang wrote: > I took a quick look at the 0001. It seems correct to me. > One thing I want to confirm is that if var_is_nonnullable() returns true, we > can make sure that > the Var is 100% nonnullable, no matter what kind of join reorder happens. This is a

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

2025-11-25 Thread Shlok Kyal
On Wed, 26 Nov 2025 at 10:25, shveta malik wrote: > > On Wed, Nov 26, 2025 at 9:30 AM Shlok Kyal wrote: > > > > On Wed, 26 Nov 2025 at 09:00, Hayato Kuroda (Fujitsu) > > wrote: > > > > > > Dear Hou, > > > > > > > I think we did not sync slots to standby2, so I removed the checks for > > > > tha

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Michael Paquier
On Tue, Nov 25, 2025 at 11:50:14PM -0600, Corey Huinker wrote: > So if a function were previously static to one page, but now had utility > outside of that file, you would then consider changing the function > signature to add the consts? I ask because this may become relevant with > the statatt_*

[buildfarm related] Machines gcc experimental failed test_lfind

2025-11-25 Thread Hayato Kuroda (Fujitsu)
Hi hackers, Sorry if it has already been discussed somewhere. While seeing the buildfarm, I found that recently regression test for modules sometimes failed [1]. Typical example is [2] and failed at simd.h. The issue happened over branches, and they use gcc experimental. Based on that I felt rece

Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-11-25 Thread Nishant Sharma
Thanks Manni for the v14 patch! Thanks all for the review comments! I think we are in position to move to 'Ready for Committer' status. CFBot is all green for v14: https://commitfest.postgresql.org/patch/6175/ Hi Andrew, We are moving this thread to 'Ready for Committer' for your reviews and f

Re: pg_waldump: support decoding of WAL inside tarfile

2025-11-25 Thread Amul Sul
On Tue, Nov 25, 2025 at 2:21 PM Chao Li wrote: > > Hi Amul, > > I reviewed the patch and got some comments: > Thanks for the review. Replying inline below. > 1 - 0001 - pg_waldump.h > ``` > + * pg_waldump.h - decode and display WAL > + * > + * Copyright (c) 2013-2025, PostgreSQL Global Developme

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Corey Huinker
On Tue, Nov 25, 2025 at 11:44 PM Michael Paquier wrote: > On Tue, Nov 25, 2025 at 11:37:09PM -0600, Corey Huinker wrote: > > I've reviewed what you committed and it looks good to me aside from the > one > > nitpick I already made. > > I was not really excited about these as it concerns only code

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Michael Paquier
On Tue, Nov 25, 2025 at 11:37:09PM -0600, Corey Huinker wrote: > I've reviewed what you committed and it looks good to me aside from the one > nitpick I already made. I was not really excited about these as it concerns only code local to each file where the input functions are located, no routines

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Corey Huinker
> > > non-UTF8 databases, plus a few more tests that were missing, I have > applied the two patches for the input functions. > I've reviewed what you committed and it looks good to me aside from the one nitpick I already made. > Perhaps these will need some adjustments, but I also see little poi

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Corey Huinker
> > > No problem, thanks. Please note that I am not sure if I will be able > to look at anything else posted on this thread until next week, so > please feel free to continue the discussion for the time being. > > It's holiday season here too. I'm going to get the rebase out and see if any lessons

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Corey Huinker
> Finally, the consts are non-appealing for me for functions that are > internally used in these files. I'm curious why you find them non-appealing for non-exposed functions, if you have time to elaborate. > And forgot one: > valid_subsequent_attnum()'s duplication is actually adapted IMO, th

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Michael Paquier
On Tue, Nov 25, 2025 at 11:14:26PM -0600, Corey Huinker wrote: > My apologies. My v17 focused entirely on the input functions, as those were > receiving the vast majority of the attention. Now that those are out of the > way (Thanks Michael!) I can address those issues. No problem, thanks. Please

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Corey Huinker
> > > I don’t see any of my comments are addressed in v18. > > My apologies. My v17 focused entirely on the input functions, as those were receiving the vast majority of the attention. Now that those are out of the way (Thanks Michael!) I can address those issues.

Re: refactor AlterDomainAddConstraint (alter domain add constraint)

2025-11-25 Thread jian he
On Mon, Nov 24, 2025 at 10:45 PM Peter Eisentraut wrote: > > On 10.03.25 19:37, Alvaro Herrera wrote: > > > > I had forgotten this thread, and I ended up implementing a different > > solution for this issue, which I just posted at > >https://postgr.es/m/[email protected]

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

2025-11-25 Thread shveta malik
On Mon, Nov 24, 2025 at 12:12 PM Ajin Cherian wrote: > > Attaching patch v25 addressing the above comments. > The patch needs rebase due to recent commit 76b78721. thanks Shveta

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

2025-11-25 Thread Amit Kapila
On Wed, Nov 26, 2025 at 5:59 AM Masahiko Sawada wrote: > > On Sun, Nov 16, 2025 at 10:40 PM Amit Kapila wrote: > > > > On Fri, Nov 14, 2025 at 3:14 PM Masahiko Sawada > > wrote: > > > > > > On Fri, Nov 14, 2025 at 1:25 AM shveta malik > > > wrote: > > > > > > > > In an offline discussion with

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

2025-11-25 Thread shveta malik
On Wed, Nov 26, 2025 at 9:30 AM Shlok Kyal wrote: > > On Wed, 26 Nov 2025 at 09:00, Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Hou, > > > > > I think we did not sync slots to standby2, so I removed the checks for > > > that. > > > > > > I also adjusted the test in a way that it cleans up exis

Re: change default default_toast_compression to lz4?

2025-11-25 Thread Michael Paquier
On Fri, Nov 21, 2025 at 12:11:38PM +0100, Peter Eisentraut wrote: > I suppose one issue is that lz4 support is not compiled-in by default, but > in practice most users will have it. The default could be lz4 if lz4 > support is built, otherwise pglz. This would be similar to other parameters > whe

Re: [PATCH] Add mssql_compat extension with DATEDIFF function

2025-11-25 Thread Pavel Stehule
Hi út 25. 11. 2025 v 21:15 odesílatel Peter Eisentraut napsal: > On 25.11.25 04:25, Myles Lewis wrote: > > I'd like to propose a new contrib extension: mssql_compat, which provides > > SQL Server compatible date functions starting with DATEDIFF. > > I think this could best live as an external pr

RE: Assertion failure in SnapBuildInitialSnapshot()

2025-11-25 Thread Zhijie Hou (Fujitsu)
On Wednesday, November 26, 2025 2:57 AM Masahiko Sawada wrote: > > On Tue, Nov 25, 2025 at 4:02 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Tuesday, November 25, 2025 3:30 AM Masahiko Sawada > wrote: > > > > > > > > > Given that the computation of xmin and catalog_xmin among all slots > > > co

Re: [PATCH] Add mssql_compat extension with DATEDIFF function

2025-11-25 Thread Michael Paquier
On Tue, Nov 25, 2025 at 09:15:37PM +0100, Peter Eisentraut wrote: > I think this could best live as an external project. Likely so. Looking at the patch, everything written in it does not depend directly on something external, with all the function internals being written based on Postgres APIs.

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

2025-11-25 Thread Shlok Kyal
On Wed, 26 Nov 2025 at 09:00, Hayato Kuroda (Fujitsu) wrote: > > Dear Hou, > > > I think we did not sync slots to standby2, so I removed the checks for that. > > > > I also adjusted the test in a way that it cleans up existing slots before > > starting > > new tests. > > Thanks for updating the p

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

2025-11-25 Thread Hayato Kuroda (Fujitsu)
Dear Hou, > I think we did not sync slots to standby2, so I removed the checks for that. > > I also adjusted the test in a way that it cleans up existing slots before > starting > new tests. Thanks for updating the patch. I confirmed on my env that your patch could be applied cleanly and tests

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

2025-11-25 Thread Zhijie Hou (Fujitsu)
On Wednesday, November 26, 2025 11:00 AM Amit Kapila wrote: > > On Tue, Nov 25, 2025 at 5:18 PM Zhijie Hou (Fujitsu) > wrote: > > > > Here is the patch to modify the test. > > > > +## > +# Verify that slotsync skip statistics are correctly update

Re: SQL Property Graph Queries (SQL/PGQ)

2025-11-25 Thread Junwang Zhao
On Tue, Nov 25, 2025 at 9:58 PM Peter Eisentraut wrote: > > On 20.11.25 16:00, Ashutosh Bapat wrote: > >> 5. > >> > >> src/backend/catalog/sql_features.txt > >> > >> +G034 Path concatenation YES SQL/PGQ required > >> > >> Do we support path concatenation? > > I don't think so. But let Peter confir

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

2025-11-25 Thread Amit Kapila
On Tue, Nov 25, 2025 at 5:18 PM Zhijie Hou (Fujitsu) wrote: > > Here is the patch to modify the test. > +## +# Verify that slotsync skip statistics are correctly updated when the +# slotsync operation is skipped. +###

Re: Add comments about fire_triggers argument in ri_triggers.c

2025-11-25 Thread Amit Langote
Hi, On Mon, Nov 24, 2025 at 6:23 PM Kirill Reshke wrote: > On Mon, 31 Mar 2025 at 17:27, Yugo Nagata wrote: > > > > Hi, > > > > SPI_execute_snapshot() has a argument called "fire_triggers". If this is > > false, > > AFTER triggers are postponed to end of the query. This is true in normal > >

Re: [Proposal] Adding TRIM_SPACE option to COPY

2025-11-25 Thread Fujii Masao
On Tue, Nov 25, 2025 at 10:48 PM 河田達也 wrote: > > One question: should TRIM_SPACE remove only the literal space character (' > > '), > > or should it also trim other whitespace characters (e.g., tab, newline, > > those recognized by isspace())? > 3. Characters to trim >I plan to trim only th

Re: Additional info for CREATE ROLE with REPLICATION

2025-11-25 Thread Chao Li
> On Nov 26, 2025, at 05:45, Marcos Pegoraro wrote: > > When a logical replication is created and a ROLE with REPLICATION clause is > used for that, there is no info on [0] that that role needs to have read > permission on those tables. CREATE PUBLICATION and CREATE SUBSCRIPTION > commands

Re: log_min_messages per backend type

2025-11-25 Thread Euler Taveira
On Thu, Nov 6, 2025, at 11:53 AM, Chao Li wrote: > I just reviewed the patch and got a few comments. > Thanks for your review. > + /* Initialize the array. */ > + memset(newlevel, WARNING, BACKEND_NUM_TYPES * sizeof(int)); > ``` > > I think this statement is wrong, because memset() writes

Re: log_min_messages per backend type

2025-11-25 Thread Euler Taveira
On Fri, Nov 21, 2025, at 11:13 AM, Euler Taveira wrote: > I think you missed my point here. As I said if your proposal will let us with > 2 > terminologies (backend type and process type) as shown above. We can debate > if > we (1) keep the current terminology (backend type), (2) use the propose

Re: Extended Statistics set/restore/clear functions.

2025-11-25 Thread Michael Paquier
On Tue, Nov 25, 2025 at 04:28:51PM +0900, Michael Paquier wrote: > With that said, a v18 for the first two patches with the input > functions. Comments and/or opinions? Okay. I have gone other these two and after an extra round of polishing, mainly around comments (some suggested by Chao, actual

Re: Remaining dependency on setlocale()

2025-11-25 Thread Chao Li
> On Nov 26, 2025, at 01:20, Jeff Davis wrote: > > > New series attached with only these changes and a rebase. > > Regards, > Jeff Davis > > I continued reviewing 0005-0008. 0005 - no comment. The change looks correct to me. Before the patch, pg_regex_locale->ctype->max_chr <= MAX_SIMPL

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Robert Haas
On Tue, Nov 25, 2025 at 4:16 PM Nathan Bossart wrote: > My tests seem happy, so I will plan on committing these patches tomorrow. > The only difference in v4 is that pg_get_dsm_registry_allocations() will no > longer show partially-initialized entries. I thought that was the best > option in this

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-11-25 Thread Manni Wood
Hello. I tried Ayoub Kazar's test files again, using Nazir Bilal Yavuz's v3 patches, but with one difference since my last attempt: this time, I used 5 million lines per file. For each 5 million line file, I ran the import 5 times and averaged the results. (I found that even using 1 million lines

Re: Have the planner convert COUNT(1) / COUNT(not_null_col) to COUNT(*)

2025-11-25 Thread David Rowley
On Wed, 5 Nov 2025 at 13:16, David Rowley wrote: > I've attached a version with the NOT_USED part removed (and a bunch of > #includes I forgot to remove). The only other change was a minor > revision to some comments. This patch needed to be rebased due to the changes made in b140c8d7a. I also ad

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

2025-11-25 Thread Peter Smith
Hi Sawada-Sa, Some review comments for the patch v29-0001. == src/backend/access/transam/xact.c 1. +int effective_wal_level = WAL_LEVEL_REPLICA; Should that be declared as WalLevel instead of int? == src/backend/replication/logical/decode.c xlog_decode: 2. + + /* + * Even if wal_leve

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Daniel Gustafsson
> On 25 Nov 2025, at 23:03, Dagfinn Ilmari Mannsåker wrote: > Even simpler, and avoiding having to move the `set -e` after the check: > > PERLTIDY_VERSION=20230309 > if ! $PERLTIDY -v | grep -q $PERLTIDY_VERSION; then > echo "error: pgperltidy requires perltidy v$PERLTIDY_VERSION" > exit 1 > fi

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Jacob Champion
On Tue, Nov 25, 2025 at 2:03 PM Dagfinn Ilmari Mannsåker wrote: > Even simpler, and avoiding having to move the `set -e` after the check: +1; you beat me to it by a couple seconds :) --Jacob

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 2025-11-25 Tu 2:36 PM, Daniel Gustafsson wrote: >>> On 25 Nov 2025, at 20:31, Álvaro Herrera wrote: >>> >>> On 2025-Nov-25, Daniel Gustafsson wrote: >>> Agreed. Perhaps something like the attached would work? >>> Hmm, I got this >>> >>> src/tools/pgindent/pgperlt

[PATCH] psql: add size-based sorting options (O/o) for tables and indexes

2025-11-25 Thread M . Atıf Ceylan
This patch adds two new meta-command modifiers for \dt(+) and \di(+): - O : sort by total relation size descending - o : sort by total relation size ascending This makes it easier to identify the largest tables and indexes without writing custom SQL queries. Help message (\?) is updated to

Additional info for CREATE ROLE with REPLICATION

2025-11-25 Thread Marcos Pegoraro
When a logical replication is created and a ROLE with REPLICATION clause is used for that, there is no info on [0] that that role needs to have read permission on those tables. CREATE PUBLICATION and CREATE SUBSCRIPTION commands works as expected but replication doesn't work, only a "access denied"

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-11-25 Thread Melanie Plageman
Thanks for the review! On Thu, Nov 20, 2025 at 8:10 PM Chao Li wrote: > > * new_relfrozen_xid and new_relmin_mxid must provided by the caller if the > - * HEAP_PRUNE_FREEZE option is set. On entry, they contain the oldest XID > and > - * multi-XID seen on the relation so far. They will be up

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

2025-11-25 Thread Melanie Plageman
On Tue, Nov 25, 2025 at 3:46 PM Andres Freund wrote: > > > > > > I presume you didn't do this because HeapTupleSatisifiesMVCC() for > > > > SNAPSHOT_MVCC calls the non-batch version (and, of course, > > > > HeapTupleSatisifiesVisibility() is the much more common case). > > > > > > > > if (Transact

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Nathan Bossart
On Tue, Nov 25, 2025 at 03:58:47PM -0500, Robert Haas wrote: > On Tue, Nov 25, 2025 at 12:45 PM Nathan Bossart > wrote: >> I gave your idea a try, and I like the result a lot. IMHO it makes the >> code much easier to reason about. > > I looked through this and I agree this looks good. Thanks for

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Andrew Dunstan
On 2025-11-25 Tu 2:36 PM, Daniel Gustafsson wrote: On 25 Nov 2025, at 20:31, Álvaro Herrera wrote: On 2025-Nov-25, Daniel Gustafsson wrote: Agreed. Perhaps something like the attached would work? Hmm, I got this src/tools/pgindent/pgperltidy: 10: [: 0: unexpected operator $ ls -l /bin/sh

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Robert Haas
On Tue, Nov 25, 2025 at 12:45 PM Nathan Bossart wrote: > I gave your idea a try, and I like the result a lot. IMHO it makes the > code much easier to reason about. I looked through this and I agree this looks good. Thanks for working on it. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Bug in amcheck?

2025-11-25 Thread Peter Geoghegan
On Tue, Nov 25, 2025 at 3:03 PM Heikki Linnakangas wrote: > To fix this, I guess we need to teach bt_index_parent_check() about > half-dead pages. Anyone volunteer to write that patch? It's not like bt_index_parent_check doesn't generally know about them. For example, bt_downlink_missing_check go

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

2025-11-25 Thread Andres Freund
Hi, On 2025-11-25 15:02:02 -0500, Melanie Plageman wrote: > On Tue, Nov 25, 2025 at 11:54 AM Andres Freund wrote: > > > > As of this commit nothing uses the new share-exclusive lock mode. It > > > > will be > > > > documented and used in a future commit. It seemed too complicated to > > > > int

Re: [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility

2025-11-25 Thread Peter Eisentraut
On 25.11.25 06:01, Myles Lewis wrote: I've developed a patch that adds native PIVOT syntax to PostgreSQL, enabling SQL Server and Oracle-style pivot queries. Your patch does not contain any documentation, so it's hard to tell what this is supposed to do if you don't already know those other pr

Re: Optimize LISTEN/NOTIFY

2025-11-25 Thread Tom Lane
"Joel Jacobson" writes: > It looks to me like it would be best with two boolean fields; one > boolean to stage the updates during PreCommit_Notify, that each > pendingActions could flip back and forth, and another boolean that > represents the current value, which we would overwrite with the stage

Re: [PATCH] Add mssql_compat extension with DATEDIFF function

2025-11-25 Thread Peter Eisentraut
On 25.11.25 04:25, Myles Lewis wrote: I'd like to propose a new contrib extension: mssql_compat, which provides SQL Server compatible date functions starting with DATEDIFF. I think this could best live as an external project. orafce is a similar project but for Oracle. There might also be oth

Re: Optimize LISTEN/NOTIFY

2025-11-25 Thread Joel Jacobson
On Thu, Nov 20, 2025, at 21:26, Tom Lane wrote: > So I think there needs to be a serious effort made to move as > much as we possibly can of the potentially-risky stuff into > PreCommit_Notify. In particular I think we ought to create > the shared channel hash entry then, and even insert our PID >

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Tom Lane
Daniel Gustafsson writes: >> On 2025-Nov-25, Tom Lane wrote: >>> pgindent has long had a check that you're running the correct version >>> of bsdindent, but I just realized that pgperltidy makes no such check >>> for perltidy. Should we install one? > Agreed. Perhaps something like the attached

Re: Bug in amcheck?

2025-11-25 Thread Heikki Linnakangas
On 19/11/2025 00:19, Mihail Nikalayeu wrote: Hello! Originally I investigated the customer's problem with PG16. And have reproduced it for pg16,. I checked that relevant amcheck code was not changed since pg16, so I thought that the problem takes place for all Postgres versions. But looks like

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

2025-11-25 Thread Melanie Plageman
On Tue, Nov 25, 2025 at 11:54 AM Andres Freund wrote: > > > I skipped 0013 and 0014 after seeing "#if 1" in 0013 :) > > I left that in there to make the comparison easier. But clearly that's not to > be committed... Eh, I mostly just ran out of steam. > > > [PATCH v6 08/14] bufmgr: Implement buf

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Daniel Gustafsson
> On 25 Nov 2025, at 20:31, Álvaro Herrera wrote: > > On 2025-Nov-25, Daniel Gustafsson wrote: > >> Agreed. Perhaps something like the attached would work? > > Hmm, I got this > > src/tools/pgindent/pgperltidy: 10: [: 0: unexpected operator > > $ ls -l /bin/sh > lrwxrwxrwx 1 root root 4 feb

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-25, Daniel Gustafsson wrote: > Agreed. Perhaps something like the attached would work? Hmm, I got this src/tools/pgindent/pgperltidy: 10: [: 0: unexpected operator $ ls -l /bin/sh lrwxrwxrwx 1 root root 4 feb 4 2025 /bin/sh -> dash* (Seems to work ok silently with bash.) -- Ál

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Daniel Gustafsson
> On 25 Nov 2025, at 18:53, Álvaro Herrera wrote: > > On 2025-Nov-25, Tom Lane wrote: > >> pgindent has long had a check that you're running the correct version >> of bsdindent, but I just realized that pgperltidy makes no such check >> for perltidy. Should we install one? > > Yeah, we should

Re: Assertion failure in SnapBuildInitialSnapshot()

2025-11-25 Thread Masahiko Sawada
On Tue, Nov 25, 2025 at 4:02 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 25, 2025 3:30 AM Masahiko Sawada > wrote: > > > > On Mon, Nov 24, 2025 at 10:48 AM Masahiko Sawada > > wrote: > > > > > > On Mon, Nov 24, 2025 at 1:46 AM Amit Kapila > > wrote: > > > > > > > > On Fri, Nov 21,

Re: System views for versions reporting

2025-11-25 Thread Dmitry Dolgov
> On Tue, Nov 25, 2025 at 04:40:52PM +0100, Dmitry Dolgov wrote: > > On Fri, Nov 21, 2025 at 03:21:45PM +0100, Dmitry Dolgov wrote: > > Thanks for the detailed review! I generally agree with most of the > > points and will try to incorporate them into the next version. Below are > > few commentarie

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-25, Jacob Champion wrote: > On Tue, Nov 25, 2025 at 5:30 AM Álvaro Herrera wrote: > > I also noticed that an oauth test file contains a couple MBs of a > > gigantic string of just 'x'. I suppose that will compress well (with > > gzip at least, the 2 MB file becomes 8 kB). Still, it'

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Jacob Champion
On Tue, Nov 25, 2025 at 5:30 AM Álvaro Herrera wrote: > I also noticed that an oauth test file contains a couple MBs of a > gigantic string of just 'x'. I suppose that will compress well (with > gzip at least, the 2 MB file becomes 8 kB). Still, it's kinda > ridiculous and useless to bloat a 67

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-25, Andrew Dunstan wrote: > I think his patches 1 and 3 seem like no-brainers. On 2025-Nov-25, Andres Freund wrote: > On 2025-11-25 14:30:33 +0100, Álvaro Herrera wrote: > > I just noticed that one regress log file for the pg_dump test is about > > 7MB long because it contains total

Re: [PATCH] Avoid pallocs in async.c's "critical section"

2025-11-25 Thread Joel Jacobson
On Tue, Nov 25, 2025, at 16:43, Joel Jacobson wrote: > On Tue, Nov 25, 2025, at 11:15, Joel Jacobson wrote: >> With the following three changes, I think the only remaining >> potentially-risky code in AtCommit_Notify, is the acquire/release of >> locks. > > Patch 0001 and 0002 are unchanged since v

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-25, Tom Lane wrote: > pgindent has long had a check that you're running the correct version > of bsdindent, but I just realized that pgperltidy makes no such check > for perltidy. Should we install one? Yeah, we should definitely have that. -- Álvaro HerreraBreisgau, Deutsc

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-24, Mihail Nikalayeu wrote: > In a few words - it is an attempt to make sure the test goes to the > wake-up backend only after it actually enters to wait mode. For that > reason an additional 'notice' point is used by spec. > I have proposed another possible solution for the [0] thread

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Nathan Bossart
On Tue, Nov 25, 2025 at 11:25:09AM -0500, Robert Haas wrote: > The downside is that then we have to rely on PG_CATCH() to make things > whole. I am not sure that there's any problem with that, but I'm also > not sure that there isn't. The timing of PG_CATCH() block execution > often creates bugs, b

Re: [oauth] SASL mechanisms

2025-11-25 Thread Nico Williams
On Tue, Nov 25, 2025 at 09:19:29AM -0800, Jacob Champion wrote: > On Mon, Nov 24, 2025 at 10:54 AM Nico Williams wrote: > > OAuth comes with batteries not included, unlike Kerberos. > > Yes. :/ It's very sad and annoying. Mangement wants off Kerberos, but the amount of work to do for that is en

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Tom Lane
Daniel Gustafsson writes: > On 25 Nov 2025, at 17:00, Tom Lane wrote: >> =?utf-8?Q?=C3=81lvaro?= Herrera writes: >>> Hmm, I wonder if you ran this with our documented version of perltidy. > ..and since I managed to run it with the wrong version for the attached diff > that > argument certainly

Re: Remaining dependency on setlocale()

2025-11-25 Thread Jeff Davis
On Tue, 2025-11-25 at 09:44 +0800, Chao Li wrote: > I was curious why “inline” is needed, then I figured out when I tried > to build. Without “inline”, compile will raise warnings of “unused > function”. So I guess it’s better to explain why “inline” is used in > the function comment, otherwise oth

Re: [oauth] SASL mechanisms

2025-11-25 Thread Jacob Champion
On Mon, Nov 24, 2025 at 10:54 AM Nico Williams wrote: > OAuth comes with batteries not included, unlike Kerberos. Yes. :/ > > OAuth validators can also be Postgres extensions, so this is at least > > technically feasible to retrieve, though I'm not yet understanding why > > you need set_config()

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

2025-11-25 Thread Fujii Masao
On Mon, Nov 24, 2025 at 6:03 PM Mircea Cadariu wrote: > > Hi, > > > An update: I have two topics from the review perspective. > > On the test I proposed to be added to 030_pg_recvlogical.pl, I found a > way to write it without using sleeps (which risk flakyness in CI). I've > attached it as a patc

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Andrew Dunstan
On 2025-11-25 Tu 10:37 AM, Tom Lane wrote: =?utf-8?Q?=C3=81lvaro?= Herrera writes: With these three patches, we go from having 62 MB bytes in files with "log" in their names under testrun/ (except those that have "catalog") to 30 MB. I think that's not a bad reduction. I wonder how much thi

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

2025-11-25 Thread Andres Freund
Hi, Thanks a lot for that detailed review! A few questions and comments, before I try to address the comments in the next version. On 2025-11-25 10:44:31 -0500, Melanie Plageman wrote: > On Wed, Nov 19, 2025 at 9:47 PM Andres Freund wrote: > > > > 0008: The main change. Implements buffer conte

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ​barriers

2025-11-25 Thread Greg Burd
On Mon, Nov 24, 2025, at 6:20 PM, Andres Freund wrote: > Hi, Thanks again for taking a look at the patch, hopefully I got it right this time. :) > On 2025-11-24 11:28:28 -0500, Greg Burd wrote: >> @@ -2509,25 +2513,64 @@ int main(void) >> } >> ''' >> >> - if cc.links(prog, name: '__crc32cb

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Daniel Gustafsson
> On 25 Nov 2025, at 17:00, Tom Lane wrote: > > =?utf-8?Q?=C3=81lvaro?= Herrera writes: >> On 2025-Nov-25, Daniel Gustafsson wrote: >>> I routinely run pgperltidy src/ when hacking on things, and am greeted with >>> lots of diffs like how pgindent runs used to be. Are there objections to >>> ap

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Robert Haas
On Tue, Nov 25, 2025 at 10:50 AM Nathan Bossart wrote: > I think the only difference between this and 0002 is in step 2. In 0002, > if allocating a tranche fails, we remove the entry from the registry so > that another backend can try again later. Otherwise, we retain the entry > with just the t

Re: Patch: VACUUM should ignore (CREATE |RE)INDEX CONCURRENTLY for xmin horizon calculations

2025-11-25 Thread Matthias van de Meent
On Mon, 24 Nov 2025 at 23:09, Peter Geoghegan wrote: > > On Mon, Nov 24, 2025 at 4:18 PM Hannu Krosing wrote: > > When VACUUM decides which rows are safe to freeze or permanently > > remove it currently ignores backends which have PROC_IN_VACUUM or > > PROC_IN_LOGICAL_DECODING bits set. > > > > T

Re: Missing wait events (gap analysis)

2025-11-25 Thread Nikolay Samokhvalov
Thank you everyone for your opinions!! Answering to multiple questions at once: - of course, I reviewed the list and iterated before sending, I'm not feeding you raw LLM output - however, it was a very raw draft just to show the direction of work, I needed to hear opinions before moving further

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Nov-25, Daniel Gustafsson wrote: >> I routinely run pgperltidy src/ when hacking on things, and am greeted with >> lots of diffs like how pgindent runs used to be. Are there objections to >> applying the diffs we've accumulated so far with a .git-

Re: gen_guc_tables.pl: Validate required GUC fields before code generation

2025-11-25 Thread Peter Eisentraut
On 20.11.25 06:51, Chao Li wrote: On Wed, Nov 19, 2025 at 7:56 PM Dagfinn Ilmari Mannsåker mailto:[email protected]>> wrote: > v3 goes back to v1 plus I add a check for unknown field type per your > suggestion, for example: > ``` > error: guc_parameters.data line 2271: un

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Nathan Bossart
On Tue, Nov 25, 2025 at 10:37:50AM -0500, Robert Haas wrote: > 1. First or create create the dshash entry. If that fails, we haven't > done anything yet, so no problem. > > 2. Next, if there dshash entry doesn't have an assigned tranche ID > yet, then try to assign one. This probably won't fail. B

Re: The pgperltidy diffs in HEAD

2025-11-25 Thread Álvaro Herrera
On 2025-Nov-25, Daniel Gustafsson wrote: > I routinely run pgperltidy src/ when hacking on things, and am greeted with > lots of diffs like how pgindent runs used to be. Are there objections to > applying the diffs we've accumulated so far with a .git-blame-ignore-revs > update alongside it? Are

Re: [PATCH] Avoid pallocs in async.c's "critical section"

2025-11-25 Thread Joel Jacobson
On Tue, Nov 25, 2025, at 11:15, Joel Jacobson wrote: > With the following three changes, I think the only remaining > potentially-risky code in AtCommit_Notify, is the acquire/release of > locks. Patch 0001 and 0002 are unchanged since v2. 0003: Since this thread is specifically about avoiding p

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

2025-11-25 Thread Melanie Plageman
On Wed, Nov 19, 2025 at 9:47 PM Andres Freund wrote: > > 0008: The main change. Implements buffer content locking independently from > lwlock.c. There's obviously a lot of similarity between lwlock.c code and > this, but I've not found a good way to reduce the duplication without giving > up too m

Re: System views for versions reporting

2025-11-25 Thread Dmitry Dolgov
> On Fri, Nov 21, 2025 at 03:21:45PM +0100, Dmitry Dolgov wrote: > Thanks for the detailed review! I generally agree with most of the > points and will try to incorporate them into the next version. Below are > few commentaries / questions for the rest. Here is the updated patch. >From cc30fe6ec5c

Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

2025-11-25 Thread Robert Haas
On Mon, Nov 24, 2025 at 4:25 PM Nathan Bossart wrote: > On Mon, Nov 24, 2025 at 04:02:18PM -0500, Robert Haas wrote: > > I haven't done a full review of this and I'm not sure whether you want > > me to spend more time on it... > > I'd appreciate an eyeball check if you have the time. OK. I am not

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > With these three patches, we go from having 62 MB bytes in files with > "log" in their names under testrun/ (except those that have "catalog") > to 30 MB. I think that's not a bad reduction. I wonder how much this overlaps with what Andrew just did to th

Re: reduce size of logs stored by buildfarm

2025-11-25 Thread Andres Freund
Hi, On 2025-11-25 14:30:33 +0100, Álvaro Herrera wrote: > I just noticed that one regress log file for the pg_dump test is about > 7MB long because it contains totally unnecessary dump files in the > regress log output. This is because the tests run pg_dump of schema > pg_catalog without redirect

  1   2   >