[PATCH v1 1/1] PostgreSQL Patch: AVX-Optimized ASCII Validation

2025-11-03 Thread Pickett, Eshe N
PostgreSQL Patch: AVX-Optimized ASCII Validation This patch series introduces Intel AVX2 and AVX-512 optimized ASCII validation for PostgreSQL's UTF-8 processing pipeline, providing significant performance improvements for text-heavy workloads through vectorized string validation. Originally impl

Re: [PATCH] Add pretty formatting to pg_get_triggerdef

2025-11-03 Thread Steven Niu
Hi, Philip, I verified your patch on my Ubuntu 24.04 and it works as expected. The "make check" passed. Also, the code change looks good to me. Regards, Steven From: Philip Alger Sent: Tuesday, November 04, 2025 11:36 To: pgsql-hackers Subject: [PATCH] Add pre

Re: Extended Statistics set/restore/clear functions.[

2025-11-03 Thread Michael Paquier
On Fri, Oct 31, 2025 at 09:22:55PM +0100, Tomas Vondra wrote: > Sorry for not paying much attention to this thread ... It was PGEU last week, it's not surprising knowing that you are in.. Europe :) > My opinion is that we should both use the new format and keep the > pg_dump code to allow upgradi

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-11-03 Thread Michael Paquier
On Tue, Nov 04, 2025 at 12:20:03PM +0530, Sadhuprasad Patro wrote: > Is this looks fine to you? I'm pretty sure that this should also be made aware of an optional offset, so as the server logs could be compared based on a sub-set of the logs generated, and not a whole file. > Will share a new pat

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-11-03 Thread Sadhuprasad Patro
On Fri, Oct 31, 2025 at 6:19 AM Michael Paquier wrote: > On Thu, Oct 30, 2025 at 05:00:27PM +0530, Sadhuprasad Patro wrote: > > On Fri, Oct 17, 2025 at 11:11 AM Michael Paquier > > wrote: > >> -ok($node->log_contains(qr/no SSL error reported/) == 0, > >> +is($node->log_contains(qr/no SSL error r

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

2025-11-03 Thread Tristan Partin
After my analysis in the other subthread, patch 1 looks ready to be committed. Patch 2 looks good to go, but maybe you should split the "set -e" changes into a separate commit. Not sure how much I like patch 3 since it hardcodes $libdir as "lib" for the purposes of finding the header, but it's

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

2025-11-03 Thread shveta malik
> > I have addressed the above comments in patch v21. > Thank You. Please find a few comments: 1) + fparams.slot_names = slot_names = NIL; I think it is not needed to set slot_names to NIL. 2) -WAIT_EVENT_REPLICATION_SLOTSYNC_MAIN); +WAIT_EVENT_REPLICATION_SLOTSYNC_PRIMARY_CATCHUP); Th

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

2025-11-03 Thread Tristan Partin
On Mon Nov 3, 2025 at 12:14 AM CST, Tom Lane wrote: > "Tristan Partin" writes: >> What is the benefit of -Dextra_include_dirs when you could use -Dc_flags >> or CFLAGS to specify extra include directories? If you tried either of >> those as an alternative, would they fix the issue? The existence

Re: ago(interval) → timestamptz

2025-11-03 Thread Laurenz Albe
On Mon, 2025-11-03 at 22:36 +0100, Florents Tselai wrote: > I realize this will get some "you can easily implement this yourself” > pushback, > But I keep seeing and writing a lot of WHERE ts > now() - interval '1 day' > expressions. You can easily implement this yourself... Also, there already

Re: BRIN autosummarization lacking a snapshot

2025-11-03 Thread Michael Paquier
On Mon, Nov 03, 2025 at 12:21:50PM +0100, Alvaro Herrera wrote: > This patch fixes it. I haven't given much thought to adding a good way > to test this yet ... 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 "aut

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

2025-11-03 Thread Thomas Munro
On Mon, Nov 3, 2025 at 7:14 PM Tom Lane wrote: > "Tristan Partin" writes: > > What is the benefit of -Dextra_include_dirs when you could use -Dc_flags > > or CFLAGS to specify extra include directories? If you tried either of > > those as an alternative, would they fix the issue? The existence of

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

2025-11-03 Thread Joshua Shanks
On Mon, Nov 3, 2025 at 2:35 AM Michael Paquier wrote: > The point would be to have pqConnectOptions2() take its oom_error path > in the case you are pointing at. It seems to me that the correct > answer would be to extend passwordFromFile() with an extra "const char > **errmsg", where an error i

