Re: [PATCH] Fix fragile walreceiver test.

2025-11-04 Thread Michael Paquier
On Wed, Nov 05, 2025 at 03:30:30PM +0800, Xuneng Zhou wrote: > On Wed, Nov 5, 2025 at 2:50 PM Michael Paquier wrote: >> Timing issue then, the buildfarm has not been complaining on this one >> AFAIK, there have been no recoveryCheck failures reported: >> https://buildfarm.postgresql.org/cgi-bin/sh

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

2025-11-04 Thread Nishant Sharma
On Wed, Nov 5, 2025 at 12:56 AM Álvaro Herrera wrote: > On 2025-Nov-04, Jim Jones wrote: > > > That's the way I see it too. Of course it's always easier to use the > > tablespace's name, but there might be cases where you only have the oid > > -- in which case you'd need to do a JOIN with pg_tabl

Re: [PATCH] Fix fragile walreceiver test.

2025-11-04 Thread Xuneng Zhou
Hi, On Wed, Nov 5, 2025 at 2:50 PM Michael Paquier wrote: > > On Wed, Nov 05, 2025 at 12:03:29AM -0600, Bryan Green wrote: > > Problem: restart() kills the walreceiver (as it should), which writes > > that exact FATAL message to the log. The test then searches the log and > > finds it. > > Timing

Re: Adding REPACK [concurrently]

2025-11-04 Thread Antonin Houska
Robert Treat wrote: > On Tue, Nov 4, 2025 at 9:48 PM jian he wrote: > > what the expectation of > > pg_repackdb --index=index_name, the doc is not very helpful. > > > > pg_repackdb --analyze --index=zz --verbose > > pg_repackdb: repacking database "src3" > > pg_repackdb: error: processing of da

Re: Decouple C++ support in Meson's PGXS from LLVM enablement

