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

2025-10-31 Thread Thomas Munro
On Sat, Nov 1, 2025 at 10:13 AM Thomas Munro wrote: > On Sat, Nov 1, 2025 at 7:14 AM Heikki Linnakangas wrote: > > However, I'm worried that we'll soon break it again. The new rule is > > apparently "include libpq first", but we have no way of enforcing it. > > Hmm, my meson-fu is weak, but there

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-31 Thread Bryan Green
On 10/31/2025 2:07 PM, Bryan Green wrote: On 10/31/2025 1:46 PM, Euler Taveira wrote: On Thu, Oct 30, 2025, at 11:51 AM, Bryan Green wrote: I had reservations about the value the tests were adding, and considering I am getting more concern around having the tests than not having them for this i

Re: another autovacuum scheduling thread

2025-10-31 Thread David Rowley
On Sat, 1 Nov 2025 at 14:50, David Rowley wrote: > If we logged the score, we could do the "unpatched" test with the > patched code, just with commenting out the > list_sort(tables_to_process, TableToProcessComparator); It'd then be > interesting to zero the log_auto*_min_duration settings and rev

Re: another autovacuum scheduling thread

2025-10-31 Thread David Rowley
On Sat, 1 Nov 2025 at 09:12, Nathan Bossart wrote: > > On Thu, Oct 30, 2025 at 07:38:15PM -0500, Sami Imseih wrote: > > The results above show what I expected: the batch tables receive higher > > priority, as seen from the averages of autovacuum and autoanalyze runs. > > This behavior is expected,

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