[PATCH] Add pretty formatting to pg_get_triggerdef

2025-11-03 Thread Philip Alger
Hello Hackers, Currently, `pg_get_triggerdef` includes a "pretty" flag, but it does not actually format the `CREATE TRIGGER` statement in a "pretty" way. Unlike `pg_get_viewdef`, `pg_get_ruledef`, and `pg_get_indexdef`, the purpose of pretty formatting has been to remove the schema name so it can

Re: DOCS: What SGML markup to use for user objects like tables, columns, etc?

2025-11-03 Thread Peter Smith
On Thu, Jul 24, 2025 at 2:18 AM Bruce Momjian wrote: ... > You are right that we are inconsistent. I think is the > accepted way to reference table names, and for column > names. If you can create a patch to make them consistent, I can apply > it. Thanks for offering to apply the patch. It ha

Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

2025-11-03 Thread Peter Smith
A rebase was needed. Here is patch v2. == Kind Regards, Peter Smith. Fujitsu Australia v2-0001-Add-curly-brackets-before-ellipsis.patch Description: Binary data

Re: Should we say "wal_level = logical" instead of "wal_level >= logical"

2025-11-03 Thread Peter Smith
On Wed, Oct 29, 2025 at 8:10 PM Chao Li wrote: ... > I think 0001 basically good. A tiny comment is that, in inval.c, > "wal_level>=logical” doesn’t have white-spaces around “=“, while in the other > two files, they have. So maybe all add white-spaces around “=“ here. > > For 0002, I have a fixe

Re: Report oldest xmin source when autovacuum cannot remove tuples

2025-11-03 Thread Shinya Kato
On Fri, Oct 31, 2025 at 5:01 PM wenhui qiu wrote: > > HI > Thank you for your path ,This path is extremely helpful. Thank you! > > +/* > > + * Identifies what determined a relation's OldestXmin horizon. > > + * Used by autovacuum to report why dead tuples were not removable. > > + */ > > +type

Re: pg_createsubscriber --dry-run logging concerns

2025-11-03 Thread Peter Smith
On Sat, Nov 1, 2025 at 5:02 AM Álvaro Herrera wrote: > > 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. > Thanks for pushing! > I'm not opposed to 0001 (to m

Re: COPY WHERE clause generated/system column reference

2025-11-03 Thread Masahiko Sawada
On Mon, Oct 27, 2025 at 1:21 AM jian he wrote: > > hi. > > CREATE TABLE gtest0 (a int, b int GENERATED ALWAYS AS (a + 1) VIRTUAL); > copy gtest0 from stdin where (b <> 1); > 0 > \. > > ERROR: unexpected virtual generated column reference > CONTEXT: COPY gtest0, line 1: "0" > > We need to apply e

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

2025-11-03 Thread Manni Wood
On Fri, Oct 31, 2025 at 10:36 AM Jim Jones wrote: > 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 t

Re: Checkpointer write combining

2025-11-03 Thread Melanie Plageman
Thanks for continuing to review! I've revised the patches to incorporate all of your feedback except for where I mention below. There were failures in CI due to issues with max batch size, so attached v8 also seeks to fix those. - Melanie On Thu, Oct 16, 2025 at 12:25 AM Chao Li wrote: > > 3 -

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-03 Thread Mihail Nikalayeu
Hello, Noah! I re-flowed the new comment to the standard 78 columns and pushed 0001. > Thanks again! >

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-03 Thread Noah Misch
On Mon, Nov 03, 2025 at 09:41:00PM +0100, Mihail Nikalayeu wrote: > On Mon, Nov 3, 2025 at 12:21 AM Noah Misch wrote: > > Thanks. Does "ON CONFLICT ON CONSTRAINT constraint_name" avoid the problem > > w/ > > concurrent REINDEX CONCURRENTLY? A search of the thread found no mention of > > "ON CON

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

2025-11-03 Thread David Rowley
On Sat, 1 Nov 2025 at 14:19, Corey Huinker wrote: >> >> 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

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

2025-11-03 Thread David Rowley
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 you've not got something else in your branch? It applies ok here,

Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects

2025-11-03 Thread Bryan Green
On 11/3/2025 9:29 AM, Andres Freund wrote: > On 2025-11-03 09:25:11 -0600, Bryan Green wrote: >> On 11/3/2025 9:19 AM, Andres Freund wrote: >>> Hi, >>> >>> On 2025-11-03 09:12:03 -0600, Bryan Green wrote: We just need to call CreateJobObject() in PostmasterMain(), configure with JOB_OBJEC

Re: Use merge-based matching for MCVs in eqjoinsel

2025-11-03 Thread Tom Lane
Ilia Evdokimov writes: > On 27.10.2025 18:50, David Geier wrote: >> On 10.09.2025 15:56, Ilia Evdokimov wrote: >>> I'll need some time to check both join and semi join cases with small >>> and large default_statistics_target. I'll share the results later. >> Have you had a chance to test above th

Re: Remaining dependency on setlocale()

2025-11-03 Thread Jeff Davis
On Mon, 2025-11-03 at 11:59 -0800, Jeff Davis wrote: > Reverting commit 5e6e42e may be the right thing, but I'd like to hear > what others have to say on this point first. In particualr, I'd like > to > know whether such a revert is based on principle, a practical > problem, > or just an abundance

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

2025-11-03 Thread Joel Jacobson
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 the > notifications. I ran it with dif

ago(interval) → timestamptz

2025-11-03 Thread Florents Tselai
Hi, I realize this will get some "you can easily implement this yourself” pushback, But I keep seeing and writing a lot of WHERE ts > now() - interval '1 day' expressions. Having $subject should help in such cases. We already have now, and age, so we might as well have ago too. Other systems also

Re: [PATCH] Write Notifications Through WAL

2025-11-03 Thread Rishu Bagga
Hi, apologies for the delay, attached a new patch addressing the concerns, as well as enabling a standby to listen and receive notifications from the primary. On Fri, Oct 17, 2025 at 6:33 AM Arseniy Mukhin wrote: > > Good catch, I've fixed this in the new patch. > > Hmmm, looks like we still hav

Re: Use stack-allocated StringInfoData

2025-11-03 Thread David Rowley
On Tue, 4 Nov 2025 at 09:20, Mats Kindahl wrote: > This is using Coccinelle to transform the text based on a semantic patch > (which is included in the patch). Unfortunately it mess with the whitespace a > bit so it is necessary to run pg_intent after. I'm surprised that there are > whitespace

Re: Resetting recovery target parameters in pg_createsubscriber

2025-11-03 Thread Alexander Korotkov
On Mon, Oct 27, 2025 at 2:22 PM Alena Vinter wrote: > Michael, thank you for outlining your alternative approach. > After rethinking the current patch state with a clearer vision, I realized > that simply truncating the postgresql.auto.conf file is sufficient. All > modifications made by pg_crea

Re: psql --help=variables missing csv_fieldsep

