Re: Test to dump and restore objects left behind by regression

2025-03-12 Thread Ashutosh Bapat
Hi Alvaro, On Wed, Mar 12, 2025 at 9:39 PM Alvaro Herrera wrote: > > On 2025-Mar-12, Ashutosh Bapat wrote: > > > Does the test pass for you if you don't apply my patches? > > Yes. It also passes if I keep PG_TEST_EXTRA empty. I am not able to reproduce this problem locally. The test uses In

Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

2025-03-12 Thread Ajin Cherian
Moving this patch to the next CF as this patch needs more design level inputs which may not be feasible in this CF but do continue to review the patch. regards, Ajin Cherian Fujitsu Australia

Re: Document NULL

2025-03-12 Thread Álvaro Herrera
On 2025-Mar-12, David G. Johnston wrote: > I’m not accepting this line of work as part of this patch. Please limit > this to the merits of choosing \N as the particular value for \pset null on > this page. You can start a new thread regarding a policy change for > marking up null values in the w

Re: pg_dump, pg_dumpall, pg_restore: Add --no-policies option

2025-03-12 Thread newtglobal postgresql_contributors
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi, Tested this patch with `--no-policies` option works as expected by ensuri

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2025-03-12 Thread newtglobal postgresql_contributors
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi, Tested the latest patch that allows direct `COPY` operations on Materiali

Re: Vacuum statistics

2025-03-12 Thread Bertrand Drouvot
Hi, On Wed, Mar 12, 2025 at 05:15:53PM -0500, Jim Nasby wrote: > The usecase I can see here is that we don't want autovac creating so much > WAL traffic that it starts forcing other backends to have to write WAL out. > But tracking how many times autovac writes WAL buffers won't help with that Ri

Re: protocol support for labels

2025-03-12 Thread Jeremy Schneider
On Tue, 11 Mar 2025 14:03:12 -0500 Nico Williams wrote: > How about using a `set_config()` to deonte the "application_name" (and > any other details) for the _next_ query, then have those details > appear in the pg_stat_statements rows and logs? > > Clients would send a `SELECT set_config(...)` a

Missing constraint when duplicated unique index ?