2025-11-04 Thread BharatDB
Hi Tristan, Andres, Jelte, and pgsql-hackers, Thank you for the excellent work on decoupling C++ support in Meson from LLVM SUMMARY: v2 PATCH TESTED AND WORKS PERFECTLY - Built PostgreSQL 19devel (current master) with Meson - Config: -Dllvm=disabled -Dcpp_support=auto - Before patch: CXX = (em

Re: Non-text mode for pg_dumpall

2025-11-04 Thread Vaibhav Dalvi
Hi Mahendra, Thank you for the fix. Please find my further review comments below. ### Restrict-Key Option The `--restrict-key` option is currently being accepted by `pg_dumpall` even when non-plain formats are specified, which contradicts its intended use only with the plain format. For example

Re: [PATCH] Fix fragile walreceiver test.

2025-11-04 Thread Michael Paquier
On Wed, Nov 05, 2025 at 12:03:29AM -0600, Bryan Green wrote: > Problem: restart() kills the walreceiver (as it should), which writes > that exact FATAL message to the log. The test then searches the log and > finds it. Timing issue then, the buildfarm has not been complaining on this one AFAIK, th

Re: Asynchronous MergeAppend

2025-11-04 Thread Alexander Pyhalov
Hi. Matheus Alcantara писал(а) 2025-11-03 16:00: So I'm +1 for the idea. I know it's been while since the last patch, and unfortunully it hasn't received reviews since then. Do you still plan to work on it? I still need to take a look on the code to see if I can help with some comments. Duri

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

2025-11-04 Thread shveta malik
On Tue, Nov 4, 2025 at 3:17 PM shveta malik wrote: > > On Mon, Nov 3, 2025 at 3:14 PM shveta malik wrote: > > > > > > > > I have attached the latest patch. > > > > > > > Thanks. I have started going through it. > > > > I’m not sure if this has already been discussed; I couldn’t find any > > menti

GiST README typos

2025-11-04 Thread Paul A Jungwirth
Hi Hackers, Here are fixes to a few typos I found in the GiST README. Yours, -- Paul ~{:-) [email protected] v1-0001-Fix-a-few-typos-in-the-GiST-README.patch Description: Binary data

[PATCH] Fix fragile walreceiver test.

2025-11-04 Thread Bryan Green
The recovery/004_timeline_switch test has been failing for me on Windows. The test is wrong. The test does this: $node_standby_2->restart; # ... timeline switch happens ... ok( !$node_standby_2->log_contains( "FATAL: .* terminating walreceiver process due to administrator

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-11-04 Thread Michael Paquier
On Wed, Oct 29, 2025 at 04:58:22PM -0500, Sami Imseih wrote: > We can actually remove "temporary file removed" > and "no statement logged" since we expect the > logging to blame the correct query in all these cases. While looking at the surroundings, I have noticed one comment on top of the call o

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread David Rowley
On Wed, 5 Nov 2025 at 17:00, Alexander Lakhin wrote: > But while playing around, I've just discovered another interesting error: > > SET enable_seqscan = 'off'; > SELECT * FROM t EXCEPT SELECT * FROM t > UNION SELECT * FROM pt; > > leads to: > ERROR: XX000: no relation entry for relid 0 > LOCATIO

Re: Adding REPACK [concurrently]

2025-11-04 Thread Robert Treat
On Tue, Nov 4, 2025 at 9:48 PM jian he wrote: > On Fri, Oct 31, 2025 at 7:17 AM Alvaro Herrera > wrote: > > > > Hello, > > > > Here's a new installment of this series, v25, including the CONCURRENTLY > > part, which required some conflict fixes on top of the much-changed > > v24-0001 patch. > >

Re: DOCS: ALTER PUBLICATION - Synopsis for DROP is a bit misleading

2025-11-04 Thread Fujii Masao
On Wed, Nov 5, 2025 at 8:26 AM Peter Smith wrote: > > Bump. I found this old thread of mine had received no responses for > several months. > > Any thoughts about the problem it describes? +1 to fixing the misleading synopsis. The patch looks good to me. Unless there are any objections, I'll go a

Re: Add support for specifying tables in pg_createsubscriber.

2025-11-04 Thread Shubham Khanna
On Mon, Nov 3, 2025 at 12:55 PM Peter Smith wrote: > > Hi Shubham. > > A comment about the v17-0001. > > == > 1. > + if (check_publication_exists(conn, dbinfo[i].pubname, dbinfo[i].dbname)) > + { > + /* Reuse existing publication on publisher. */ > + pg_log_info("dry-run: would use existing pu

Re: [PATCH] Add archive_mode=follow_primary to prevent unarchived WAL on standby promotion

2025-11-04 Thread Fujii Masao
On Sat, Nov 1, 2025 at 3:14 AM Andrey Borodin wrote: > Many storages charge for request. If archive tool issues HEAD request to S3 - > it might costs user some money. > Other storages cap frequency of requests at some RPS. In worst case we might > affect archiving capabilities of primary. > > Th

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread Alexander Lakhin
Hello David! 05.11.2025 00:55, David Rowley wrote: I finally decided that it was a bit too obscure a scenario to test to verify that the same silly mistake didn't reappear. Thanks again for the report and the simple recreation steps. Thank you for the fix! But while playing around, I've just

Re: Fix comments for ChangeVarNodes() and related functions

2025-11-04 Thread Richard Guo
On Mon, Nov 3, 2025 at 9:14 PM Peter Eisentraut wrote: > On 23.10.25 10:59, Richard Guo wrote: > > I happend to notice this comment for ChangeVarNodes(): > > > > * Specifying 'change_RangeTblRef' to false allows skipping RangeTblRef. > > * See ChangeVarNodesExtended for details. > > > > Howeve

Re: Extend injection_points_attach() to accept a user-defined function

2025-11-04 Thread Michael Paquier
On Tue, Nov 04, 2025 at 02:17:44PM +0530, Rahila Syed wrote: > PFA a rebased patch that contains the test. > The tests use the newly added SQL function to attach the injection_notice > function to an injection point + if (injection_point_local) + { + condition.type = INJ_

Re: Adding REPACK [concurrently]

2025-11-04 Thread jian he
On Fri, Oct 31, 2025 at 7:17 AM Alvaro Herrera wrote: > > Hello, > > Here's a new installment of this series, v25, including the CONCURRENTLY > part, which required some conflict fixes on top of the much-changed > v24-0001 patch. > pg_repackdb repack and analyze a PostgreSQL database b

Re: meson's in-tree libpq header search order vs -Dextra_include_dirs

2025-11-04 Thread Thomas Munro
On Wed, Nov 5, 2025 at 8:55 AM Andres Freund wrote: > The problem is caused by us adding extra_include_dirs to postgres_inc_d, which > does not include the private include dir for e.g. libpq. As it is added to > frontend_code etc as a flat list, there's no way for meson to know that > src/interfac

Re: ubsan

2025-11-04 Thread Tom Lane
Alexander Lakhin writes: > I've just discovered that that function __ubsan_default_options() is > incompatible with -fsanitize=hwaddress: > $ tmp_install/usr/local/pgsql/bin/postgres > Segmentation fault Hi Alexander, I wonder if you can still reproduce this problem, and if so whether the patch p

Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

2025-11-04 Thread Tom Lane
Jacob Champion writes: > On Tue, Nov 4, 2025 at 2:39 PM Tom Lane wrote: >> Another problem is that it only defends against a limited set of >> sanitizers, though presumably every single one is broken in the same >> way (compare [1]). > How about __attribute__((disable_sanitizer_instrumentation))

Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

2025-11-04 Thread Naga Appani
Thank you for the feedback, Tomas! I agree with the goal you outlined, providing a user-friendly “how much space is left” signal would make monitoring far more actionable. On Sat, Oct 18, 2025 at 6:18 AM Tomas Vondra wrote: > > Knowing num_mxids / num_members or members_size is nice, but how woul

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Joel Jacobson
On Tue, Nov 4, 2025, at 13:09, Heikki Linnakangas wrote: > The elephant in the room of course is that a lookup in a linked list is > O(n) and it would be very straightforward to replace it with e.g. a hash > table. We should do that irrespective of this bug fix. But I'm inclined > to do it as a

Re: Optimize LISTEN/NOTIFY

2025-11-04 Thread Joel Jacobson
On Wed, Nov 5, 2025, at 01:58, Joel Jacobson wrote: > Changes since v22: > > * Optimize listening on thousands of channels per backend by replacing > the listenChannels List with a local hash table, renamed to > listenChannelsHash to avoid confusion. I forgot to say that this is per idea from

Re: Optimize LISTEN/NOTIFY

2025-11-04 Thread Joel Jacobson
On Sat, Nov 1, 2025, at 21:41, Arseniy Mukhin wrote: > Thank you for working on this! There are few points about 'direct > advancement' part: Thanks for reviewing! > Looks like the bug with truncating of the queue is gone, advancingPos > does the trick, great. > > Maybe I missed something, but I

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

2025-11-04 Thread David Rowley
On Wed, 5 Nov 2025 at 08:51, Matheus Alcantara wrote: > > On Mon Nov 3, 2025 at 7:47 PM -03, David Rowley wrote: > > Are you sure you've not got something else in your branch? It applies > > ok here, and the CFbot isn't complaining either. CFBot's is based on > > cf8be0225, which is 2 commits befo

Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

2025-11-04 Thread Jacob Champion
On Tue, Nov 4, 2025 at 2:39 PM Tom Lane wrote: > Another problem is that it only defends against a limited set of > sanitizers, though presumably every single one is broken in the same > way (compare [1]). How about __attribute__((disable_sanitizer_instrumentation)) ? LLVM's own tests make some u

Re: Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers

2025-11-04 Thread Masahiko Sawada
On Mon, Nov 3, 2025 at 12:06 PM Masahiko Sawada wrote: > > On Sun, Nov 2, 2025 at 6:15 PM 邱宇航 wrote: > > > > The pg_buffercache_evict_{relation,all} operations can become extremely > > slow when dealing with large buffer pools containing many dirty buffers. > > This commit adds CHECK_FOR_INTERRUP

Re: DOCS: ALTER PUBLICATION - Synopsis for DROP is a bit misleading

2025-11-04 Thread Peter Smith
Bump. I found this old thread of mine had received no responses for several months. Any thoughts about the problem it describes? == Kind Regards, Peter Smith. Fujitsu Australia

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread David Rowley
On Tue, 4 Nov 2025 at 23:00, David Rowley wrote: > > On Tue, 4 Nov 2025 at 22:54, David Rowley wrote: > > The reason we end up with the same result_rel is that we're not > > passing all the relids in fetch_upper_rel(root, UPPERREL_SETOP, > > relids) due to having removed dummy rels. I guess the f

Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

2025-11-04 Thread Tom Lane
Emmanuel Sibi writes: > Root Cause: The __ubsan_default_options() function in main.c is compiled with > TSan instrumentation, creating a circular dependency during sanitizer runtime > initialization. > 1. TSan initialization calls __ubsan_default_options() > 2. TSan tries to instrument the funct

Re: [PATCH] Add archive_mode=follow_primary to prevent unarchived WAL on standby promotion

2025-11-04 Thread John H
Hi, On Fri, Oct 31, 2025 at 11:14 AM Andrey Borodin wrote: > > AFAIU archiver archives in order of reading archive_status directory, e.i. > random order in worst case. > My understanding is the archiver uses a heap to allocate the batch of files that will be archived to avoid scanning the direc

Re: Adding basic NUMA awareness

2025-11-04 Thread Tomas Vondra
On 11/4/25 13:10, Jakub Wartak wrote: > On Fri, Oct 31, 2025 at 12:57 PM Tomas Vondra wrote: >> >> Hi, >> >> here's a significantly reworked version of this patch series. >> >> I had a couple discussions about these patches at pgconf.eu last week,[..] > > I've just had a quick look at this and

Re: [PATCH] Add pretty formatting to pg_get_triggerdef

2025-11-04 Thread Philip Alger
Hi Chao, +/* > + * pg_get_triggerdef_compact > + * Returns trigger definition in a compact, single-line > format without > + * schema qualification designed for the psql \d command. > + */ > +Datum > +pg_get_triggerdef_compact(PG_FUNCTION_ARGS) > +{ > + Oid

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Joel Jacobson
On Tue, Nov 4, 2025, at 13:09, Heikki Linnakangas wrote: > With that and the patches I posted > previously, I'm getting: > > $ PGHOST=localhost PGDB=postgres://localhost/postgres > ./async-notify-test-3 --listeners=50 --notifiers=4 --channels=1 > --extra-channels=1 > 10 s: 12716 sent (1274/s

Re: Add notification on BEGIN ATOMIC SQL functions using temp relations

2025-11-04 Thread Tom Lane
Jim Jones writes: > Oops... wrong files. Sorry. > PFA the correct version. A few thoughts: 0001 is mostly what I had in mind, except that I do not think collectDependenciesFromExpr should perform eliminate_duplicate_dependencies; it should be explicitly documented that the caller should do that

Re: meson's in-tree libpq header search order vs -Dextra_include_dirs

2025-11-04 Thread Andres Freund
Hi, On 2025-11-04 18:30:51 +1300, Thomas Munro wrote: > First two patches as before, except for a couple of unnecessary hunks > I deleted based on an off-list review from Bilal. I think there may be a less verbose way to do this: The problem is caused by us adding extra_include_dirs to postgres_

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

2025-11-04 Thread Matheus Alcantara
On Mon Nov 3, 2025 at 7:47 PM -03, David Rowley wrote: > On Tue, 4 Nov 2025 at 09:38, Matheus Alcantara > wrote: >> I looked the code and it seems to be in a good shape, but I tried to >> apply the v2 on top of e7ccb247b38 in master to run some tests and a >> rebase is necessary. > > Are you sure

Spacing of options in getopt_long processing

2025-11-04 Thread Andrew Dunstan
Over at [1] Vaibhav complained that the patch was deleting a line following one of the case branches for handling command line options in pg_restore.c, and said this was not pertinent to the patch. That's reasonable, but it made me look into $subject a bit. pg_restore.c has a mixture, with some

Re: PG18 GIN parallel index build crash - invalid memory alloc request size

2025-11-04 Thread Tomas Vondra
On 10/29/25 19:47, Tomas Vondra wrote: > ... > Unsurprisingly, there were a couple more palloc/repalloc calls (in > ginPostingListDecodeAllSegments) that could fail with long TID lists > produced when merging worker data. The attached v4 fixes this. > > However, I see this as a sign that allowing

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

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Jim Jones wrote: > That's the way I see it too. Of course it's always easier to use the > tablespace's name, but there might be cases where you only have the oid > -- in which case you'd need to do a JOIN with pg_tablespace to find the > name. It's just for convenience. The other

Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-11-04 Thread Tom Lane
Maciek Sakrejda writes: > On Tue, Nov 4, 2025 at 8:58 AM Tom Lane wrote: >> If you are feeling excited about that specific case, I think the >> correct solution would be to install a GUC check_hook for >> shared_preload_libraries (and probably its siblings too). > For what it's worth, there was

Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM

2025-11-04 Thread Masahiko Sawada
On Mon, Oct 6, 2025 at 5:03 PM Masahiko Sawada wrote: > > On Fri, Oct 3, 2025 at 2:06 PM Masahiko Sawada wrote: > > > > On Thu, Sep 25, 2025 at 6:16 PM Yugo Nagata wrote: > > > > > > On Thu, 25 Sep 2025 14:31:18 -0700 > > > Masahiko Sawada wrote: > > > > > > > > > I fixed it to use 'generator'.

Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-11-04 Thread Maciek Sakrejda
On Tue, Nov 4, 2025 at 8:58 AM Tom Lane wrote: > > I wrote: > > Andrei Klychkov writes: > >> 2. It doesn't look to me that v5 solves the original issue of a user > >> running ALTER SYSTEM SET = ''; , > >> then restarting the server and not getting it back online. > > > [ shrug... ] It's not sup

Re: Upgrade Debian CI image from Bookworm to Trixie

2025-11-04 Thread Andres Freund
Hi, On 2025-10-13 15:49:01 +0300, Nazir Bilal Yavuz wrote: > Debian Trixie CI images are generated now [1], so the attached patch > uses them with the following changes: > > (copying from commit message) > > - detect_stack_use_after_return=0 option is added to the ASAN_OPTIONS > because ASAN u

Re: MinGW compiler warnings in ecpg tests

2025-11-04 Thread Andres Freund
Hi, On 2025-10-30 17:39:24 -0400, Andres Freund wrote: > On 2024-12-06 15:44:20 +1300, Thomas Munro wrote: > > On Fri, Dec 6, 2024 at 4:13 AM Tom Lane wrote: > > > Thomas Munro writes: > > > > Yeah. This warning is visible on CI, and on fairywren since its MSYS2 > > > > upgrade a couple of mont

Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy

2025-11-04 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> But in ATPrepDropExpression(), when you're recursing, then recurse is >> always false. That is hardcoded in the ATPrepCmd() call in >> ATSimpleRecursion(). Does that make sense? > Seems wrong, but I didn't trace through the code. Oh: looking closer, the

Re: Intention to start an [oauth] "working group"

2025-11-04 Thread Jacob Champion
On Mon, Nov 3, 2025 at 8:35 AM Melanie Plageman wrote: > All of those ideas make sense. Thanks! I've added the tag; let's see how this goes. > I haven't followed oauth development enough to know if all related > threads and CF entries are more obviously related, but it seems like a > good idea f

Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy

2025-11-04 Thread Tom Lane
Peter Eisentraut writes: > I find that tablecmds.c uses these two arguments in not entirely > consistent ways. > I would have expected that if you write a command that is supposed to > recurse (no ONLY) and you are some levels down into the recursing, then > recursing=true, of course, but shou

Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy

2025-11-04 Thread Peter Eisentraut
On 25.08.25 15:04, Kirill Reshke wrote: So we need to detect if the user did ALTER TABLE or ALTER TABLE ONLY. And we have two parameters passed to ATPrepDropExpression: "recurse" and "recursing". First is about whether the user specified ONLY option and second is about if we are recursing in our

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

2025-11-04 Thread Jim Jones
On 04/11/2025 15:19, Manni Wood wrote: > I personally see no harm in additionally having an OID-based variant, > seeing as it looks like a lot of functions do seem to take an OID. If I > understand correctly, many functions take an OID, and Postgres users are > supposed to have read the docs (ht

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Álvaro Herrera wrote: > Ah, the problem is that perform_work_item() pushes an active snapshot > before calling the BRIN function, but because of the error, we > terminate the transaction before returning, so when we try to Pop that > snapshot, it doesn't exist anymore. Other ways

pg_utility ?

2025-11-04 Thread Álvaro Herrera
Hello, One of the things that came up during the pgconf.eu talk about REPACK, proposed by Christoph Berg, is that adding another utility pg_repackdb to run it from the command line adds more noise to an already noisy tool neighbourhood. He asked, how about we instead add a generic tool to run uti

Re: Fix redundant memset after palloc0 in heap_form_minimal_tuple()

2025-11-04 Thread Jeff Davis
On Tue, 2025-11-04 at 17:05 +0800, Chao Li wrote: > The current code does both palloc0() and memset(0) > in heap_form_minimal_tuple(): Thank you, fixed. > To fix the problem, my first impression was to delete the memset(). > But looking at a0942f4, I found a couple of other places that do the > s

Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-11-04 Thread Tom Lane
Andreas Karlsson writes: > Honestly none of the alternatives is very appealing and v6 is probably > the least bad. Yeah, that's about where I'm at with this. > When I ran into this issue I thought about adding and EMPTY keyword (we > do not want more keywords) or adding support for specifying

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Álvaro Herrera wrote: > 2025-11-04 16:44:47.792 CET [2118443][autovacuum worker][108/6:0] ERROR: > canceling autovacuum task > 2025-11-04 16:44:47.792 CET [2118443][autovacuum worker][108/6:0] CONTEXT: > processing work entry for relation "postgres.public.brin_packdate_idx" > 2

Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-11-04 Thread Andreas Karlsson
On 11/4/25 5:58 PM, Tom Lane wrote: Hearing no further comments, I'm going to go ahead with v6. Honestly none of the alternatives is very appealing and v6 is probably the least bad. When I ran into this issue I thought about adding and EMPTY keyword (we do not want more keywords) or adding

Re: foreign key on virtual generated column

2025-11-04 Thread Srinath Reddy Sadipiralla
Hi Jian, did initial testing and review ,the patches LGTM except indentation we can solve this by running pg_indent. i have one doubt that why we are using compute_virtual argument todo the same work in both cases, is it because of future proofing ,like we may do something different for stored an

Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-11-04 Thread Tom Lane
I wrote: > Andrei Klychkov writes: >> 2. It doesn't look to me that v5 solves the original issue of a user >> running ALTER SYSTEM SET = ''; , >> then restarting the server and not getting it back online. > [ shrug... ] It's not supposed to "solve" that. That command is > erroneous, and if you

Re: Non-text mode for pg_dumpall

2025-11-04 Thread Andrew Dunstan
On 2025-11-04 Tu 7:53 AM, tushar wrote: On Mon, Nov 3, 2025 at 5:25 PM Mahendra Singh Thalor wrote: On Mon, 3 Nov 2025 at 12:06, Vaibhav Dalvi wrote: > > Hi Mahendra, > > Thank you for your work on this feature. > I have just begun reviewing the latest patch an

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Álvaro Herrera wrote: > With my initial try of this test, just counting the number of BRIN > tuples, I was _really_ surprised that the index did indeed contain the > expected number of tuples, even when the error was being thrown. This > turned out to be expected, because the way

Re: psql --help=variables missing csv_fieldsep

2025-11-04 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Nov-03, Tom Lane wrote: >> Agreed that the set of \pset options has bloated to the point where >> that presentation is unreadable. > How about this? WFM. regards, tom lane

Re: psql --help=variables missing csv_fieldsep

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-03, Tom Lane wrote: > > I find this one you quote somewhat unreadable, so I > > was going to propose to remove it, and instead direct the user to look > > at "\? variables" for the exhaustive list. That one is also a bit > > easier to cross-check, I think. (There's also tab-complete

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Heikki Linnakangas wrote: > From 7c342e6efffc8d59c2e7658f6f2f3b138d02e0bb Mon Sep 17 00:00:00 2001 > From: Heikki Linnakangas > Date: Tue, 4 Nov 2025 13:22:08 +0200 > Subject: [PATCH v2 1/2] Fix bug where we truncated CLOG that was still needed > by LISTEN/NOTIFY > The async not

Re: Report oldest xmin source when autovacuum cannot remove tuples

2025-11-04 Thread Fujii Masao
On Fri, Oct 31, 2025 at 3:32 PM Shinya Kato wrote: > > Hi hackers, > > I am proposing to add the reason for the oldest xmin to VACUUM logs. > This feature would be useful for identifying why dead tuples cannot be > removed, thereby helping to diagnose and prevent table bloat. +1 I like this idea

Re: Issue with logical replication slot during switchover

2025-11-04 Thread Fabrice Chapuis
I propose to modify get_local_synced_slots() => to get the local logical slots (the name of the function must be renamed) and local_sync_slot_required() => to get also the slots that have the flag synced = false then in both our use cases the local slot will be dropped and recreated if it must be

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Arseniy Mukhin
Hi, On Tue, Nov 4, 2025 at 5:22 PM Álvaro Herrera wrote: > > > > With my initial try of this test, just counting the number of BRIN > > tuples, I was _really_ surprised that the index did indeed contain the > > expected number of tuples, even when the error was being thrown. This > > turned out

Re: POC: make mxidoff 64 bits

2025-11-04 Thread Alexander Korotkov
On Thu, Oct 30, 2025 at 6:17 PM Maxim Orlov wrote: > On Thu, 30 Oct 2025 at 12:10, Heikki Linnakangas wrote: >> >> >> Oh I see, the 'base' is not necessarily the base offset of the first >> multixact on the page, it's the base offset of the first multixid that >> is written to the page. And the (

Re: MergeAppend could consider sorting cheapest child path

2025-11-04 Thread Andrei Lepikhov
On 15/10/2025 14:35, David Rowley wrote: On Wed, 15 Oct 2025 at 22:26, Andrei Lepikhov wrote: Or is this a case of that you want to also consider Seq Scan on hp0 -> Sort if it's cheaper than Index Scan on hp0_a_idx just in case that's enough to make Merge Append cheap enough to beat Append -> So

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Tom Lane
Heikki Linnakangas writes: > Fortunately that's easy to fix: We can move the IsListeningOn() check > after releasing the lock. See attached. > The elephant in the room of course is that a lookup in a linked list is > O(n) and it would be very straightforward to replace it with e.g. a hash > tab

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Arseniy Mukhin
Hi, On Tue, Nov 4, 2025 at 3:10 PM Heikki Linnakangas wrote: > > On 03/11/2025 23:45, Joel Jacobson wrote: > > On Mon, Nov 3, 2025, at 12:02, Heikki Linnakangas wrote: > >> I wrote another little stand-alone performance test program for this, > >> attached. It launches N connections that send NOT

Re: Enhance security permissions

2025-11-04 Thread Bryan Green
On 11/4/2025 7:17 AM, Ranier Vilela wrote: > Hi. > > Em ter., 4 de nov. de 2025 às 09:44, Bryan Green > escreveu: > > On 11/4/2025 6:20 AM, Ranier Vilela wrote: > > Hi. > > > > I noticed this while checking the source (src/interfaces/libpq/fe- >

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Álvaro Herrera
> With my initial try of this test, just counting the number of BRIN > tuples, I was _really_ surprised that the index did indeed contain the > expected number of tuples, even when the error was being thrown. This > turned out to be expected, because the way BRIN summarization works is > that we

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

2025-11-04 Thread Manni Wood
On Tue, Nov 4, 2025 at 5:25 AM Jim Jones wrote: > Hi Nishant > > On 04/11/2025 11:37, Nishant Sharma wrote: > > Using name as parameter is more user friendly than OID. > > Because users usually do not know the oids. Constructing > > the DDL from the name appears better as it contains a name > > i

Re: bug: virtual generated column can be partition key

2025-11-04 Thread Peter Eisentraut
committed On 22.04.25 10:47, Ashutosh Bapat wrote: Thanks Jian for your review. On Tue, Apr 22, 2025 at 12:32 PM jian he > wrote: On Tue, Apr 22, 2025 at 11:45 AM Ashutosh Bapat mailto:[email protected]>> wrote: > > I have i

Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode

2025-11-04 Thread Daniel Gustafsson
> On 4 Nov 2025, at 14:00, Jonathan Gonzalez V. > wrote: > Ho! where can I see this list? I'd love to help with something here! There is no documented list as far as I can remember, but look for calls to oauth_unsafe_debugging_enabled() in: https://github.com/postgres/postgres/blob/master/src/

Re: Enhance security permissions

2025-11-04 Thread Ranier Vilela
Hi. Em ter., 4 de nov. de 2025 às 09:44, Bryan Green escreveu: > On 11/4/2025 6:20 AM, Ranier Vilela wrote: > > Hi. > > > > I noticed this while checking the source (src/interfaces/libpq/fe- > > connect.c). > > It seems that S_IRWXU permission is harmful too. > > > > In accord with [1] and [2] t

Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode

2025-11-04 Thread Jonathan Gonzalez V.
Hi! On Mon, 2025-11-03 at 08:24 -0800, Jacob Champion wrote: > > But I ran into this annoyance (wanted to override the CA for > temporary > development purposes, got sprayed with debug output) during a demo > just last month, so I'm in favor of doing something to make this > easier. I was creatin

Re: Issue with logical replication slot during switchover

2025-11-04 Thread Alexander Kukushkin
On Tue, 4 Nov 2025 at 12:15, Fabrice Chapuis wrote: > Hi Alexander, > I understand your use case but I think it won't work like this because of > how is implemented get_local_synced_slots() > this function will return slots which synced flag to true only. > Yeah. Sorry, my bad, you are absolutel

Re: Non-text mode for pg_dumpall

2025-11-04 Thread tushar
On Mon, Nov 3, 2025 at 5:25 PM Mahendra Singh Thalor wrote: > On Mon, 3 Nov 2025 at 12:06, Vaibhav Dalvi > wrote: > > > > Hi Mahendra, > > > > Thank you for your work on this feature. > > I have just begun reviewing the latest patch and > > encountered the following errors during the initial set

Re: Enhance security permissions

2025-11-04 Thread Bryan Green
On 11/4/2025 6:20 AM, Ranier Vilela wrote: > Hi. > > I noticed this while checking the source (src/interfaces/libpq/fe- > connect.c). > It seems that S_IRWXU permission is harmful too. > > In accord with [1] and [2] this should also be checked. > Also, all other places in the source,  S_IRWXU are

Enhance security permissions

2025-11-04 Thread Ranier Vilela
Hi. I noticed this while checking the source (src/interfaces/libpq/fe-connect.c). It seems that S_IRWXU permission is harmful too. In accord with [1] and [2] this should also be checked. Also, all other places in the source, S_IRWXU are checked. So, I propose adding this check to enhance the se

Re: Adding basic NUMA awareness

2025-11-04 Thread Jakub Wartak
On Fri, Oct 31, 2025 at 12:57 PM Tomas Vondra wrote: > > Hi, > > here's a significantly reworked version of this patch series. > > I had a couple discussions about these patches at pgconf.eu last week,[..] I've just had a quick look at this and oh, my, I've started getting into this partitioned c

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-11-04 Thread Heikki Linnakangas
On 03/11/2025 23:45, Joel Jacobson wrote: On Mon, Nov 3, 2025, at 12:02, Heikki Linnakangas wrote: I wrote another little stand-alone performance test program for this, attached. It launches N connections that send NOTIFYs to a single channel as fast as possible, and M threads that listen for th

Re: pg_plan_advice

2025-11-04 Thread John Naylor
On Thu, Oct 30, 2025 at 9:00 PM Robert Haas wrote: > First, any form of user control over the > planner tends to be a lightning rod for criticism around here. I've > come to believe that's the wrong way of thinking about it: we can want > to improve the planner over the long term and *also* want t

Re: BRIN autosummarization lacking a snapshot

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Michael Paquier wrote: > Spawning an autovacuum worker can feel artistic as we try to make the > tests run fast, but it's not that bad. The trick is to use an > "autovacuum_naptime = 1". Then you could either scan the server logs > for some 'autovacuum: processing database "blah"

Re: COPY WHERE clause generated/system column reference

2025-11-04 Thread jian he
On Tue, Nov 4, 2025 at 8:27 AM Masahiko Sawada wrote: > > The proposed patch (the 0002 patch) allows COPY FROM ... WHERE to > filter rows by checking tuples including generated column values but > it's somewhat odd as it seems not to be the time of reading tuples > from a table. > > Also, the patc

Re: tuple radix sort

2025-11-04 Thread John Naylor
I wrote: > I've set the threshold to 400 for now, but I'm not claiming that's the > end story. In addition to the underestimation mentioned above, > unrolling the counting step is a factor. Unrolling makes smaller > inputs worse (which we can reach by recursing from larger inputs), but > unrolling

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

2025-11-04 Thread Jim Jones
Hi Nishant On 04/11/2025 11:37, Nishant Sharma wrote: > Using name as parameter is more user friendly than OID. > Because users usually do not know the oids. Constructing > the DDL from the name appears better as it contains a name > in it. So, no gain in having an OID version of > pg_get_tablespa

Re: [PATCH] Add error message for out-of-memory in passwordFromFile()

2025-11-04 Thread Michael Paquier
On Mon, Nov 03, 2025 at 09:15:25PM -0800, Joshua Shanks wrote: > Thank you for the detailed feedback! This is my first C project > contribution, so I really appreciate you taking the time to explain the > proper error handling pattern. No problem. Applied on HEAD after a few tweaks: * two libpq_g

Re: Issue with logical replication slot during switchover

2025-11-04 Thread Fabrice Chapuis
Hi Alexander, I understand your use case but I think it won't work like this because of how is implemented get_local_synced_slots() this function will return slots which synced flag to true only. in point 4 Start node1: synced flag is false and failover flag is true then it won't enter the loop a

Re: Report bytes and transactions actually sent downtream

2025-11-04 Thread Ashutosh Bapat
On Mon, Nov 3, 2025 at 8:50 PM Andres Freund wrote: > > Hi, > > On 2025-11-03 19:53:30 +0530, Ashutosh Bapat wrote: > > This commit adds following fields to pg_stat_replication_slots > > - plugin_filtered_bytes is the amount of changes filtered out by the > > output plugin > > - plugin_sent_txns

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

2025-11-04 Thread Nishant Sharma
On Tue, Nov 4, 2025 at 1:58 PM Jim Jones wrote: > > Do you think that an overload in pg_proc.dat with oid as parameter would > make sense here? e.g. > > { oid => '2322', > descr => 'total disk space usage for the specified tablespace', > proname => 'pg_tablespace_size', provolatile => 'v', pr

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread Richard Guo
On Tue, Nov 4, 2025 at 6:19 PM Richard Guo wrote: > On Tue, Nov 4, 2025 at 5:00 PM Alexander Lakhin wrote: > > Please look at a new anomaly, introduced with 03d40e4b5: > > CREATE TABLE t(i integer); > > CREATE TABLE pt(i integer) PARTITION BY LIST(i); > > > > SET enable_seqscan = 'off'; > > SELEC

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread David Rowley
On Tue, 4 Nov 2025 at 22:54, David Rowley wrote: > The reason we end up with the same result_rel is that we're not > passing all the relids in fetch_upper_rel(root, UPPERREL_SETOP, > relids) due to having removed dummy rels. I guess the fix might be > something like record the relids even when ski

Re: pg_createsubscriber --dry-run logging concerns

2025-11-04 Thread Álvaro Herrera
On 2025-Nov-04, Peter Smith wrote: > On Sat, Nov 1, 2025 at 5:02 AM Álvaro Herrera wrote: > > I'm not opposed to 0001 (to master only), but I think the lines of > > dashes are a little excessively noisy. Are there other opinions on > > that? Note that vacuumlo also has it, with no dashes. > >

Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

2025-11-04 Thread David Rowley
On Tue, 4 Nov 2025 at 21:00, Alexander Lakhin wrote: > Please look at a new anomaly, introduced with 03d40e4b5: > CREATE TABLE t(i integer); > CREATE TABLE pt(i integer) PARTITION BY LIST(i); > > SET enable_seqscan = 'off'; > SELECT * FROM t UNION SELECT * FROM t > UNION ALL > SELECT * FROM pt; >

  1   2   >