2025-11-03 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Nov-03, Tom Lane wrote: >> But wait ... is it actually a variable? help.c does list it, but >> as a \pset option: > Yeah, there are two lists: one here in the "\?" output, and another in > the "\? variables" output, which is also `psql --help=var

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-11-03 Thread Mihail Nikalayeu
Hello! On Mon, Nov 3, 2025 at 12:21 AM Noah Misch wrote: > Thanks. Does "ON CONFLICT ON CONSTRAINT constraint_name" avoid the problem w/ > concurrent REINDEX CONCURRENTLY? A search of the thread found no mention of > "ON CONSTRAINT". It seems safe to assume that clause would avoid problems w/

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

2025-11-03 Thread Matheus Alcantara
Hi, thanks for working on this! On Thu Oct 30, 2025 at 1:20 AM -03, David Rowley wrote: > I've attached a very slightly revised version of the patch. I became > aware of a function named get_func_support(), which can be used rather > than fetching the pg_proc tuple from SysCache, which I was doing

Re: Use stack-allocated StringInfoData

2025-11-03 Thread Mats Kindahl
On 11/3/25 11:27, David Rowley wrote: On Mon, 3 Nov 2025 at 20:27, Mats Kindahl wrote: We can use StringInfoData info; initStringInfo(&info); ... appendStringInfo(&info, ...); ... return info.data; It was corrected in an earlier commit, but that

Re: psql --help=variables missing csv_fieldsep

2025-11-03 Thread Álvaro Herrera
On 2025-Nov-03, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > > While messing with the \pset boolean display patch, I noticed that psql > > --help=variables is missing csv_fieldsep. Is there a reason for this? > > But wait ... is it actually a variable? help.c does list it, but >

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

2025-11-03 Thread Masahiko Sawada
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_INTERRUPTS calls within the underlying > Evict{Rel,All}UnpinnedBuffers funct

Re: Eagerly evict bulkwrite strategy ring

2025-11-03 Thread Melanie Plageman
On Wed, Oct 15, 2025 at 5:00 PM Melanie Plageman wrote: > > Ah, thanks. I think I fixed that. I also rebased the set and attached v5. I found an incorrect assert in CleanVictimBuffer() that was tripping in CI. Attached v6 is updated with it removed. - Melanie From 85896f09d712adbc2b3e4ce1aa56917

Re: Remaining dependency on setlocale()

2025-11-03 Thread Jeff Davis
On Mon, 2025-11-03 at 20:14 +0100, Daniel Verite wrote: > No, I think we should put the database's lc_ctype > into LC_CTYPE and the database's lc_collate into > LC_COLLATE, independently of anything else, > like it was done until commit 5e6e42e. > I believe that's the purpose of these database > pr

Re: Support getrandom() for pg_strong_random() source

2025-11-03 Thread Masahiko Sawada
On Fri, Oct 31, 2025 at 1:31 PM Jacob Champion wrote: > > 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 o

Re: MSVC: Improve warning options set

2025-11-03 Thread Andres Freund
Hi, On 2025-11-03 19:56:16 +0100, Peter Eisentraut wrote: > I don't know if we still support MSVCRT if using MSVC, or how long we still > need to support it. (Or, for example, how to tell which variant CI or the > buildfarm uses.) To my knowledge anything close to a recent version visual studio

Re: [PG19-3 PATCH] Don't ignore passfile

2025-11-03 Thread Jacob Champion
On Sat, Nov 1, 2025 at 5:55 PM Paul Ohlhauser wrote: > > Did my previous two messages make sense to you guys? More or less, but to move things forward I think you're going to need to prune the proposal. The attached patch is probably not going to be accepted in its current form. My $0.02: of you

Re: MSVC: Improve warning options set

2025-11-03 Thread Andres Freund
Hi, On 2025-10-29 08:51:00 +0100, 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 li

Re: Remaining dependency on setlocale()

2025-11-03 Thread Daniel Verite
Jeff Davis 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 for C extensions?

Re: MSVC: Improve warning options set

2025-11-03 Thread Peter Eisentraut
On 31.10.25 14:31, Bryan Green wrote: Regarding the environ declaration-- it comes down to which C runtime is being targeted. The old MSVCRT (msvcrt.dll) actually exported environ as a data symbol, so declaring "extern char **environ;" worked fine. MinGW traditionally targeted this runtime, a

Re: Making jsonb_agg() faster

2025-11-03 Thread Tom Lane
Chao Li writes: >> On Nov 3, 2025, at 04:56, Tom Lane wrote: >> PFA v3, rebased over 8a27d418f, no substantive changes whatever. > I am on vacation this week, I only find a hour in the evening and did an > eyeball review without actually tracing and testing this patch set. Thanks for looking a

Re: Fix outdated comment of CopyStmt in gram.y

2025-11-03 Thread Masahiko Sawada
On Mon, Nov 3, 2025 at 6:13 AM cca5507 wrote: > > Hi, > > The MERGE command can also be used in COPY TO, but it missing in the comment. > > Attach a patch to fix it. Thank you for the patch. Pushed. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com

Re: psql --help=variables missing csv_fieldsep

2025-11-03 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > While messing with the \pset boolean display patch, I noticed that psql > --help=variables is missing csv_fieldsep. Is there a reason for this? But wait ... is it actually a variable? help.c does list it, but as a \pset option: HELP0(" \\pset [NAM

Re: psql --help=variables missing csv_fieldsep

2025-11-03 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > While messing with the \pset boolean display patch, I noticed that psql > --help=variables is missing csv_fieldsep. Is there a reason for this? > It appears to be an omission of commit aa2ba50c2c13 -- accidental? Seems like a pretty easy oversight to mak

Re: test_json_parser/002_inline is kind of slow

2025-11-03 Thread Jacob Champion
On Sun, Nov 2, 2025 at 4:34 AM Mihail Nikalayeu wrote: > Not sure it is related, but probably yes - got weird CI [0] issue on > BSD (patch itself does not change anything may affect that): Thank you for the report! > [19:24:12.744](0.000s) not ok 1802 - unescaped control: stderr has > correct nu

Re: Improve LWLock tranche name visibility across backends

2025-11-03 Thread Sami Imseih
>> I am not sure we need to do anything about this. > > > Or maybe we just avoid the tranche_id from leaking > in test_dsa_resowners() by making it a static variable > and checking if we have a valid tranche id before calling > LWLockNewTrancheId()? That is the proper pattern. Like the attached.

psql --help=variables missing csv_fieldsep

2025-11-03 Thread Álvaro Herrera
While messing with the \pset boolean display patch, I noticed that psql --help=variables is missing csv_fieldsep. Is there a reason for this? It appears to be an omission of commit aa2ba50c2c13 -- accidental? The attached patch adds it. -- Álvaro Herrera 48°01'N 7°57'E — https:/

Re: Add \pset options for boolean value display

2025-11-03 Thread David G. Johnston
On Monday, November 3, 2025, Álvaro Herrera wrote: > On 2025-Oct-21, Álvaro Herrera wrote: > > On 2025-Oct-20, David G. Johnston wrote: > > > Thank you. Seems good from a quick read. I’m regretting the choice > of the > > > display_ prefix; is there any technical limitation or other opposition

Re: Bump soft open file limit (RLIMIT_NOFILE) to hard limit on startup

2025-11-03 Thread Jelte Fennema-Nio
On Wed, 29 Oct 2025 at 11:11, Peter Eisentraut wrote: This patch set is showing compiler warnings because pg_system() wasn't properly declared where needed. Please provide an update that builds cleanly. It still compiled fine on my local branch, but indeed after a rebase not anymore. I guess

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

2025-11-03 Thread Zsolt Parragi
I was thinking about asking something similar. In our case, we have two problematic use cases: quick demo setups and CI. When you start up a simple keycloak instance, you have two easy options: either use http, or self-signed certificates. For a CI setup, I can create disposable containers, gene

Re: Add \pset options for boolean value display

2025-11-03 Thread Álvaro Herrera
On 2025-Oct-21, Álvaro Herrera wrote: > On 2025-Oct-20, David G. Johnston wrote: > > Thank you. Seems good from a quick read. I’m regretting the choice of the > > display_ prefix; is there any technical limitation or other opposition to > > using just true and false? > > > > \pset true ‘true’ >

Re: pg_plan_advice

2025-11-03 Thread Robert Haas
On Sat, Nov 1, 2025 at 12:10 PM Hannu Krosing wrote: > This reinforces my belief thet we either should have some kind of > two-level optimization, where most queries are handled quickly but > with something to trigger a more elaborate optimisation and > investigation workflow. > > Or alternatively

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

2025-11-03 Thread Melanie Plageman
On Thu, Oct 23, 2025 at 1:25 PM Jacob Champion wrote: > > I can't really guess how well these will work within our community. So > I'd like to propose an experimental working group covering the new > OAuth code. Sounds like a good experiment to me. > = What does that mean? = > > "Working group"

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

2025-11-03 Thread Jacob Champion
On Mon, Nov 3, 2025 at 6:24 AM Daniel Gustafsson wrote: > If we do allow this (IIRC we did discuss during development to allow this but > erred on the side of caution) Yeah, the replaced comment explains it. The assumption is that whatever device you're using to log in (presumably a browser, not

Re: pg_plan_advice

2025-11-03 Thread Robert Haas
On Fri, Oct 31, 2025 at 5:17 PM Alastair Turner wrote: > I really like the functionality of the current patch as well, even though I > am suspicious of user control over the planner. By giving concise, precise > control over a plan, this allows people who believe they can out-plan the > planner

Re: Confine vacuum skip logic to lazy_scan_skip

2025-11-03 Thread Melanie Plageman
On Thu, Oct 30, 2025 at 7:14 AM John Naylor wrote: > > On Wed, Oct 22, 2025 at 11:12 PM Tom Lane wrote: > > The reason it thinks that num_offsets could be as much as 2048 is > > presumably the code a little bit above this: > > > > OffsetNumber offsets[MaxOffsetNumber]; > > ... > >

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

2025-11-03 Thread Jelte Fennema-Nio
On Mon, 3 Nov 2025 at 15:59, Andres Freund wrote: > Won't this mean that it'll be harder to performance comparisons between the > in-development version and other versions? Because there will be negotiation > before we branch of 19, but not after and not in release branches? The negotiation does

Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects

2025-11-03 Thread Andres Freund
On 2025-11-03 09:25:11 -0600, Bryan Green wrote: > On 11/3/2025 9:19 AM, Andres Freund wrote: > > Hi, > > > > On 2025-11-03 09:12:03 -0600, Bryan Green wrote: > >> We just need to call CreateJobObject() in PostmasterMain(), configure > >> with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, and assign the pos

Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects

2025-11-03 Thread Bryan Green
On 11/3/2025 9:19 AM, Andres Freund wrote: > Hi, > > On 2025-11-03 09:12:03 -0600, Bryan Green wrote: >> We just need to call CreateJobObject() in PostmasterMain(), configure >> with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, and assign the postmaster. >> Children inherit membership automatically. When t

Re: Report bytes and transactions actually sent downtream

2025-11-03 Thread Andres Freund
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 is the amount of transactions sent downstream by the > output plu

Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects

2025-11-03 Thread Andres Freund
Hi, On 2025-11-03 09:12:03 -0600, Bryan Green wrote: > We just need to call CreateJobObject() in PostmasterMain(), configure > with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, and assign the postmaster. > Children inherit membership automatically. When the job handle closes on > postmaster exit, the kerne

Re: Implement waiting for wal lsn replay: reloaded

2025-11-03 Thread Andres Freund
Hi, On 2025-11-03 16:06:58 +0100, Álvaro Herrera wrote: > On 2025-Nov-03, Alexander Korotkov wrote: > > > I'd like to give this subject another chance for pg19. I'm going to > > push this if no objections. > > Sure. I don't understand why patches 0002 and 0003 are separate though. FWIW, I app

[PATCH] Fix orphaned backend processes on Windows using Job Objects

2025-11-03 Thread Bryan Green
Greetings, When the postmaster exits unexpectedly on Windows (crash, kill, debugger abort), backend processes continue running. Windows lacks any equivalent to Unix's getppid() orphan detection. These orphaned backends hold locks and shared memory, preventing clean restart. This leads to a delay

Re: Implement waiting for wal lsn replay: reloaded

2025-11-03 Thread Álvaro Herrera
On 2025-Nov-03, Alexander Korotkov wrote: > I'd like to give this subject another chance for pg19. I'm going to > push this if no objections. Sure. I don't understand why patches 0002 and 0003 are separate though. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com

Re: fix NOT VALID NOT NULL with ALTER COLUMN SET IDENTITY

2025-11-03 Thread Álvaro Herrera
Pushed now to 18 and master. Thanks. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "Once again, thank you and all of the developers for your hard work on PostgreSQL. This is by far the most pleasant management experience of any database I've worked on."

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

2025-11-03 Thread Andres Freund
Hi, On 2025-11-03 15:46:10 +0100, Jelte Fennema-Nio wrote: > From 31851ddff8cb40f732aac0bfac364da61ed9fa30 Mon Sep 17 00:00:00 2001 > From: Jelte Fennema-Nio > Date: Thu, 23 Oct 2025 15:08:52 +0200 > Subject: [PATCH v3 2/2] libpq: Request protocol version 3. to GREASE the > ecosystem > > Th

Re: AIX support

2025-11-03 Thread AIX PG user
Hi Heikki, Thank you for your feedback. > This looks weird. Sure, "-O2" makes things faster, but we shouldn't > force that here. If you want optimizations, you should use pass > CFLAGS="-O2" or CFLAGS="-O3" to configure. And why the special mention > of MemSet() and MemSetAlign()? I have remo

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

2025-11-03 Thread Jelte Fennema-Nio
On Fri Oct 31, 2025 at 11:52 PM CET, Jacob Champion wrote: On Fri, Oct 31, 2025 at 2:56 PM Jelte Fennema-Nio wrote: Yeah, I feel better signing on to a plan like this if we think the breakage is likely to lead to a comprehensive fix for NegotiateProtocolVersion (as opposed to "we greased this th

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

2025-11-03 Thread Daniel Gustafsson
> On 29 Oct 2025, at 20:19, Jonathan Gonzalez V. > wrote: > This patch basically remove the need of setting the PGOAUTHDEBUG=UNSAFE > to be able to use PGOAUTHCAFILE. If we do allow this (IIRC we did discuss during development to allow this but erred on the side of caution) it should probably b

Re: Report bytes and transactions actually sent downtream

2025-11-03 Thread Ashutosh Bapat
On Mon, Nov 3, 2025 at 3:25 PM shveta malik wrote: > > > So I propose to just add comment > > > > in pgoutput_truncate() > > /* > > * Even if we filtered out some relations, we still send a TRUNCATE > > * message for the remaining relations. Since the change, as a whole, is > > * not filtered out

Fix outdated comment of CopyStmt in gram.y

2025-11-03 Thread cca5507
Hi, The MERGE command can also be used in COPY TO, but it missing in the comment. Attach a patch to fix it. -- Regards, ChangAo Chen v1-0001-Fix-outdated-comment-of-CopyStmt-in-gram.y.patch Description: Binary data

contrib/pg_stat_tcpinfo

2025-11-03 Thread Jakub Wartak
Attached is pg_stat_tcpinfo, an heavy work in progress, Linux-only netstat/ss-like extension for showing detailed information about TCP connections based on information from the kernel itself. It's the result of some frustration and some corridor talks during recent PgConfEU, where we agreed with A

Re: Making jsonb_agg() faster

2025-11-03 Thread Chao Li
> On Nov 3, 2025, at 04:56, Tom Lane wrote: > > PFA v3, rebased over 8a27d418f, no substantive changes whatever. > > regards, tom lane > I am on vacation this week, I only find a hour in the evening and did an eyeball review without actually tracing and testing this patch set. Overall, th

Re: fix NOT VALID NOT NULL with ALTER COLUMN SET IDENTITY

2025-11-03 Thread Álvaro Herrera
On 2025-Sep-03, jian he wrote: > hi. > > The attached patch makes the last two statements below fail. > CREATE TABLE notnull_tbl1 (a int, b int); > INSERT INTO notnull_tbl1 VALUES (NULL, 1), (300, 3); > ALTER TABLE notnull_tbl1 ADD CONSTRAINT nn NOT NULL a NOT VALID; -- ok > ALTER TABLE notnull_t

Re: tuple radix sort

2025-11-03 Thread John Naylor
I wrote: > The v1 patch > has some optimizations, but in other ways things are simple and/or > wasteful. Exactly how things fit together will be informed by what, if > anything, has to be done to avoid regressions. In v1, radix sort diverts to qsort_tuple for small partitions (similar to how quic

Re: Asynchronous MergeAppend

2025-11-03 Thread Matheus Alcantara
Hi, thanks for working on this! On Tue Aug 20, 2024 at 6:14 AM -03, Alexander Pyhalov wrote: >> In addition, I have a question about testing your feature on a >> benchmark. Are you going to do this? >> > > The main reason for this work is a dramatic performance degradation when > Append plans w

Re: Fix typo in Vietnamese translation file

2025-11-03 Thread Álvaro Herrera
On 2025-Nov-02, Tom Lane wrote: > Chao Li writes: > > Looks like the po file has been out of date, the msgid string cannot be > > found in the source file. > > Yeah, I was surprised not to see a fuzz marker there. Apparently > that file hasn't been touched in awhile. Yeah, the Vietnamese tran

Re: 64 bit numbers vs format strings

2025-11-03 Thread Wolfgang Walther
Thomas Munro: It might still be interesting to know which msgfmt/libintl pair the BF animals are using (CC Wolfgang), and whether this stuff actually works. It took a while until I was able to enable NLS on the alpine animals [1]. It looks like I used gettext-tiny-dev here. I just tried with

Re: Fix comments for ChangeVarNodes() and related functions

2025-11-03 Thread Peter Eisentraut
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. However, I couldn't find "change_RangeTblRef" anywhere in the code base. I suspect

Re: Non-text mode for pg_dumpall

2025-11-03 Thread Vaibhav Dalvi
Hi Mahendra, I have a few more review comments regarding the patch: 1. Is the following change in `src/bin/pg_dump/connectdb.c` intentional? ``` --- a/src/bin/pg_dump/connectdb.c +++ b/src/bin/pg_dump/connectdb.c @@ -287,7 +287,6 @@ executeQuery(PGconn *conn, const char *query) { pg_log_error("q

Re: 64 bit numbers vs format strings

2025-11-03 Thread Thomas Munro
On Tue, Mar 18, 2025 at 4:48 AM Tom Lane wrote: > Thomas Munro writes: > > On Mon, Mar 17, 2025 at 8:09 PM Tom Lane wrote: > >> Hmm, I find that comment fairly scary. How do we know that the > >> runtime library actually gets this right on every supported platform? > > > I don't know too much a

Re: Non-text mode for pg_dumpall

2025-11-03 Thread Mahendra Singh Thalor
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 setup: > > ``` > $ ./db/bin/pg_restore testdump_dir -C -d postgres -F d -p 5556 >

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-11-03 Thread Akshay Joshi
Hi Hackers, Added a new #define GET_DDL_PRETTY_FLAGS because the existing #define GET_PRETTY_FLAGS is not suitable for formatting reconstructed DDLs. The existing #define GET_PRETTY_FLAGS always indents the code, regardless of whether the flag is set to true or false, which is not the desired beha

Re: Implement waiting for wal lsn replay: reloaded

2025-11-03 Thread Alexander Korotkov
Hello, Xuneng! On Mon, Nov 3, 2025 at 4:20 AM Xuneng Zhou wrote: > On Sun, Nov 2, 2025 at 2:24 PM Xuneng Zhou wrote: > > On Thu, Oct 23, 2025 at 8:58 PM Xuneng Zhou wrote: > > I’ve made a few minor updates to the comments and docs in patches 2 > > and 3. The patch set LGTM now. > > Fix an minor

Re: Avoid overflow (src/backend/utils/adt/formatting.c)

2025-11-03 Thread Ranier Vilela
Em seg., 3 de nov. de 2025 às 07:45, Bryan Green escreveu: > On 11/2/2025 6:34 PM, Ranier Vilela wrote: > > > > > > Em dom., 2 de nov. de 2025 às 13:22, Bryan Green > > escreveu: > > > > On 11/2/2025 10:09 AM, Bryan Green wrote: > > > On 11/2/2025 8:59 AM,

Re: Docs and tests for RLS policies applied by command type

2025-11-03 Thread Dean Rasheed
On Tue, 28 Oct 2025 at 03:34, jian he wrote: > > while reading the doc, this description in UPDATE section: > """ > Note, however, that unlike a standalone UPDATE command, if the existing row > does > not pass the USING expressions, an error will be thrown (the UPDATE path will > never be silentl

BRIN autosummarization lacking a snapshot

2025-11-03 Thread Álvaro Herrera
If you have a BRIN index with autosummarize=on, and it's based on a function that requires a snapshot, autovacuum will simply error out when trying to summarize a range. Here's a reproducer: create table journal (d timestamp); create function packdate(d timestamp) returns text as $$ begin retu

Re: Reorganize GUC structs

2025-11-03 Thread Peter Eisentraut
On 29.10.25 10:07, Peter Eisentraut wrote: On 24.10.25 14:21, Heikki Linnakangas wrote: @@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors, int elevel);  static void do_serialize(char **destptr, Size

Re: Logical Replication of sequences

2025-11-03 Thread Amit Kapila
On Mon, Nov 3, 2025 at 12:35 AM vignesh C wrote: > Some inor comments on 0001. 1. + /* + * Acquire LogicalRepWorkerLock in LW_EXCLUSIVE mode to block the apply + * worker (holding LW_SHARED) from reading or updating + * last_seqsync_start_time. See ProcessSyncingSequencesForApply(). + */ + LWLock

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

2025-11-03 Thread Heikki Linnakangas
On 31/10/2025 18:40, Heikki Linnakangas wrote: 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 ha

Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal

2025-11-03 Thread Michael Paquier
On Fri, Oct 31, 2025 at 11:15:03AM +0900, Shinya Kato wrote: > You're right, I missed them. I have created a patch that addresses the > above. Similar to EXPLAIN, I wanted to use 'fpi' and 'fpi bytes', but > the VACUUM/ANALYZE logs showed 'full pages images', so I used 'full > page image bytes'. I

Re: Avoid overflow (src/backend/utils/adt/formatting.c)

2025-11-03 Thread Bryan Green
On 11/2/2025 6:34 PM, Ranier Vilela wrote: > > > Em dom., 2 de nov. de 2025 às 13:22, Bryan Green > escreveu: > > On 11/2/2025 10:09 AM, Bryan Green wrote: > > On 11/2/2025 8:59 AM, Ranier Vilela wrote: > >> Hi. > >> > >> Per Coverity. > >>

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

2025-11-03 Thread Michael Paquier
On Sun, Nov 02, 2025 at 09:09:55AM +0900, Michael Paquier wrote: > Sounds OK to me. Nice catch. It's probably not worth bothering in > the stable branches as the error is unlikely going to show up. And, while checking the surroundings, I have noticed that your patch is incomplete: passwordFromFi

  1   2   >