2025-10-31 Thread Corey Huinker
> > which might be a more realistic thing if the query without the WHERE > clause was part of a VIEW. However, we don't currently have any > infrastructure to detect when a column *is* NULL. There's only the > opposite with expr_is_nonnullable() or var_is_nonnullable(). > But we'd still catch NULL

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-31 Thread Chao Li
> On Nov 1, 2025, at 06:29, Philip Alger wrote: > > > 1 ``` + /* +* Look up the type tuple to allow shell types. +*/ + typeTup = LookupTypeName(NULL, typeStruct, NULL, false); + if (typeTup == NULL) + ereport(ERROR, +

Re: Updating IPC::Run in CI?

2025-10-31 Thread Jacob Champion
On Fri, Oct 31, 2025 at 2:55 PM Andres Freund wrote: > I think I had to figure this out in the past , ah, yea: > https://github.com/anarazel/pg-vm-images/blob/8ac88f59e368f35a63d3a0635ee7baf3436d5ee3/scripts/windows_install_mingw64.ps1#L25-L27 > > msys '(echo; echo o conf recommends_policy 0; echo

Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

2025-10-31 Thread Jacob Champion
On Fri, Oct 31, 2025 at 2:56 PM Jelte Fennema-Nio wrote: > I quite like that idea! Although maybe not 7FFF, but 270F so that > PQfullProtocolVersion returns 3. +1 > And I think it'd be good to also > add a protocol option, like _pq_.test_protocol_breakage and fail the > connection attempt cl

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-31 Thread Philip Alger
Hi Quan, > Found a small bug. MULTIRANGE_TYPE_NAME does not output schema. > > When outputting, the function "quote_qualified_identifier" should be > used instead of "quote_identifier". > > Similarly, the function names in print_range_type_def and > print_base_type_def should also be processed in

Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

2025-10-31 Thread Jelte Fennema-Nio
On Fri, 31 Oct 2025 at 17:24, Jacob Champion wrote: > I still wouldn't want the declaration > that "we default to the latest" to be mixed into the growing search > engine slop pile. Fair enough (although the intent is to get to that state at some point). > Is there an even stronger way for us t

Re: Updating IPC::Run in CI?

2025-10-31 Thread Andres Freund
Hi, On 2025-10-31 14:40:41 -0700, Jacob Champion wrote: > On Mon, Sep 22, 2025 at 3:35 PM Jacob Champion > wrote: > > On Mon, Sep 22, 2025 at 1:27 PM Andres Freund wrote: > > > I think your position has merit. However, I'd like to have at least one > > > of the > > > tasks continue to use the n

Re: Updating IPC::Run in CI?

2025-10-31 Thread Jacob Champion
On Mon, Sep 22, 2025 at 3:35 PM Jacob Champion wrote: > On Mon, Sep 22, 2025 at 1:27 PM Andres Freund wrote: > > I think your position has merit. However, I'd like to have at least one of > > the > > tasks continue to use the non-built-in IPC::Run. > > > > I'll review patches installing a newer

Re: Change initdb default to the builtin collation provider

2025-10-31 Thread Jeff Davis
On Fri, 2025-10-10 at 17:48 -0700, Jeff Davis wrote: > --- > Summary > --- > > The libc collation provider is a bad default[1]. The builtin > collation > provider is a good default, so let's use that. The attached patches implement a more modest proposal which does not conflict with Peter

Re: pg_plan_advice

2025-10-31 Thread Alastair Turner
On Fri, 31 Oct 2025, 12:51 Robert Haas, wrote: > On Fri, Oct 31, 2025 at 5:59 AM Jakub Wartak > wrote: > > > First, any form of user control over the planner tends to be a > lightning rod for criticism around here. > > > > I do not know where this is coming from, but everybody I've talked to > >

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

2025-10-31 Thread Thomas Munro
On Sat, Nov 1, 2025 at 7:14 AM Heikki Linnakangas wrote: > The patch seems harmless enough to me, no objections to committing it. Thanks! > However, I'm worried that we'll soon break it again. The new rule is > apparently "include libpq first", but we have no way of enforcing it. Hmm, my meson-

Re: display hot standby state in psql prompt

2025-10-31 Thread Jim Jones
On 30/10/2025 11:16, Jim Jones wrote: > if (!hs || !ro) > strlcpy(buf, _("unknown"), sizeof(buf)); > else if (strcmp(hs, "on") == 0 || strcmp(ro, "on") == 0) > strlcpy(buf, _("read-only"), sizeof(buf)); > else > { > const char *tr = NULL; > PGresult *res; > > res = PQexec(pset.db, "S

Re: Channel binding for post-quantum cryptography

2025-10-31 Thread Jacob Champion
On Fri, Oct 31, 2025 at 2:26 AM Filip Janus wrote: > While fixing the actual issue will take some time, I’ve fixed the requested > test. > Since I’m still quite new to the PG community, would it make sense to propose > a patch that only adds the test? You mean like in a TODO: block in the test?

Re: Support getrandom() for pg_strong_random() source

2025-10-31 Thread Jacob Champion
On Thu, Oct 23, 2025 at 2:48 PM Masahiko Sawada wrote: > I've drafted the patches for this item. Thanks! > The 0001 patch allows the packager to select the random source: > "openssl" or "system", by using --with-random-source option. If it's > omitted and OpenSSL is used (--with-openssl or --wit

Re: Extended Statistics set/restore/clear functions.

2025-10-31 Thread Tomas Vondra
On 10/23/25 01:46, Michael Paquier wrote: > On Wed, Oct 22, 2025 at 02:55:31PM +0300, Corey Huinker wrote: >>> Do you have some numbers regarding the increase in size this generates >>> for the catalogs? >> >> Sorry, I don't understand. There shouldn't be any increase inside the >> catalogs as t

Re: another autovacuum scheduling thread

2025-10-31 Thread Nathan Bossart
On Thu, Oct 30, 2025 at 07:38:15PM -0500, Sami Imseih wrote: > Here is my attempt to test the behavior with the new prioritization. Thanks. > The results above show what I expected: the batch tables receive higher > priority, as seen from the averages of autovacuum and autoanalyze runs. > This be

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-31 Thread Bryan Green
On 10/31/2025 1:46 PM, Euler Taveira wrote: On Thu, Oct 30, 2025, at 11:51 AM, Bryan Green wrote: I had reservations about the value the tests were adding, and considering I am getting more concern around having the tests than not having them for this initial release I have decided to remove the

Re: POC: Parallel processing of indexes in autovacuum

2025-10-31 Thread Masahiko Sawada
On Tue, Oct 28, 2025 at 6:10 AM Daniil Davydov <[email protected]> wrote: > > > > > IIUC the patch still has one problem in terms of reloading the > > configuration parameters during parallel mode as I mentioned > > before[1]. > > > > Yep. I was happy to see that you think that config file proce

Re: Remaining dependency on setlocale()

2025-10-31 Thread Jeff Davis
On Fri, 2025-10-31 at 10:40 +0100, Peter Eisentraut wrote: > But I'm not sure that we actually want to make that switch.  It would > be > good if our code is independent of the global locale settings, but > that > doesn't mean that there couldn't be code in extensions, other > libraries, > or o

Re: contrib/sepgsql regression tests have been broken for months

2025-10-31 Thread Tom Lane
Joe Conway writes: > On 10/29/25 19:36, Tom Lane wrote: >> ... I think the new idea >> is to leave the module installed and active, which is kind >> of problematic if we want to also use TestSepgsql.pm in the >> back branches. > I suppose one solution is to create a new buildfarm animal and then

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-31 Thread Euler Taveira
On Thu, Oct 30, 2025, at 11:51 AM, Bryan Green wrote: > I had reservations about the value the tests were adding, and > considering I am getting more concern around having the tests than not > having them for this initial release I have decided to remove them. v4 > patch is attached. It is the

Re: Should HashSetOp go away

2025-10-31 Thread Tom Lane
I wrote: > Here's a pair of patches to try to do better. The first one > is concerned with getting more realistic size estimates for > TupleHashTables in the planner. The second is some mop-up > that's been pending for a long time in the same area, namely > getting rid of "long int" field types i

Re: Should we update the random_page_cost default value?

2025-10-31 Thread Jim Nasby
I definitely agree with Tom's idea that the costing model needs a re-think, if for no other reason than the volume of discussion on this thread that (AFAICT) has reached precious few conclusions. Along those lines, the two biggest problems I see with the current state of affairs are: 1) We blindly

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-31 Thread Matheus Alcantara
On Thu Oct 30, 2025 at 1:32 PM -03, Andrew Dunstan wrote: >> It seems to me that we need to disable the COPY usage when the foreign >> table has triggers enabled. >> > > I think it's probably worth finding out why COPY is so much worse in the > presence of triggers. Is there something we can do to

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-31 Thread Robert Haas
On Fri, Oct 31, 2025 at 8:21 AM Richard Guo wrote: > > Do you have any thoughts on how we might adjust these test cases? > > For Q1, the plan change does not appear to compromise its original > purpose. The test case is meant to verify that unique-ification works > correctly with partitionwise jo

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

2025-10-31 Thread Heikki Linnakangas
On 14/09/2025 06:23, Thomas Munro wrote: Added to commitfest: https://commitfest.postgresql.org/patch/6056/ I'm having to carry this patch in all my development branches for now or I can't build on one of my regular dev machines, so I'm quite keen to get this into the tree soon and would back-pa

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

2025-10-31 Thread Andrey Borodin
> On 24 Oct 2025, at 03:19, John H wrote: > > Hi, > > On Thu, Oct 23, 2025 at 9:25 AM Andrey Borodin wrote: >> >> Hi hackers, >> >> I'd like to propose a new archive_mode setting to address a gap in WAL >> archiving for high availability streaming replication configurations. >> >> In HA s

Re: Should HashSetOp go away

2025-10-31 Thread Tom Lane
I wrote: > * create_setop_path's required-space estimate of entrysize * numGroups > was rather lame before commit 5dfc19814, and it's even more so > afterwards. It's basically only accounting for the tuples themselves, > and not either the hashtable overhead or the SetOpStatePerGroupData > counter

Re: pg_createsubscriber --dry-run logging concerns

2025-10-31 Thread Álvaro Herrera
On 2025-Oct-09, Peter Smith wrote: > Please see the v3 patches. Okay, I have pushed 0002 to 18 and master. I wanted to backpatch to 17 but there are too many conflicts there. I'm not opposed to 0001 (to master only), but I think the lines of dashes are a little excessively noisy. Are there oth

Re: Fully documenting the design of nbtree row comparison scan keys

2025-10-31 Thread Peter Geoghegan
On Fri, Oct 31, 2025 at 5:06 AM Victor Yegorov wrote: > I took a look at the patch. Proposed comments look highly valuable, > especially around NULLs, doesn't look immediately obvious, so definitely > requires a comment. > Looks good to commit. Cool. > Wouldn't it be good to add such informati

Re: AIX support

2025-10-31 Thread Heikki Linnakangas
On 16/10/2025 18:28, AIX PG user wrote: diff --git a/src/template/aix b/src/template/aix new file mode 100644

Re: [PATCH] Speed up of vac_update_datfrozenxid.

2025-10-31 Thread Heikki Linnakangas
On 15/07/2025 14:02, Rustam Khamidullin wrote: Hi hackers, While testing behavior of 'vacuum' functionality under high load we've noticed that the exclusive lock with 'LOCKTAG_DATABASE_FROZEN_ID' tag could be held for a prolonged time, thus causing contention with other sessions. This lock is o

[PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain

2025-10-31 Thread Bryan Green
Hello, While reviewing the pg_ctl CreateProcess patch [1], I started looking into handle inheritance on Windows and found something that puzzles me. I think there's an issue with O_CLOEXEC, but wanted to walk through my reasoning to make sure I'm not missing something obvious. [1] https://w

Re: Calling PGReserveSemaphores() from CreateOrAttachShmemStructs

2025-10-31 Thread Heikki Linnakangas
On 26/08/2025 10:11, Ashutosh Bapat wrote: On Mon, Aug 25, 2025 at 3:11 PM Thomas Munro wrote: On Mon, Aug 25, 2025 at 9:10 PM Ashutosh Bapat wrote: Is this change correct? Was there any reason to leave it like that in e25626677f8076eb3ce94586136c5464ee154381? Or was it just something that d

Re: Issue with logical replication slot during switchover

2025-10-31 Thread Fabrice Chapuis
Thanks for your large analyze and explanation Alexander. If we go in the direction you propose and leave the option to use a suplementary flag allow_overwrite, may I propose you some modifications in the patch v0 you have attached: Why modifying this function? drop_local_obsolete_slots(List *re

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

2025-10-31 Thread Heikki Linnakangas
On 31/10/2025 01:27, Joel Jacobson wrote: On Fri, Oct 31, 2025, at 00:08, Joel Jacobson wrote: On Thu, Oct 30, 2025, at 14:25, Heikki Linnakangas wrote: Joel, since you've been working on some optimizations in this area too, would you happen to have some suitable performance test scripts for th

Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

2025-10-31 Thread Jacob Champion
On Thu, Oct 23, 2025 at 6:56 AM Jelte Fennema-Nio wrote: > Depending on how this works in practice we'll likely still want to > revert this change before we actually release PG19. If we do that before > 19beta1 we still have roughly half a year where people will test the > ecosystem. I think the

Re: Fully documenting the design of nbtree row comparison scan keys

2025-10-31 Thread Peter Geoghegan
On Fri, Oct 31, 2025 at 4:57 AM Chao Li wrote: > Personally, I feel that the new comment is even harder to understand than > reading the code directly. I don't disagree. But that's not the goal that I have in mind. My goal is to make it clear when it is okay to treat row comparisons just like s

Re: List TAP test files in makefiles

2025-10-31 Thread Álvaro Herrera
On 2025-Oct-28, Michael Paquier wrote: > IMO, we should tackle this problem the other way around: what would it > take to have meson build a list of the TAP files in t/ based on an > automated rule when tests.tap is defined? Maybe what we need is a single source of truth that is used both by Make

Re: Should we update the random_page_cost default value?

2025-10-31 Thread Bruce Momjian
On Thu, Oct 30, 2025 at 07:13:01PM -0400, Bruce Momjian wrote: > On Thu, Oct 9, 2025 at 08:05:37AM -0400, Robert Haas wrote: > > On Wed, Oct 8, 2025 at 8:16 PM Bruce Momjian wrote: > > > I rewrote the random_page_cost docs, attached, to remove a focus on > > > magnetic disk, and added network lat

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

2025-10-31 Thread Jim Jones
Hi Manni, Thanks for the patch! On 29/10/2025 02:23, Manni Wood wrote: > This patch creates a function pg_get_tablespace_ddl, designed to > retrieve the full DDL statement for a tablespace. Users can obtain the > DDL by providing the tablespace name, like so: > >     SELECT pg_get_tablespace_ddl

Re: Remaining dependency on setlocale()

2025-10-31 Thread Jeff Davis
On Fri, 2025-10-31 at 15:01 +0100, Daniel Verite wrote: > > Extensions often need to be updated for a new major version. > > I think forcing the C locale is not comparable to API changes, > and the consequences are not even necessarily fixable for extensions. Are we in agreement that it's fine fo

[PATCH] psql: add \dcs to list all constraints

2025-10-31 Thread Tatsuro Yamada
Hi hackers, Until PostgreSQL 17, if you wanted to inspect constraints in a database, you had to either: - use the "\d" command to check constraints per table, or - query "pg_constraint" and "pg_attribute" directly. However, starting from PG18, thanks to Álvaro's work [1], NOT NULL constraints

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-31 Thread Tom Lane
Nathan Bossart writes: > On Fri, Oct 31, 2025 at 12:02:10PM +0100, Peter Eisentraut wrote: >> What is the reason that this file is supposed to contain the history of >> relevant changes, rather than just the last one? >> If you want the history, you could look at the git log of the file itself, >>

Re: doc: Improve description of io_combine_limit and io_max_combine_limit GUCs

2025-10-31 Thread Karina Litskevich
On Thu, Oct 30, 2025 at 4:31 PM Fujii Masao wrote: > > I also noticed another issue in the io_max_combine_limit docs. > Since its context is PGC_POSTMASTER, shouldn't the following > description be updated to say "This parameter can only be set at server > start"? > > This parameter can

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-31 Thread Nathan Bossart
On Fri, Oct 31, 2025 at 12:02:10PM +0100, Peter Eisentraut wrote: > What is the reason that this file is supposed to contain the history of > relevant changes, rather than just the last one? > > If you want the history, you could look at the git log of the file itself, > no? I think either way wo

Re: Remaining dependency on setlocale()

2025-10-31 Thread Daniel Verite
Jeff Davis wrote: > On Thu, 2025-10-30 at 21:41 +0100, Daniel Verite wrote: > > What about code in extensions? AFAIU a user can control the > > locale in effect by setting the LC_CTYPE argument of > > CREATE DATABASE, which ends up in the environment > > of backends serving that database.

Re: [PATCH] Fix Korean typo 'checkpoint' in log

2025-10-31 Thread Bruce Momjian
On Fri, Oct 31, 2025 at 07:41:25PM +0900, Gureumi wrote: > I found a translation issue in the Korean message for checkpoint logs. > This patch updates the ko.po file to improve clarity. > All texts use '체크포인트' everywhere, but only here it's '채크포인트'. Please report this to: pgsql-translat..

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-31 Thread David E. Wheeler
On Oct 30, 2025, at 16:10, Robert Haas wrote: > Said differently, if somebody > nukes the ABI history file from a back-branch, I think we should > assume that represents a deliberate decision on the part of the > project to stop caring about ABI compatibility in that particular > back-branch, not

Re: MSVC: Improve warning options set

2025-10-31 Thread Bryan Green
On 10/29/2025 1:51 AM, Peter Eisentraut wrote: meson.build has a list of warnings to disable on MSVC:   cflags_warn += [     '/wd4018', # signed/unsigned mismatch     '/wd4244', # conversion from 'type1' to 'type2', possible loss of data     '/wd4273', # inconsistent DLL linkage     '/wd410

Re: Resetting recovery target parameters in pg_createsubscriber

2025-10-31 Thread Robert Haas
On Thu, Oct 30, 2025 at 7:08 PM Alexander Korotkov wrote: > Can we see this from the different prospective? pg_createsubscriber > is intended to turn physical replica into a logical replica. And it > leaves subscriber database cluster with rudimentary configuration > options needed purely for its

Re: pg_plan_advice

2025-10-31 Thread Robert Haas
On Fri, Oct 31, 2025 at 5:59 AM Jakub Wartak wrote: > > First, any form of user control over the planner tends to be a lightning > > rod for criticism around here. > > I do not know where this is coming from, but everybody I've talked to > was saying this is needed to handle real enterprise datab

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-31 Thread Richard Guo
On Thu, Oct 30, 2025 at 3:29 AM Robert Haas wrote: > That said, after some investigation, I believe your conclusion to be > correct. What seems to be happening with Q3 is that the higher-cost > path (27.47, one partitionwise join) is added before the absolute > cheapest path (27.27, two partitionw

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-31 Thread Álvaro Herrera
On 2025-Oct-31, Bertrand Drouvot wrote: > After giving it more thought, I'm inclined to postpone the compiler warning > until XLogRecPtrIsValid() has been available for some time. The question is > for > how long? Maybe we can mark it so that it becomes obsolete in a future version, #if PG_VERS

Re: meson vs. llvm bitcode files

2025-10-31 Thread Nazir Bilal Yavuz
Hi, On Wed, 13 Aug 2025 at 16:25, Nazir Bilal Yavuz wrote: > > Hi, > > On Mon, 7 Jul 2025 at 11:45, Nazir Bilal Yavuz wrote: > > > > Mandatory rebase, v6 is attached. > > Rebase is needed due to 01d6832c10, v7 is attached. Rebase is needed due to 16607718c0, v8 is attached. -- Regards, Nazir

Re: minor error message enhance: print RLS policy name when only one permissive policy exists

2025-10-31 Thread jian he
On Tue, Oct 28, 2025 at 11:06 AM Chao Li wrote: > > The attached patch did what the $subject says. > > demo: > > > > begin; > > create role alice login; > > grant all on schema public to alice; > > drop table if exists tts; > > create table tts(a int); > > grant insert on tts to alice; > > ALTER T

Re: [RFC] Lock-free XLog Reservation from WAL

2025-10-31 Thread Zhou, Zhiguo
Rebase again. Regards, Zhiguo On 4/30/2025 10:55 PM, Yura Sokolov wrote: Just rebase From 4e3fbbd66382c6a6dfd4abae802eda8e79d8d892 Mon Sep 17 00:00:00 2001 From: Zhiguo Zhou Date: Mon, 27 Oct 2025 17:11:30 +0800 Subject: [PATCH] Lock-free XLog Reservation using lock-free hash-table Removed P

Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

2025-10-31 Thread Jelte Fennema-Nio
On Thu Oct 23, 2025 at 3:56 PM CEST, Jelte Fennema-Nio wrote: So I'm proposing that we bump the default protocol version that libpq requests on the master branch, so that users running the latest master against a proxy that does not support the version negototian will be notified. Rebased to re

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-31 Thread Peter Eisentraut
On 21.10.25 22:13, Tom Lane wrote: Nathan Bossart writes: For the rest of the back-branches, I'm considering starting with a baseline of the latest minor version stamps. While it would be nice to have a comprehensive history of the ABI compatibility for each major version, we've lived this lon

[PATCH] Add pg_get_subscription_ddl() function

2025-10-31 Thread Vaibhav Dalvi
Hi Hackers, I am submitting a patch as a part of a larger Retail DDL functions project described by Andrew Dunstan here . This patch creates a function pg_get_subscription_ddl, designed to retrieve the full

[PATCH] Fix Korean typo 'checkpoint' in log

2025-10-31 Thread Gureumi
I found a translation issue in the Korean message for checkpoint logs. This patch updates the ko.po file to improve clarity. All texts use '체크포인트' everywhere, but only here it's '채크포인트'. Fix_typo.patch Description: Binary data

Re: pg_plan_advice

2025-10-31 Thread Jakub Wartak
On Thu, Oct 30, 2025 at 3:00 PM Robert Haas wrote: [..over 400kB of attachments, yay] Thank You for working on this! My gcc-13 was nitpicking a little bit (see compilation_warnings_v1.txt), so attached is just a tiny diff to fix some of those issues. After that, clang-20 run was clean too. > F

Re: Mark function arguments of type "Datum *" as "const Datum *" where possible

2025-10-31 Thread Peter Eisentraut
On 28.09.25 05:02, Chao Li wrote: On Fri, Sep 26, 2025 at 11:00 PM Tom Lane > wrote: Yeah.  In particular, probably 99% of such Datum arrays also have an associated array of bool isnull flags.  IMO it makes exactly zero sense to const-ify the Datums witho

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-31 Thread Bertrand Drouvot
Hi, On Fri, Oct 31, 2025 at 08:41:46AM +0100, Peter Eisentraut wrote: > On 31.10.25 05:31, Bertrand Drouvot wrote: > > For PG19, we could: > > > > Add a comment in the code documenting that XLogRecPtrIsInvalid() is > > deprecated > > and that we will enforce a "deprecated" attribute on it in PG2

RE: Newly created replication slot may be invalidated by checkpoint

2025-10-31 Thread Hayato Kuroda (Fujitsu)
Dear Vitaly, Thanks for sharing the reproducer. Agreed this is a real but minor issue. Firstly I considered an ad-hoc way, which sets the candidate restart_lsn as replicationSlotMinLSN before using as slot->data.restart_lsn. PSA the idea. It can fix your reproducer. However it still has a corner

Re: Question on pg_stat_io showing zero reads/writes for I/O workers

2025-10-31 Thread Xuneng Zhou
Hi, On Fri, Oct 31, 2025 at 5:30 PM Xuneng Zhou wrote: > > Hi, > > On Fri, Oct 31, 2025 at 4:17 PM Shardul Borhade wrote: > > > > Hi team, > > > > I’m running into an issue with pg_stat_io. When I run the following query: > > > > SELECT backend_type, reads, writes, read_time > > FROM pg_stat_io

Re: Remaining dependency on setlocale()

2025-10-31 Thread Peter Eisentraut
On 30.10.25 18:17, Jeff Davis wrote: On Tue, 2025-10-28 at 17:19 -0700, Jeff Davis wrote: Attached a new patch series, v6. I'm eager to start committing this series so that we have plenty of time to sort out any problems. I welcome feedback before or after commit, and I can revert if necessary

Re: Issue with logical replication slot during switchover

2025-10-31 Thread Alexander Kukushkin
Hi, On Fri, 31 Oct 2025 at 09:16, Fabrice Chapuis wrote: > Hi, > I indeed proposed a solution at the top of this thread to modify only the > value of the synced attribute, but the discussion was redirected to adding > an extra parameter to the function *pg_create_logical_replication_slot() *to >

Re: Channel binding for post-quantum cryptography

2025-10-31 Thread Filip Janus
út 28. 10. 2025 v 6:55 odesílatel Michael Paquier napsal: > On Sun, Oct 26, 2025 at 11:20:53AM +0100, Filip Janus wrote: > > I have prepared a test case following the pattern from commit > 9244c11afe23 > > (RSA-PSS fix). > > Thanks, I'm able to reproduce your problem with the error you have, > af

Re: Non-text mode for pg_dumpall

2025-10-31 Thread Mahendra Singh Thalor
On Tue, 28 Oct 2025 at 11:32, Mahendra Singh Thalor wrote: > > On Thu, 16 Oct 2025 at 16:24, Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Oct 2025 at 23:05, Mahendra Singh Thalor > > wrote: > > > > > > On Sun, 24 Aug 2025 at 22:12, Andrew Dunstan wrote: > > > > > > > > > > > > On 2025-08

Re: formatting.c cleanup

2025-10-31 Thread Peter Eisentraut
On 20.10.25 15:31, Chao Li wrote: On Oct 20, 2025, at 17:50, Peter Eisentraut wrote: The file formatting.c contains some hard to read and understand code. For the attached patch series, I made a few more or less mechanical passes over it to modernize the code a bit, renamed some symbols to be

Re: Remove meaningless const qualifier from ginCompressPostingList()

2025-10-31 Thread Peter Eisentraut
On 29.10.25 04:42, Chao Li wrote: While working on the other patch that fixed wrong "const" usage [1], I found the function: ``` GinPostingList * ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize,   int *nwritten) ``` uses "const" unnecessarily. Because it needs to assign an e

Re: Assertion failure in SnapBuildInitialSnapshot()

2025-10-31 Thread Pradeep Kumar
Hi , Thanks for reviewing this issue, After applying the patch fix_concurrent_slot_xmin_update that you have submitted before [1] on REL_18_STABLE, Here are the below steps to reproduce this issue manually Steps : 1) /initdb -D primary 2) echo "wal_level=logical" > primary/postgresql.conf (Edit

Re: Fully documenting the design of nbtree row comparison scan keys

2025-10-31 Thread Victor Yegorov
пт, 31 окт. 2025 г. в 00:35, Peter Geoghegan : > I didn't understand every nuance of row compare inequalities myself > until quite recently. The rules with NULLs are particularly tricky. > > It seems worthwhile to clear things up now in large part due to the > recent addition of code in places lik

[PATCH] Fix Korean typo 'checkpoint' in log

2025-10-31 Thread Gureumi
I found a translation issue in the Korean message for checkpoint logs. This patch updates the ko.po file to improve clarity. All texts use '체크포인트' everywhere, but only here it's '채크포인트'. Fix_typo.patch Description: Binary data

Re: Fully documenting the design of nbtree row comparison scan keys

2025-10-31 Thread Chao Li
Hi Peter, I am glad to review this patch. > On Oct 31, 2025, at 05:34, Peter Geoghegan wrote: > > nbtree row comparison scan keys consist of one header key (which > appears in so->keyData[]), and 2 or more subkeys (which > _bt_check_rowcompare accesses by following a pointer stored in the > hea

Re: Issue with logical replication slot during switchover

2025-10-31 Thread Fabrice Chapuis
Hi, I indeed proposed a solution at the top of this thread to modify only the value of the synced attribute, but the discussion was redirected to adding an extra parameter to the function *pg_create_logical_replication_slot() *to overwrite a failover slot Regards, Fabrice On Fri, Oct 31, 2025 at

Re: Report oldest xmin source when autovacuum cannot remove tuples

2025-10-31 Thread wenhui qiu
HI Thank you for your path ,This path is extremely helpful. > +/* > + * Identifies what determined a relation's OldestXmin horizon. > + * Used by autovacuum to report why dead tuples were not removable. > + */ > +typedef enum OldestXminSource > +{ > + OLDESTXMIN_SOURCE_ACTIVE_TRANSACTION, > + OLD

Re: POC: Parallel processing of indexes in autovacuum

2025-10-31 Thread Daniil Davydov
Hi, On Tue, Oct 28, 2025 at 8:09 PM Daniil Davydov <[email protected]> wrote: > > Thanks everybody for the review! Please, see v12 patches : > 1) Implement tests for parallel autovacuum I forgot to add a new directory to Makefile and meson.build files. Fixed in v13 patches (only 0003 has chang

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-31 Thread Quan Zongliang
On 10/31/25 5:52 AM, Philip Alger wrote: Hello Hackers, I am submitting a patch as part of the Retail DDL functions project described here [1]. This patch creates a function called pg_get_type_ddl designed to retrieve the DDL statement for CREATE TYPE. Users can get the DDL by providing a

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-31 Thread Peter Eisentraut
On 31.10.25 05:31, Bertrand Drouvot wrote: For PG19, we could: Add a comment in the code documenting that XLogRecPtrIsInvalid() is deprecated and that we will enforce a "deprecated" attribute on it in PG24. Just a code comment for now seems reasonable. I wouldn't make any predictions about t

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-31 Thread Quan Zongliang
On 10/31/25 9:34 AM, Philip Alger wrote: Hi Quan, This is part of a larger project as noted here: Understood. This is an amazing job. > I am submitting a patch as part of the Retail DDL functions project > described here [1]. > 1. https://www.postgresql.org/message-id/945d