2025-03-12 Thread Marcos Pegoraro
CREATE TABLE table_test ( foo text NOT NULL, CONSTRAINT test_pk PRIMARY KEY (foo), CONSTRAINT test_uq UNIQUE (foo) ); building index "pg_toast_29364884_index" on table "pg_toast_29364884" serially building index "test_pk" on table "table_test" serially pg_class has 3 records, table, it

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-12 Thread Dilip Kumar
On Thu, Mar 13, 2025 at 10:49 AM vignesh C wrote: > > On Thu, 13 Mar 2025 at 09:18, Dilip Kumar wrote: > > > > Thanks looks good to me. > > > > While looking at the patch, I have a few comments/questions > > > > + if (pub) > > + result = lappend(result, pub); > > + else > > + { > > + /* > > + * W

RE: long-standing data loss bug in initial sync of logical replication

2025-03-12 Thread Hayato Kuroda (Fujitsu)
Dear hackers, I found that the patch needs to be rebased due to ac4494, PSA new version. It could be applied atop HEAD and tests worked well. Best regards, Hayato Kuroda FUJITSU LIMITED v18-0001-Distribute-invalidatons-if-change-in-catalog-tab.patch Description: v18-0001-Distribute-invalidato

Re: Commitfest Manager for March

2025-03-12 Thread vignesh C
On Thu, 13 Mar 2025 at 10:53, Peter Smith wrote: > > > If time permits I'll try to help you get some of the ("needs review") > threads moving by checking the simple ones first. Thanks, Peter! Would anyone else like to volunteer for this CommitFest? Since it's the last one, more help would be grea

Re: PGSERVICEFILE as part of a normal connection string

2025-03-12 Thread Laurenz Albe
On Thu, 2025-03-13 at 08:53 +0900, Ryo Kanbayashi wrote: > Just to let you know, my action is not intended to steal your > contribution but to prevent your good idea from being lost. > > TO: Mecael and other hackers, > > There are any problem in light of community customs? Anything submitted to

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-12 Thread vignesh C
On Wed, 12 Mar 2025 at 16:15, Dilip Kumar wrote: > > Thanks, Vignesh, for adding the test. I believe you've tested the > effect of DROP PUBLICATION. However, I think we should also test the > behavior of ALTER SUBSCRIPTION...SET PUBLICATION before creating the > PUBLICATION, and then create the PU

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-12 Thread Ashutosh Sharma
Hi, On Wed, Mar 12, 2025 at 9:06 PM Nathan Bossart wrote: > > I think this approach has other problems. For example, even if a role has > admin directly on the dropped role, we'll block DROP ROLE if it also has > admin indirectly: > This is exactly what we're aiming for. We don't want the ADMIN

Re: Commitfest Manager for March

2025-03-12 Thread Peter Smith
On Tue, Feb 18, 2025 at 8:13 PM vignesh C wrote: > > Hi, > > I noticed that no one has volunteered yet for the March 2025 > Commitfest, so I’d like to volunteer to be one of the CF managers for > March 2025 Commitfest. > > Regards, > Vignesh > > Hi Vignesh, If time permits I'll try to help you g

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-12 Thread vignesh C
On Thu, 13 Mar 2025 at 09:18, Dilip Kumar wrote: > > Thanks looks good to me. > > While looking at the patch, I have a few comments/questions > > + if (pub) > + result = lappend(result, pub); > + else > + { > + /* > + * When executing 'ALTER SUBSCRIPTION ... SET PUBLICATION', the > + * apply worke

Re: [PoC] Reducing planning time when tables have many partitions

2025-03-12 Thread David Rowley
On Sat, 1 Mar 2025 at 23:07, Yuya Watari wrote: > The previous patches did not apply to the current master, so I have > rebased them. Thank you for continuing to work on this. My apologies for having completely disappeared from this thread for so long. Looking at v33-0001, there are a few choice

Re: Add connection active, idle time to pg_stat_activity

2025-03-12 Thread Sadeq Dousti
> > I've rebased the patch according to the CI bot's requirements. Please have > a look. > Dear Sergey & Hackers, +1 to the idea, and hope it becomes available in v18. Here are some observations from my review: 1. backend_status.c, Line 572 - the following new condition can break the logic of e

Re: pg_rewind with --write-recovery-conf option doesn't write dbname to primary_conninfo value.

2025-03-12 Thread Masahiko Sawada
On Tue, Mar 11, 2025 at 4:26 PM Masahiko Sawada wrote: > > On Tue, Feb 11, 2025 at 9:36 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Sawada-san, > > > > Thanks for updating the patch! > > > > > I've attached the updated patch. I address all comments I got so far > > > and added a small regres

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Amit Langote
On Wed, Mar 12, 2025 at 21:40 Álvaro Herrera wrote: > On 2025-Mar-12, Amit Langote wrote: > > > Patch look good for committing? > > Ah sorry, I should have said so -- yes, it looks good to me. Thanks (Maciek, Tender too) for the review. I feel a > slight dislike for using URL-escaped charact

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-12 Thread Dilip Kumar
On Thu, Mar 13, 2025 at 7:38 AM vignesh C wrote: > > On Wed, 12 Mar 2025 at 16:15, Dilip Kumar wrote: > > > > Thanks, Vignesh, for adding the test. I believe you've tested the > > effect of DROP PUBLICATION. However, I think we should also test the > > behavior of ALTER SUBSCRIPTION...SET PUBLICA

Re: DOCS: Make the Server Application docs synopses more consistent

2025-03-12 Thread David G. Johnston
On Wednesday, March 12, 2025, David G. Johnston wrote: > > > My take on this is that the presence of environment variables doesn’t > impact whether a given CLI option is shown optional or mandatory. We are, > in effect, communicating that “datadir” must be specified for this > command. And then

Re: Vacuum statistics

2025-03-12 Thread Jim Nasby
On Wed, Mar 12, 2025 at 2:41 PM Alena Rybakina wrote: > Hi! > > On 10.03.2025 12:13, Ilia Evdokimov wrote: > > Hi, > > > > After commit eaf5027 we should add information about wal_buffers_full. > > > > Any thoughts? > > > > -- > > Best regards, > > Ilia Evdokimov, > > Tantor Labs LLC. > > > I thi

DOCS: Make the Server Application docs synopses more consistent

2025-03-12 Thread David G. Johnston
On Wednesday, March 12, 2025, Peter Smith wrote: > > > I've made some updates and attached the v2 patch. Thanks. Full review later. Pg_controldata - TODO. The page structure looks strange. There should be an "Options" > section to describe -D, -V, and -? Agreed. > > [7] pg_resetwal [ -f |

Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

2025-03-12 Thread Ajin Cherian
On Mon, Mar 3, 2025 at 9:10 PM Ajin Cherian wrote: > > On Thu, Feb 20, 2025 at 8:42 PM Hayato Kuroda (Fujitsu) > wrote: > > I confirmed with tests that with the patch, a lot less disk space is used when there are lots of unpublished changes and the subscription is not configured to be streaming.

Re: DOCS: Make the Server Application docs synopses more consistent

2025-03-12 Thread Peter Smith
On Wed, Mar 12, 2025 at 3:18 AM David G. Johnston wrote: > > On Thu, Dec 12, 2024 at 8:25 PM Peter Smith wrote: >> >> [1] initdb [option...] [ --pgdata | -D ] directory >> [2] pg_archivecleanup [option...] archivelocation oldestkeptwalfile >> [3] pg_checksums [option...] [[ -D | --pgdata ]datadir

Re: Separate GUC for replication origins

2025-03-12 Thread vignesh C
On Thu, 13 Mar 2025 at 05:59, Euler Taveira wrote: > > On Wed, Mar 12, 2025, at 8:47 AM, vignesh C wrote: > > I reviewed the discussion on this thread and believe we now have an > agreement on the design and GUC names. However, the patch still needs > updates and extensive testing, especially cons

Re: Dubious server log messages after pg_upgrade

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 08:41:29PM -0400, Tom Lane wrote: > The "corrupted statistics file" whine is most likely > caused by pg_upgrade copying the old system's pgstat.stat file > into the new installation --- is that a good idea? I don't believe pg_upgrade copies that file to the new cluster. At

Re: PGSERVICEFILE as part of a normal connection string

2025-03-12 Thread Michael Paquier
On Thu, Mar 13, 2025 at 08:53:49AM +0900, Ryo Kanbayashi wrote: > If you can't work for ther patch for a while because you are busy or > other some reason, > I can become additinal reviewer and apply review comments from Micael > to the patch instead of you. > > If you don't want my action, plea

Re: Separate GUC for replication origins

2025-03-12 Thread Euler Taveira
On Wed, Mar 12, 2025, at 8:47 AM, vignesh C wrote: > I reviewed the discussion on this thread and believe we now have an > agreement on the design and GUC names. However, the patch still needs > updates and extensive testing, especially considering its impact on > backward compatibility. I'm unsure

Dubious server log messages after pg_upgrade

2025-03-12 Thread Tom Lane
I happened to notice these entries in a log file on a buildfarm member [1]: 2025-03-12 15:39:53.265 UTC [7296] WARNING: found incorrect redo LSN 0/159FB60 (expected 0/4028) 2025-03-12 15:39:53.265 UTC [7296] LOG: corrupted statistics file "pg_stat/pgstat.stat" (this is near the end of the

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2025-03-12 Thread Peter Geoghegan
On Wed, Mar 12, 2025 at 4:28 PM Alena Rybakina wrote: > Thank you for the explanation! > > Now I see why these changes were made. > > After your additional explanations, everything really became clear and I > fully agree with the current code regarding this part. Cool. > However I did not see an

RE: CRC32C Parallel Computation Optimization on ARM

2025-03-12 Thread Devulapalli, Raghuveer
> > Intel has contributed SSE4.2 CRC32C [1] and AVX-512 CRC32C [2] based on > similar techniques to postgres. > > ...this is a restatement of facts we already know. I'm guessing the intended > takeaway is "since Intel submitted an implementation to us based on paper A, > then we are free to separa

Re: PGSERVICEFILE as part of a normal connection string

2025-03-12 Thread Ryo Kanbayashi
On Mon, Jan 27, 2025 at 2:01 PM Michael Paquier wrote: > > On Wed, Nov 20, 2024 at 02:58:43AM -0500, Corey Huinker wrote: > > Currently, a lot of our utility scripts (anything that uses > > connectDatabase) don't support service=name params or PGSERVICE=name env > > vars, which is really too bad.

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2025-03-12 Thread Jacob Champion
On Fri, Mar 7, 2025 at 10:28 AM Jacob Champion wrote: > > I think some of the wrapped calls into library code might actually call back > > into our code (to receive/send data), and our code then will use wait events > > around lower level operations done as part of that. > > That would be a proble

Re: Add connection active, idle time to pg_stat_activity

2025-03-12 Thread Sadeq Dousti
Dear Sergey & Hackers, +1 to the idea, and hope it becomes available in v18. Here are some observations from my review: 1. backend_status.c, Line 572 - the following new condition can break the logic of existing code, please move it inside the IF body, where you compute values for pg_stat_sessio

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-12 Thread Masahiko Sawada
On Wed, Mar 12, 2025 at 3:34 AM Amit Kapila wrote: > > On Tue, Mar 11, 2025 at 9:48 AM Dilip Kumar wrote: > > > > On Mon, Mar 10, 2025 at 10:54 AM Amit Kapila > > wrote: > > > > > > > > >> BTW, I am planning to commit this only on HEAD as this is a behavior > > > >> change. Please let me know i

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-12 Thread Melanie Plageman
Thanks for taking a look. I've pushed the patch to increase the default effective_io_concurrency. On Tue, Mar 11, 2025 at 8:07 PM Andres Freund wrote: > > On 2025-03-10 19:45:38 -0400, Melanie Plageman wrote: > > From 7b35b1144bddf202fb4d56a9b783751a0945ba0e Mon Sep 17 00:00:00 2001 > > From: Mel

Re: Conflict detection for multiple_unique_conflicts in logical replication

2025-03-12 Thread Nisha Moond
On Wed, Mar 12, 2025 at 6:33 AM Peter Smith wrote: > > Hi Nisha, > > Thanks for addressing some of my v1 comments. I confirmed they are all > ok. But, I haven't reviewed the v2 again because I still had doubts > about the "stats" question and am waiting to see how that pans out. > Meanwhile, I ha

Re: Rename functions to alloc/free things in reorderbuffer.c

2025-03-12 Thread Heikki Linnakangas
On 12/03/2025 21:31, Tom Lane wrote: Heikki Linnakangas writes: ReorderBufferGetRelids allocates an array with MemoryContextAlloc, and ReorderBufferReturnRelids just calls pfree. The pools are long gone, and now the naming looks weird. Attached patch renames those functions and other such fu

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2025-03-12 Thread Alena Rybakina
On 12.03.2025 01:59, Peter Geoghegan wrote: On Tue, Mar 11, 2025 at 6:24 PM Alena Rybakina wrote: Hi, reviewing the code I noticed that you removed the parallel_aware check for DSM initialization for BitmapIndexScan, IndexScan, IndexOnlyScan, but you didn't do the same in the ExecParallelReInit

Re: making EXPLAIN extensible

2025-03-12 Thread Sami Imseih
> I think this is a seriously bad idea. The first line is already > overloaded; we don't need several different extensions adding more > stuff to it. Fair enough. > Plus, this doesn't consider what to do in non-text > output formats. the hook will be a no-op for non-text formats, which is not d

Re: remove open-coded popcount in acl.c

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 01:35:39PM -0500, Nathan Bossart wrote: > Thanks for the quick review. I'll plan on committing this shortly if CI is > happy. Committed. -- nathan

Re: Non-text mode for pg_dumpall

2025-03-12 Thread Andrew Dunstan
On 2025-03-12 We 3:03 AM, jian he wrote: On Wed, Mar 12, 2025 at 1:06 AM Álvaro Herrera wrote: Hello, On 2025-Mar-11, Mahendra Singh Thalor wrote: In map.dat file, I tried to fix this issue by adding number of characters in dbname but as per code comments, as of now, we are not supporting

Re: Optimization for lower(), upper(), casefold() functions.

2025-03-12 Thread Jeff Davis
On Wed, 2025-03-12 at 19:55 +0300, Alexander Borisov wrote: > 1. Added static for casemap() function. Otherwise the compiler could > not > optimize the code and the performance dropped significantly. Oops, it was static, but I made it external just to see what code it generated. I didn't intend to

Re: making EXPLAIN extensible

2025-03-12 Thread Tom Lane
Sami Imseih writes: > 1/ As you can see form the output above, I used explain_per_node_hook > to append a "Plan Node ID" to the explain output. I really don't like having > it > there, and prefer that it gets added to the top line of the node. > i.e. >-> Foreign Scan on t_r1 (cost=100.00..

Re: Vacuum statistics

2025-03-12 Thread Alena Rybakina
Hi! On 10.03.2025 12:13, Ilia Evdokimov wrote: Hi, After commit eaf5027 we should add information about wal_buffers_full. Any thoughts? -- Best regards, Ilia Evdokimov, Tantor Labs LLC. I think I can add it. To be honest, I haven't gotten to know this statistic yet, haven't had time to get

Re: making EXPLAIN extensible

2025-03-12 Thread Sami Imseih
Hi, >>> EXPLAIN output. It wouldn't make sense for core to have an EXPLAIN >>> option whose whole purpose is to cater to the needs of some extension, >>> so that made me think of providing some extensibility infrastructure. >> Making EXPLAIN extensible sounds like a good idea.. FWIW, There is a

Re: Vacuum statistics

2025-03-12 Thread Alena Rybakina
Hi! On 10.03.2025 16:33, Kirill Reshke wrote: On Thu, 27 Feb 2025 at 23:00, Alena Rybakina wrote: Hi! On 17.02.2025 17:46, Alena Rybakina wrote: On 04.02.2025 18:22, Alena Rybakina wrote: Hi! Thank you for your review! On 02.02.2025 23:43, Alexander Korotkov wrote: On Mon, Jan 13, 2025 at

Re: vacuumdb changes for stats import/export

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 01:56:04PM +0700, John Naylor wrote: > The change here seems fine. My only quibble is that this sentence now > seems out of place: "Option --analyze-in-stages can be used to > generate minimal statistics quickly." I'm thinking we should make a > clearer separation for with a

Re: Optimization for lower(), upper(), casefold() functions.

2025-03-12 Thread Alexander Borisov
12.03.2025 19:55, Alexander Borisov wrote: [...] A couple questions: * Is there a reason the fast-path for codepoints < 0x80 is in unicode_case.c rather than unicode_case_func.h? Yes, this is an important optimization, below are benchmarks that [...] I forgot to add the benchmark: Benchm

Re: Rename functions to alloc/free things in reorderbuffer.c

2025-03-12 Thread Tom Lane
Heikki Linnakangas writes: > ReorderBufferGetRelids allocates an array with MemoryContextAlloc, and > ReorderBufferReturnRelids just calls pfree. The pools are long gone, and > now the naming looks weird. > Attached patch renames those functions and other such functions to use > the terms Allo

Re: Handle interrupts while waiting on Append's async subplans

2025-03-12 Thread Heikki Linnakangas
On 03/03/2025 19:44, Heikki Linnakangas wrote: In any case, the attached patch works and seems like an easy fix for stable branches at least. Committed that to master and all affected stable branches. -- Heikki Linnakangas Neon (https://neon.tech)

Re: remove open-coded popcount in acl.c

2025-03-12 Thread Álvaro Herrera
On 2025-Mar-12, Nathan Bossart wrote: > On Wed, Mar 12, 2025 at 05:23:25PM +0100, Álvaro Herrera wrote: > > Strange: this code is not covered by any tests. > > > > https://coverage.postgresql.org/src/backend/utils/adt/acl.c.gcov.html#5533 > > https://coverage.postgresql.org/src/backend/utils/adt/

Re: remove open-coded popcount in acl.c

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 07:34:16PM +0100, Álvaro Herrera wrote: > Thanks :-) I confirm that this covers the code in select_best_grantor > that you're modifying. Thanks for the quick review. I'll plan on committing this shortly if CI is happy. -- nathan

Re: remove open-coded popcount in acl.c

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 05:23:25PM +0100, Álvaro Herrera wrote: > Strange: this code is not covered by any tests. > > https://coverage.postgresql.org/src/backend/utils/adt/acl.c.gcov.html#5533 > https://coverage.postgresql.org/src/backend/utils/adt/acl.c.gcov.html#5438 Huh. Well, it's easy enoug

Re: Add Postgres module info

2025-03-12 Thread Andrei Lepikhov
On 7/3/2025 16:56, Andrei Lepikhov wrote: On 2/3/2025 20:35, Andrei Lepikhov wrote: On 17/2/2025 04:00, Michael Paquier wrote: No documentation provided. Ok, I haven't been sure this idea has a chance to be committed. I will introduce the docs in the next version. This is a new version with bu

Re: [PATCH] SVE popcount support

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 10:34:46AM +, chiranmoy.bhattacha...@fujitsu.com wrote: > On Wed, Mar 12, 2025 at 02:41:18AM +, nathandboss...@gmail.com wrote: > >> v5-no-sve is the result of using a function pointer, but pointing to the >> "slow" versions instead of the SVE version. v5-sve is t

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Alvaro Herrera
On 2025-Mar-12, Rushabh Lathia wrote: > Hi Alvaro, > > Here are the latest patches, which includes the regression fix. Thank you. Taking a step back after discussing this with some colleagues, I need to contradict what I said at the start of this thread. There's a worry that changing pg_attrib

Re: Replace IN VALUES with ANY in WHERE clauses during optimization

2025-03-12 Thread Alena Rybakina
Hi, Alexander! On 06.03.2025 11:23, Alexander Korotkov wrote: Hi, Alena! On Sat, Mar 1, 2025 at 1:39 PM Alena Rybakina wrote: On 09.02.2025 18:38, Alexander Korotkov wrote: Also, aren't we too restrictive while requiring is_simple_values_sequence()? For instance, I believe cases like this (c

Re: Primary and standby setting cross-checks

2025-03-12 Thread Kirill Reshke
On Thu, 29 Aug 2024 at 23:52, Heikki Linnakangas wrote: > > Currently, if you configure a hot standby server with a smaller > max_connections setting than the primary, the server refuses to start up: > > LOG: entering standby mode > FATAL: recovery aborted because of insufficient parameter setti

Rename functions to alloc/free things in reorderbuffer.c

2025-03-12 Thread Heikki Linnakangas
I noticed some weird naming conventions in reorderbuffer.c which are leftovers from a long time ago when reorderbuffer.c maintained its own small memory pools to reduce palloc/pfree overhead. For example: extern Oid *ReorderBufferGetRelids(ReorderBuffer *rb, int nrelids); extern void ReorderBuf

001_rep_changes.pl succeeds after a long time

2025-03-12 Thread Álvaro Herrera
Hello, I noticed that the test file 001_repo_changes.pl finished successfully after having taken 180s to run. This seems pretty suspicious -- normally that step takes around one second. The problem is seen in this step: [19:44:49.572](0.262s) ok 24 - update works with dropped subscriber column

Re: AIO v2.5

2025-03-12 Thread Andres Freund
Hi, On 2025-03-11 20:57:43 -0700, Noah Misch wrote: > > I think we'll really need to do something about this for BSD users > > regardless > > of AIO. Or maybe those OSs should fix something, but somehow I am not having > > high hopes for an OS that claims to have POSIX confirming unnamed semaphor

Re: Statistics import and export: difference in statistics of materialized view dumped

2025-03-12 Thread Ashutosh Bapat
On Wed, Mar 12, 2025 at 4:08 AM Jeff Davis wrote: > > On Tue, 2025-03-11 at 11:26 -0400, Tom Lane wrote: > > Right, that was what I was thinking, but hadn't had time to look in > > detail. The postDataBound dependency isn't real helpful here, we > > could lose that if we had the data dependency.

Re: Parallel safety docs for CTEs

2025-03-12 Thread James Coleman
On Tue, Nov 19, 2024 at 2:16 PM James Coleman wrote: > > Hello, > > A colleague noticed today that the docs still say that "Scans of > common table expressions (CTEs)" are "always parallel restricted". > > While I think that strictly remains true at the implementation level, > from a user's perspe

Re: Index AM API cleanup

2025-03-12 Thread Mark Dilger
On Wed, Mar 12, 2025 at 7:25 AM Tom Lane wrote: > Peter Eisentraut writes: > > 0002: Add get_opfamily_member_for_cmptype(). This was called > > get_opmethod_member() in your patch set, but I think that name wasn't > > quite right. I also removed the opmethod argument, which was rarely > > used

Re: Test to dump and restore objects left behind by regression

2025-03-12 Thread Alvaro Herrera
On 2025-Mar-12, Ashutosh Bapat wrote: > Does the test pass for you if you don't apply my patches? Yes. It also passes if I keep PG_TEST_EXTRA empty. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

Re: remove open-coded popcount in acl.c

2025-03-12 Thread Álvaro Herrera
On 2025-Mar-12, Nathan Bossart wrote: > There's a count_one_bits() function in acl.c that can be replaced with a > call to pg_popcount64(). This isn't performance-critical code, but IMHO we > might as well use the centralized implementation. Makes sense. Patch looks good to me. > @@ -5532,7 +5

Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions

2025-03-12 Thread Nazir Bilal Yavuz
Hi, On Mon, 17 Feb 2025 at 19:59, Andres Freund wrote: > > Hi, Thanks for the review! And sorry for the late reply. > On 2024-12-25 15:57:34 +0300, Nazir Bilal Yavuz wrote: > > So, this patchset extends pg_buffercache with 3 functions: > > > > 1- pg_buffercache_evict_all(): This is very similar

Re: AIO v2.5

2025-03-12 Thread Andres Freund
Hi, On 2025-03-11 19:55:35 -0400, Andres Freund wrote: > On 2025-03-11 12:41:08 -0700, Noah Misch wrote: > > On Mon, Sep 16, 2024 at 01:51:42PM -0400, Andres Freund wrote: > > > On 2024-09-16 07:43:49 -0700, Noah Misch wrote: > > > > For non-sync IO methods, I gather it's essential that a process

Re: Test to dump and restore objects left behind by regression

2025-03-12 Thread Ashutosh Bapat
On Wed, Mar 12, 2025 at 5:35 PM Alvaro Herrera wrote: > > Hello > > When running these tests, I encounter this strange diff in the dumps, > which seems to be that the locale for type money does not match. I > imagine the problem is that the locale is not set correctly when > initdb'ing one of the

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-12 Thread Nathan Bossart
On Wed, Mar 12, 2025 at 12:10:30PM +0530, Ashutosh Sharma wrote: > I think moving the check to the second pass won´t work in this case. > The reason is that we rely on entries in the pg_auth_members table. By > the time the check occurs in the second pass, the first pass will have > already removed

Re: Index AM API cleanup

2025-03-12 Thread Mark Dilger
On Wed, Mar 12, 2025 at 7:00 AM Peter Eisentraut wrote: > And another small patch set extracted from the bigger one, to keep > things moving along: > > 0001: Add get_opfamily_method() in lsyscache.c, from your patch set. > Right, this came from v21-0006-*, with a slight code comment change and o

remove open-coded popcount in acl.c

2025-03-12 Thread Nathan Bossart
There's a count_one_bits() function in acl.c that can be replaced with a call to pg_popcount64(). This isn't performance-critical code, but IMHO we might as well use the centralized implementation. -- nathan >From 932fac13bf168571b145a54c29d9ac28ca2a070f Mon Sep 17 00:00:00 2001 From: Nathan Bos

Re: Introduce "log_connection_stages" setting.

2025-03-12 Thread Melanie Plageman
On Mon, Mar 3, 2025 at 6:43 PM Melanie Plageman wrote: > > Okay, I got cold feet today working on this. I actually think we > probably want some kind of guc set (set like union/intersection/etc > not set like assign a value) infrastructure for gucs that can be equal > to any combination of predete

Re: Log connection establishment timings

2025-03-12 Thread Melanie Plageman
On Tue, Mar 11, 2025 at 6:27 PM Melanie Plageman wrote: > > I did more manual testing of my patches, and I think they are mostly > ready for commit except for the IsConnectionBackend() macro (if we > have something to change it to). I've committed this and marked it as such in the CF app. Thanks

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-03-12 Thread Andrey Borodin
> On 12 Mar 2025, at 20:02, Evgeny Voropaev wrote: > v6 looks good to me. I'll flip the CF entry. Thanks! Best regards, Andrey Borodin.

Re: Draft for basic NUMA observability

2025-03-12 Thread Jakub Wartak
On Mon, Mar 10, 2025 at 11:14 AM Bertrand Drouvot wrote: > Thanks for the new version! v10 is attached with most fixes after review and one new thing introduced: pg_numa_available() for run-time decision inside tests which was needed after simplifying code a little bit as you wanted. I've also f

Re: Optimizing FastPathTransferRelationLocks()

2025-03-12 Thread Ashutosh Bapat
On Tue, Mar 11, 2025 at 8:46 PM Fujii Masao wrote: > > > > On 2025/03/11 20:55, Ashutosh Bapat wrote: > > Hi Fujii-san, > > > > It seems that this was forgotten somehow. > > > > The patch still applies. > > > > Examining c4d5cb71d229095a39fda1121a75ee40e6069a2a, it seems that this patch > > could

Re: dblink: Add SCRAM pass-through authentication

2025-03-12 Thread Jacob Champion
On Mon, Mar 10, 2025 at 11:25 AM Jacob Champion wrote: > > On Fri, Mar 7, 2025 at 8:22 AM Peter Eisentraut wrote: > > Right. How about the attached? It checks as an alternative to a > > password whether the SCRAM keys were provided. That should get us back > > to the same level of checking? >

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-03-12 Thread Evgeny Voropaev
Hello Hackers! Andrey, thank you for your review and remarks. > Patch adds whitespace errors Cleaned. > if (writePage != 0) should be if (writePage) Done. > XLogSimpleInsert(int64 simpledata, RmgrId rmid, uint8 info) > I’d rename function XLogSimpleInsert() to something more descriptive > and

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Rushabh Lathia
On Wed, Mar 12, 2025 at 3:20 PM Alvaro Herrera wrote: > On 2025-Mar-12, Ashutosh Bapat wrote: > > > If the test passes for you, can you please try the patches at [1] on > > top of your patches? Please apply those, set and export environment > > variable PG_TEST_EXTRA=regress_dump_test, and run 00

Re: Implement waiting for wal lsn replay: reloaded

2025-03-12 Thread Yura Sokolov
10.03.2025 14:30, Alexander Korotkov пишет: > On Fri, Feb 28, 2025 at 3:55 PM Yura Sokolov wrote: >> 28.02.2025 16:03, Yura Sokolov пишет: >>> 17.02.2025 00:27, Alexander Korotkov wrote: On Thu, Feb 6, 2025 at 10:31 AM Yura Sokolov wrote: > I briefly looked into patch and have coup

Re: Proposal: Progressive explain

2025-03-12 Thread Euler Taveira
On Fri, Mar 7, 2025, at 5:34 PM, Rafael Thofehrn Castro wrote: > Did additional benchmarks and found issues with the patch that doesn't do > execProcNode > wrapping. There are sporadic crashes with **double free or corruption (top)** > > So making the patch that uses the wrapper the current

Re: Index AM API cleanup

2025-03-12 Thread Tom Lane
Peter Eisentraut writes: > 0002: Add get_opfamily_member_for_cmptype(). This was called > get_opmethod_member() in your patch set, but I think that name wasn't > quite right. I also removed the opmethod argument, which was rarely > used and is somewhat redundant. Hm, that will throw an error

Re: Index AM API cleanup

2025-03-12 Thread Peter Eisentraut
And another small patch set extracted from the bigger one, to keep things moving along: 0001: Add get_opfamily_method() in lsyscache.c, from your patch set. 0002: Add get_opfamily_member_for_cmptype(). This was called get_opmethod_member() in your patch set, but I think that name wasn't quit

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Alvaro Herrera
On 2025-Mar-12, Ashutosh Bapat wrote: > The 002_pg_upgrade test passes with and without my patches now. But > then the tests added here do not leave behind any parent-child table. > Previously we have found problems in dumping and restoring constraints > in an inheritance hierarchy. I think the te

Re: [PoC] Reducing planning time when tables have many partitions

2025-03-12 Thread newtglobal postgresql_contributors
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, failed Spec compliant: tested, failed Documentation:tested, failed Hi Yuya, Tested this patch and noted that this patch signific

Re: Parallel heap vacuum

2025-03-12 Thread Amit Kapila
On Wed, Mar 12, 2025 at 11:24 AM Dilip Kumar wrote: > > On Wed, Mar 12, 2025 at 3:17 AM Masahiko Sawada wrote: > > > > On Tue, Mar 11, 2025 at 5:51 AM Amit Kapila wrote: > > > > > Some thoughts/questions on the idea > > I notice that we are always considering block-level parallelism for > heaps

Re: dblink query interruptibility

2025-03-12 Thread Andreas Karlsson
On 3/12/25 12:48 AM, Noah Misch wrote: The CREATE DATABASE hang is indeed new in v15. The general dblink missed interrupt processing (e.g. pg_cancel_backend response delay) is an old bug. Aha, that was what you were referring to! My apologies, was reading your mail a bit too quickly. :) Co

Re: meson vs. llvm bitcode files

2025-03-12 Thread Diego Fronza
Hi, The v7 patch looks good to me, handling the bitcode modules in a uniform way and also avoiding the hacky code and warnings, much better now. A small note about the bitcode emission for generated sources in contrib, using cube as example, currently it creates two dict entries in a list: bc_seg

Re: RFC: Additional Directory for Extensions

2025-03-12 Thread Matheus Alcantara
On Tue, Mar 11, 2025 at 12:59 PM Peter Eisentraut wrote: > Yes, that structure looks ok. But you can remove one level of block in > get_extension_control_directories(). > Sorry, missed during debugging. Fixed > I found a bug that was already present in my earlier patch versions: > > @@ -423,7 +4

Re: Changing the state of data checksums in a running cluster

2025-03-12 Thread Dagfinn Ilmari Mannsåker
Tomas Vondra writes: > On 3/11/25 14:07, Dagfinn Ilmari Mannsåker wrote: >> As the resident perl style pedant, I'd just like to complain about the >> below: >> >> Tomas Vondra writes: >> >>> diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm >>> b/src/test/perl/PostgreSQL/Test/Cluster.pm >

Re: Changing the state of data checksums in a running cluster

2025-03-12 Thread Tomas Vondra
On 3/11/25 14:07, Dagfinn Ilmari Mannsåker wrote: > As the resident perl style pedant, I'd just like to complain about the > below: > > Tomas Vondra writes: > >> diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm >> b/src/test/perl/PostgreSQL/Test/Cluster.pm >> index 666bd2a2d4c..1c66360c16c

Re: Logical Replication of sequences

2025-03-12 Thread vignesh C
On Wed, 12 Mar 2025 at 09:14, vignesh C wrote: > > The patch was not applying on top of HEAD because of recent commits, > here is a rebased version. I have moved this to the next CommitFest since it will not be committed in the current release. This also allows reviewers to focus on the remaining

Re: Change log level for notifying hot standby is waiting non-overflowed snapshot

2025-03-12 Thread torikoshia
Hi, After an off-list discussion with Fujii-san, I'm now trying to modify the following message that is output when a client attempts to connect instead of changing the log level as the original proposal: $ psql: error: connection to server at "localhost" (::1), port 5433 failed: FATAL: t

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Rushabh Lathia
Hi Alvaro, Here are the latest patches, which includes the regression fix. Thanks, On Wed, Mar 12, 2025 at 3:38 PM Ashutosh Bapat wrote: > On Wed, Mar 12, 2025 at 3:20 PM Alvaro Herrera > wrote: > > > > On 2025-Mar-12, Ashutosh Bapat wrote: > > > > > If the test passes for you, can you ple

Re: Document NULL

2025-03-12 Thread David G. Johnston
On Wednesday, March 12, 2025, Marcos Pegoraro wrote: > Em ter., 11 de mar. de 2025 às 17:43, Tom Lane > escreveu: > >> I think that idea (changing all the docs) is a complete nonstarter >> because people would not understand why the results they get don't >> look like what it says in the docs.

Re: per backend WAL statistics

2025-03-12 Thread Tom Lane
Michael Paquier writes: > And I guess that we're OK here, so applied. That should be the last > one. Quite a few buildfarm members are not happy about the initialization that 9a8dd2c5a added to PendingBackendStats. For instance [1]: gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -W

  1   2   >