Re: Remove specific \r\n code in TAP for Windows

2025-10-23 Thread Daniel Gustafsson
> On 24 Oct 2025, at 08:51, Michael Paquier wrote: > in light of 1c6d4629394d, we should not require that, and the > CI looks happy with the attached. +1, a nice win in terms of readability. -- Daniel Gustafsson

Remove specific \r\n code in TAP for Windows

2025-10-23 Thread Michael Paquier
Hi all, $subject has been mentioned by Jacob (in CC.) on Discord, and it does not seem like somebody took the time to propose a patch. We use in some places of the TAP tests the following pattern: my $newline = $windows_os ? "\r\n" : "\n"; Two files have this idea: - 003_ldap_connection_param_lo

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

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 05:36:01PM -0400, Tom Lane wrote: > So, okay, that's a perfectly respectable thing to do, and I can't > really fault Michael or Jian for not having tested its effects on > sepgsql. But how come it took this long to notice? Oops. I would have taken care of that should I ha

Re: Logical Replication of sequences

2025-10-23 Thread shveta malik
Please find a few comments for 002: 1) sequencesync.c compiles without these inclusions: +#include "replication/logicallauncher.h" +#include "replication/worker_internal.h" +#include "utils/rls.h" 2) SEQ_LOG_CNT_INVALID: it is not used anywhere. 3) +## ALTER SUBSCRIPTION ... REFRESH SEQUENCES s

Re: Avoid resource leak (src/test/regress/pg_regress.c)

2025-10-23 Thread Kirill Reshke
On Fri, 24 Oct 2025, 11:03 Michael Paquier, wrote: > On Thu, Oct 23, 2025 at 09:37:21PM -0300, Ranier Vilela wrote: > > The function *config_sspi_auth* is responsible for > > rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. > > > > Coverity complains that the struct addrinfo gai_

Re: Avoid resource leak (src/bin/pg_resetwal/pg_resetwal.c)

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 09:26:24PM -0300, Ranier Vilela wrote: > The function *read_controlfile* is responsible for updating old pg_control > versions. > Coverity complains that the struct ControlFileData buffer is leaked. > > I think that is right. Bis repetita. Allocation in the context of a s

Re: Avoid resource leak (src/test/regress/pg_regress.c)

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 09:37:21PM -0300, Ranier Vilela wrote: > The function *config_sspi_auth* is responsible for > rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. > > Coverity complains that the struct addrinfo gai_result is leaked. > The variable is declared inside block and

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2025-10-23 Thread Bryan Green
On 10/23/2025 11:02 PM, Bryan Green wrote: On 3/26/2025 3:18 AM, vignesh C wrote: On Sat, 20 Jul 2024 at 00:03, Robert Haas wrote: On Tue, Jul 16, 2024 at 8:04 AM Yasir wrote: Please ignore the above 4 lines in my review. See my comments in blue. OK, so I think it's unclear what the next

Re: Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 09:51:14PM -0300, Ranier Vilela wrote: > The function *CreateRestrictedProcess* is responsible to create a > restricted token > Coverity complains that the handle origToken can be leaked. > > In case of failure of the functions *AllocateAndInitializeSid* or > *GetPrivileges

Re: [Proposal] Adding callback support for custom statistics kinds

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 07:57:38PM -0500, Sami Imseih wrote: > I was trying to avoid an extra field in PgStat_KindInfo if possible, but > it's worthwhile to provide more flexibility to an extension. I will go > with this. Yes, I don't think that we will be able to avoid some refactoring of the exi

Re: Tab completion for large objects

2025-10-23 Thread Fujii Masao
On Thu, Oct 23, 2025 at 6:23 PM Chao Li wrote: > The code change is solid. One tidy comment on the commit subject and message: I've updated the commit message as suggested and pushed the patch. Thanks! Regards, -- Fujii Masao

Re: [PATCH TEST] Fix logical replication setup in subscription test `t/009_matviews.pl`

2025-10-23 Thread Amit Kapila
On Thu, Oct 16, 2025 at 3:45 PM Amit Kapila wrote: > > On Tue, Oct 14, 2025 at 10:34 AM Michael Paquier wrote: > > > > On Mon, Oct 13, 2025 at 06:12:07PM +0530, Ashutosh Bapat wrote: > > > For now this makes sense. > > > > The arguments and the patches I am seeing do not really make sense > > her

Re: Add GoAway protocol message for graceful but fast server shutdown/switchover

2025-10-23 Thread Kirill Reshke
On Thu, 23 Oct 2025 at 18:05, Jelte Fennema-Nio wrote: > > This change introduces a new GoAway backend-to-frontend protocol > message (byte 'g') that the server can send to the client to politely > request that client to disconnect/reconnect when convenient. This message is > advisory only - the c

Re: issue with synchronized_standby_slots

2025-10-23 Thread Amit Kapila
On Thu, Oct 23, 2025 at 9:08 PM Fujii Masao wrote: > > On Thu, Oct 23, 2025 at 8:28 PM Amit Kapila wrote: > > +-- Parallel worker does not throw error during startup. > > +SET min_parallel_table_scan_size TO 0; > > +SET max_parallel_workers_per_gather TO 2; > > +SET parallel_setup_cost TO 0; > >

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Masahiko Sawada
On Thu, Oct 23, 2025 at 3:46 PM Sergey Prokhorenko wrote: > > > Given that what uuid_to_base32hex() actually does is encoding the > input UUID, I find that it could be confusing if we have a similar > function other than encode() function. Also, we could end up > introducing as many encoding and

Re: Meson install warnings when running postgres build from a sandbox

2025-10-23 Thread Matt Smith (matts3)
It seems the project() function's meson_version arg describes the minimum version required. From the docs Takes a string describing which Meson version the project requires. Usually something like >=0.28.0. So perhaps a comment i

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2025-10-23 Thread Bryan Green
On 3/26/2025 3:18 AM, vignesh C wrote: On Sat, 20 Jul 2024 at 00:03, Robert Haas wrote: On Tue, Jul 16, 2024 at 8:04 AM Yasir wrote: Please ignore the above 4 lines in my review. See my comments in blue. OK, so I think it's unclear what the next steps are for this patch. 1. On June 3rd, M

RE: Logical Replication of sequences

2025-10-23 Thread Zhijie Hou (Fujitsu)
On Thursday, October 23, 2025 2:15 PM vignesh C wrote: > The attached patch has the changes for the same. > I have also addressed the other comments: a) Shveta's comments at [1] > b) Peter's comments at [2] & [3] c) Shveta's 2nd patch comments at [4] and d) > Chao's comment#12 from [5] which was p

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

2025-10-23 Thread shveta malik
On Fri, Oct 24, 2025 at 3:23 AM Masahiko Sawada wrote: > > On Thu, Oct 23, 2025 at 11:52 AM Masahiko Sawada > wrote: > > > > On Thu, Oct 23, 2025 at 3:39 AM shveta malik wrote: > > > > > > Please find a few comments: > > > > > > 1) > > > RequestDisableLogicalDecoding: > > > Shall we have 'Asser

Re: Can we use Statistics Import and Export feature to perforamance testing?

2025-10-23 Thread Yugo Nagata
On Fri, 24 Oct 2025 00:00:42 + "Ryohei Takahashi (Fujitsu)" wrote: > Hi Nagata san, > > > Thank you. > Your patch is good for me. > > I think this kind of documentation can prevent users confusing. Thank you for your review. I have registered this patch in the commitfest app. https://comm

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

2025-10-23 Thread shveta malik
On Fri, Oct 24, 2025 at 12:23 AM Masahiko Sawada wrote: > > On Thu, Oct 23, 2025 at 3:39 AM shveta malik wrote: > > > > Please find a few comments: > > > > 1) > > RequestDisableLogicalDecoding: > > Shall we have 'Assert(!MyReplicationSlot)' here to ensure that this > > function is invoked after w

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

2025-10-23 Thread Gregory Smith
Testing PostgreSQL 18.0 on Debian from PGDG repo: 18.0-1.pgdg12+3 with PostGIS 3.6.0+dfsg-2.pgdg12+1. Running the osm2pgsql workload to load the entire OSM Planet data set in my home lab system. I found a weird crash during the recently adjusted parallel GIN index building code. There are 2 par

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

2025-10-23 Thread Peter Smith
Hi Sawada-San. A couple of review questions/comments for patch v24. == src/backend/commands/publicationcmds.c 1. - if (wal_level != WAL_LEVEL_LOGICAL) + if (!IsLogicalDecodingEnabled()) ereport(WARNING, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("\"wal_level\" is insuff

Re: tiny step toward threading: reduce dependence on setlocale()

2025-10-23 Thread Jeff Davis
On Thu, 2025-09-25 at 11:31 +0200, Alexander Kukushkin wrote: > Hi Jeff, > > On Thu, 25 Sept 2025 at 11:08, Jeff Davis wrote: > > Committed v2-0001. > > > > > 06421b084364 commit broke possibility to > call GetSharedSecurityLabel() from ClientAuthentication_hook. > Now GetSharedSecurityLabel()

Re: Include extension path on pg_available_extensions

2025-10-23 Thread Quan Zongliang
On 10/23/25 9:56 PM, Euler Taveira wrote: * insufficient privilege: if the role doesn't have the sufficient privileges, return NULL or '' (similar to pg_stat_activity). I don't have a strong preference but the latter can impose more effort to use if you don't know the role has suffi

Re: Remove an unnecessary blank line on the PQisBusy() comments

2025-10-23 Thread Yugo Nagata
On Thu, 23 Oct 2025 12:19:03 -0300 "Euler Taveira" wrote: > On Thu, Oct 23, 2025, at 12:11 PM, Nathan Bossart wrote: > > On Thu, Oct 23, 2025 at 08:02:03PM +0900, Yugo Nagata wrote: > >> I’ve attached a very trivial patch that removes an unnecessary line > >> after the comments on PQisBusy(), jus

Re: Skipping schema changes in publication

2025-10-23 Thread Peter Smith
Hi Vignesh, I had a look at patch v24-0001. FYI -- a rebase is needed [postgres@CentOS7-x64 oss_postgres_misc]$ git apply ../patches_misc/v24-0001-Add-RESET-clause-to-Alter-Publication-which-will.patch error: patch failed: doc/src/sgml/ref/alter_publication.sgml:69 error: doc/src/sgml/ref/alter_

Re: [Proposal] Adding callback support for custom statistics kinds

2025-10-23 Thread Sami Imseih
> On Thu, Oct 23, 2025 at 04:35:58PM -0500, Sami Imseih wrote: > > Perhaps if someone wants to have separate files for each different > > types of data, > > we should be able to support multiple files. I think we can add an > > option for the > > number of files and they can then be named "pgstat..

Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)

2025-10-23 Thread Ranier Vilela
Hi. Per Coverity. The function *CreateRestrictedProcess* is responsible to create a restricted token Coverity complains that the handle origToken can be leaked. In case of failure of the functions *AllocateAndInitializeSid* or *GetPrivilegesToDelete* the handle origToken must be released. Trivi

Re: Bug in pg_stat_statements

2025-10-23 Thread Sami Imseih
> In PG18 gthere is bug either in pg_stat_statements.c, either in > queryjumblefuncs.c. > > Repro (you need Postgres build with asserts and pg_stat_statements > included in shared_preload_librarties: > > create function f(a integer[], out x integer, out y integer) returns > record as $$

Avoid resource leak (src/test/regress/pg_regress.c)

2025-10-23 Thread Ranier Vilela
Hi. Per Coverity. The function *config_sspi_auth* is responsible for rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. Coverity complains that the struct addrinfo gai_result is leaked. The variable is declared inside block and is not used outside the block. So if the function WS

Avoid resource leak (src/bin/pg_resetwal/pg_resetwal.c)

2025-10-23 Thread Ranier Vilela
Hi. Per Coverity. The function *read_controlfile* is responsible for updating old pg_control versions. Coverity complains that the struct ControlFileData buffer is leaked. I think that is right. Trivial patch attached. best regards, Ranier Vilela avoid-resource-leak-pg_resetwal.patch Descrip

RE: Can we use Statistics Import and Export feature to perforamance testing?

2025-10-23 Thread Ryohei Takahashi (Fujitsu)
Hi Nagata san, Thank you. Your patch is good for me. I think this kind of documentation can prevent users confusing. Regards, Ryohei Takahashi

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

2025-10-23 Thread Masahiko Sawada
On Wed, Oct 22, 2025 at 10:25 AM Matheus Alcantara wrote: > > On Wed Oct 22, 2025 at 12:49 PM -03, Álvaro Herrera wrote: > > On 2025-Oct-22, Matheus Alcantara wrote: > > > >> I'm wondering if the 002_aborted_tx_notifies.pl is still needed with > >> this architecture being used. I think that it's n

Re: [Proposal] Adding callback support for custom statistics kinds

2025-10-23 Thread Michael Paquier
On Thu, Oct 23, 2025 at 04:35:58PM -0500, Sami Imseih wrote: > Perhaps if someone wants to have separate files for each different > types of data, > we should be able to support multiple files. I think we can add an > option for the > number of files and they can then be named "pgstat..1.stat", > p

Re: display hot standby state in psql prompt

2025-10-23 Thread Jim Jones
Hi Nathan On 23/10/2025 23:02, Nathan Bossart wrote: > My first thought when looking at this thread/patch was that something like > "read-write" might be a bit long for a psql prompt. I probably would've > chosen something like "r" or "ro" for read-only and "rw" for read-write. I > suppose you c

NLS: use gettext() to translate system error messages

2025-10-23 Thread Jeff Davis
This is related to my effort to remove the global LC_CTYPE dependency, and set the global LC_CTYPE to C. The replacement of "%m" (e.g. with "Permission denied" if errno==EACCES) in a message is done using strerror_r(), which sometimes does translation. If it does translate, strerror uses LC_CTYPE

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Sergey Prokhorenko
> Given that what uuid_to_base32hex() actually does is encoding theinput UUID,  > I find that it could be confusing if we have a similar function other than encode() function. Also, we could end up introducing as many encoding and decoding functions dedicated for UUID as we want to support encodin

Re: another autovacuum scheduling thread

2025-10-23 Thread David Rowley
On Fri, 24 Oct 2025 at 09:48, Sami Imseih wrote: > Yes, in my last reply, I did indicate that the sort will likely not be > the operation that will tip the performance over, but the > catalog scan itself that I have seen not scale well as the number of > relations grow ( in cases of thousands or h

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

2025-10-23 Thread John H
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 setups using streaming replication, standbys can be > promoted whe

Re: Making pg_rewind faster

2025-10-23 Thread John H
Hi, On Thu, Oct 23, 2025 at 9:08 AM Srinath Reddy Sadipiralla wrote: > On Thu, Oct 23, 2025 at 1:52 PM Michael Paquier wrote: >> >> FWIW, I am definitely not a fan of the test relying on the timestamp >> of the files based on their retrieved meta-data stats, with the mtime. >> I suspect complica

Re: Support getrandom() for pg_strong_random() source

2025-10-23 Thread Masahiko Sawada
On Wed, Oct 15, 2025 at 9:03 AM Jacob Champion wrote: > > On Mon, Oct 13, 2025 at 2:49 PM Masahiko Sawada wrote: > > I think the second item fits better with the current thread's subject. > > Having said that, these two items are somewhat related (for example, > > adding getrandom() support would

Re: [Proposal] Adding callback support for custom statistics kinds

2025-10-23 Thread Sami Imseih
Thanks for the feedback! > > Other design points: > > > > 1. Filenames use "pgstat..stat" based on the numeric kind ID. > > This avoids requiring extensions to provide names and prevents issues > > with spaces or special characters. > > Hmm. Is that really what we want here? This pretty says tha

contrib/sepgsql regression tests have been broken for months

2025-10-23 Thread Tom Lane
I tried to run contrib/sepgsql's regression tests today, and was rather astonished when they failed. Investigating, there are some context lines like "LINE 1: ALTER TABLE regtest_table_4 ALTER COLUMN y TYPE float;" in the test output that were not there before. A bit of bisecting showed that the

Re: display hot standby state in psql prompt

2025-10-23 Thread Nathan Bossart
On Wed, Jul 23, 2025 at 10:03:54AM +0200, Jim Jones wrote: > I believe that 'read/write' is more idiomatic than 'read-write' in this > context. 'Read-only' works as a hyphenated adjective, and 'read/write' > is typically treated as a paired label that indicates two distinct > capabilities --- read

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Masahiko Sawada
On Thu, Oct 23, 2025 at 10:34 AM Sergey Prokhorenko wrote: > > >> The value of converting uuid to base32 is not obvious though, so I > >> would recommend explaining it in more detail. > > > Yes, and maybe some examples of other systems that adopted this format > > would be handy too. > > DNSSEC (

Re: Feature: psql - display current search_path in prompt

2025-10-23 Thread Nathan Bossart
On Thu, Jun 12, 2025 at 06:57:37PM +0300, Florents Tselai wrote: > Absent any other feedback I'm marking this as Ready for Committer; > Said committer can push back on my arbitrary %S selection > https://commitfest.postgresql.org/patch/5808/ PQparameterStatus() will return NULL if the parameter is

Re: another autovacuum scheduling thread

2025-10-23 Thread Sami Imseih
> On Fri, 24 Oct 2025 at 08:33, Sami Imseih wrote: > > Yeah, you’re correct, the list already exists; sorry I missed that. My > > main concern is > > the additional overhead of the sort operation, especially if we have > > many eligible > > tables and an aggressive autovacuum_naptime. > > It is tr

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-10-23 Thread Nathan Bossart
On Mon, Jun 23, 2025 at 01:42:32PM +0300, Aleksander Alekseev wrote: >> Do we want to skip such comments? >> I have also seen comments with '' border. > > Personally I don't have a strong opinion on this. We can easily add an > exception for "/* ---" and "/* ===" comments if somebody believes

Re: another autovacuum scheduling thread

2025-10-23 Thread David Rowley
On Fri, 24 Oct 2025 at 08:33, Sami Imseih wrote: > Yeah, you’re correct, the list already exists; sorry I missed that. My > main concern is > the additional overhead of the sort operation, especially if we have > many eligible > tables and an aggressive autovacuum_naptime. It is true that there a

Re: another autovacuum scheduling thread

2025-10-23 Thread Sami Imseih
> On Thu, Oct 23, 2025 at 01:22:24PM -0500, Sami Imseih wrote: > > I was looking at v3, and I understand the formula will be updated in the > > next version. However, do you think we should benchmark the approach > > of using an intermediary list to store the eligible tables and sorting > > that li

Use log_newpage_range in HASH index build

2025-10-23 Thread Kirill Reshke
There exists an optimization to index creation process, when we omit to write any WAL for index build. It is currently supported in B Tree, GIN, GiST, spg indexes. It works because we do not need to recover anything if index creation fails, because if was not used by any query. So, the index can be

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

2025-10-23 Thread Masahiko Sawada
On Thu, Oct 23, 2025 at 3:39 AM shveta malik wrote: > > Please find a few comments: > > 1) > RequestDisableLogicalDecoding: > Shall we have 'Assert(!MyReplicationSlot)' here to ensure that this > function is invoked after we have released and dropped the slot. This > is similar to 'Assert(MyReplic

Re: another autovacuum scheduling thread

2025-10-23 Thread Nathan Bossart
On Thu, Oct 23, 2025 at 01:22:24PM -0500, Sami Imseih wrote: > I was looking at v3, and I understand the formula will be updated in the > next version. However, do you think we should benchmark the approach > of using an intermediary list to store the eligible tables and sorting > that list, > whic

Re: pgsql: Use CompactAttribute more often, when possible

2025-10-23 Thread David Rowley
On Fri, 24 Oct 2025 at 01:21, Robert Haas wrote: > David, I've noticed several times lately you've documented in commit > messages why you thought going further with some change would be > risky, and I really like that. I think sometimes we (as committers) > are sometimes reluctant to document cas

Pretty byte size formatting in EXPLAIN

2025-10-23 Thread Gavin Wahl
In EXPLAIN ANALYZE output, I find the disk/memory usage numbers to be hard to read because they are always in kB. I'd like to have an option to format them like pg_size_pretty does, choosing a more appropriate unit based on the magnitude of the value being expressed. That is, instead of `Batches: 1

Re: another autovacuum scheduling thread

2025-10-23 Thread Sami Imseih
> > I think the one I proposed in [1] does this quite well. The table > > remains eligible to be autovacuumed with any score >= 1.0, and there's > > still a huge window of time to freeze a table once it's over > > autovacuum_freeze_max_age before there are issues and the exponential > > scaling onc

C11: should we use char32_t for unicode code points?

2025-10-23 Thread Jeff Davis
Now that we're using C11, should we use char32_t for unicode code points? Right now, we use pg_wchar for two purposes:  1. to abstract away some problems with wchar_t on platforms where it's 16 bits; and 2. hold unicode code point values In UTF8, they are are equivalent and can be freely cas

Re: Include extension path on pg_available_extensions

2025-10-23 Thread Matheus Alcantara
On Thu Oct 23, 2025 at 10:56 AM -03, Euler Taveira wrote: > On Wed, Oct 22, 2025, at 10:28 PM, Chao Li wrote: >>> On 9/16/25 8:18 AM, Matheus Alcantara wrote: >>> Any opinions on this? [1] https://www.postgresql.org/message-id/CAKFQuwbR1Fzr8yRuMW%3DN1UMA1cTpFcqZe9bW_-ZF8%3DBa2Ud2%3

Re: Include extension path on pg_available_extensions

2025-10-23 Thread Matheus Alcantara
Thanks for reviewing this! On Wed Oct 22, 2025 at 10:28 PM -03, Chao Li wrote: >> > > Got a few comments: > > 1 - extension.c > ``` > +/* > + * A location configured on extension_control_path GUC. > + * > + * The macro is the macro plaeholder that the extension_control_path support > + * and whic

Re: Include extension path on pg_available_extensions

2025-10-23 Thread Matheus Alcantara
Thanks for testing this! On Wed Oct 22, 2025 at 9:19 PM -03, Quan Zongliang wrote: > On 9/16/25 8:18 AM, Matheus Alcantara wrote: > >> Any opinions on this? >> >> [1] >> https://www.postgresql.org/message-id/CAKFQuwbR1Fzr8yRuMW%3DN1UMA1cTpFcqZe9bW_-ZF8%3DBa2Ud2%3Dw%40mail.gmail.com >> > Just as

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Sergey Prokhorenko
>> The value of converting uuid to base32 is not obvious though, so I>> would >> recommend explaining it in more detail. > Yes, and maybe some examples of other systems that adopted this format would >be handy too. DNSSEC (https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions) ma

Intention to start an [oauth] "working group"

2025-10-23 Thread Jacob Champion
Hi all, At pgconf.dev 2025 there was an unconference session called "Scaling PostgreSQL Development". Unfortunately, the wiki entry for it at [1] is empty, but two of the conversation topics that resonated with me were - the idea of labeling a space on the list for a particular area of developmen

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

2025-10-23 Thread Andrey Borodin
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. ## Problem In HA setups using streaming replication, standbys can be promoted when primary has failed. Some WAL segments might be not yet ar

Re: CI: Add task that runs pgindent

2025-10-23 Thread Daniel Gustafsson
> On 23 Oct 2025, at 17:58, David G. Johnston > wrote: > My thought is to use the new tags feature to add/remove a "Needs Formatting" > tag as the indicator. That's also an option, though I would avoid calling it "Needs" to again avoid making in actionable instead of informative. -- Daniel Gu

Bug in pg_stat_statements

2025-10-23 Thread Konstantin Knizhnik
Hi hackers. In PG18 gthere is bug either in pg_stat_statements.c, either in queryjumblefuncs.c. Repro (you need Postgres build with asserts and pg_stat_statements included in shared_preload_librarties: create function f(a integer[], out x integer, out y integer) returns record as $$      

Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Sergey Prokhorenko
Hi pgsql-hackers, I'm writing to propose adding two new built-in functions to PostgreSQL that provide compact UUID encoding using the base32hex format. I'm one of the contributors to RFC 9562 (UUIDs) and to the uuidv7() implementations in PostgreSQL and several libraries. I'm writing to express m

Re: Making pg_rewind faster

2025-10-23 Thread Srinath Reddy Sadipiralla
Hi Michael, On Thu, Oct 23, 2025 at 1:52 PM Michael Paquier wrote: > On Tue, Oct 21, 2025 at 04:14:55PM -0700, John H wrote: > > Made the changes and included the documentation update. > > I have been looking at this patch, and the first part that stood out > is that the refactoring related to i

Re: CI: Add task that runs pgindent

2025-10-23 Thread David G. Johnston
On Thu, Oct 23, 2025, 11:14 Peter Geoghegan wrote: > On Wed, Oct 22, 2025 at 8:07 AM Daniel Gustafsson wrote: > > I like the different shape and symbol, but I would probably keep it > green to > > indicate that it's informational rather than actionable. We don't want a > > flurry of patch re-su

Re: Git clone over git protocol fails

2025-10-23 Thread Tom Lane
Daniel Gustafsson writes: >> On 23 Oct 2025, at 16:41, Daniel Gustafsson wrote: >> I don't remember the exact details (and an archive search is failing me) but >> I seem to recall support for the Git protocol being removed a while back. > This was just confirmed off-list.. Yeah, I also recall b

Re: Git clone over git protocol fails

2025-10-23 Thread Gurjeet Singh
>On Thu, Oct 23, 2025 at 7:41 AM Daniel Gustafsson wrote: >> On 23 Oct 2025, at 01:17, Gurjeet Singh wrote: >> The docs page mentioned in the first command needs to be fixed for sure. > If the Git protocol is indeed unsupported we need something like the attached backpatched all the way. LGTM

Re: issue with synchronized_standby_slots

2025-10-23 Thread Fujii Masao
On Thu, Oct 23, 2025 at 8:28 PM Amit Kapila wrote: > +-- Parallel worker does not throw error during startup. > +SET min_parallel_table_scan_size TO 0; > +SET max_parallel_workers_per_gather TO 2; > +SET parallel_setup_cost TO 0; > +SET parallel_tuple_cost TO 0; > +CREATE TABLE t1(a int); > +INSER

Re: Remove an unnecessary blank line on the PQisBusy() comments

2025-10-23 Thread Euler Taveira
On Thu, Oct 23, 2025, at 12:11 PM, Nathan Bossart wrote: > On Thu, Oct 23, 2025 at 08:02:03PM +0900, Yugo Nagata wrote: >> I’ve attached a very trivial patch that removes an unnecessary line >> after the comments on PQisBusy(), just for consistency with the >> surrounding code. > > Given this line

Re: Git clone over git protocol fails

2025-10-23 Thread Jacob Champion
On Thu, Oct 23, 2025 at 7:59 AM Nathan Bossart wrote: > LGTM +1 --Jacob

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

2025-10-23 Thread Dean Rasheed
On Thu, 23 Oct 2025 at 09:23, jian he wrote: > > On Tue, Oct 21, 2025 at 12:01 AM Viktor Holmberg wrote: > > > > So patch 0001, attached, adds a new set of regression tests, near the > > start of rowsecurity.sql, which specifically tests which policies are > > applied for each command variant. >

Re: CI: Add task that runs pgindent

2025-10-23 Thread Peter Geoghegan
On Wed, Oct 22, 2025 at 8:07 AM Daniel Gustafsson wrote: > I like the different shape and symbol, but I would probably keep it green to > indicate that it's informational rather than actionable. We don't want a > flurry of patch re-submissions with only whitespace changes eating CI > resources >

Re: Remove an unnecessary blank line on the PQisBusy() comments

2025-10-23 Thread Nathan Bossart
On Thu, Oct 23, 2025 at 08:02:03PM +0900, Yugo Nagata wrote: > I’ve attached a very trivial patch that removes an unnecessary line > after the comments on PQisBusy(), just for consistency with the > surrounding code. Given this line has been there for 28 years (commit edbd513) and isn't hurting an

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Aleksander Alekseev
Hi, > > I'm writing to propose adding two new built-in functions to PostgreSQL that > > provide compact UUID encoding using the base32hex format. > > Firstly, cc:'ing a few dozens of people is not the best way to get > attention to your patch. Please don't do this. > > [...] I checked pgsql-hack

Re: Git clone over git protocol fails

2025-10-23 Thread Nathan Bossart
On Thu, Oct 23, 2025 at 04:53:30PM +0200, Daniel Gustafsson wrote: >> If the Git protocol is indeed unsupported we need something like the attached >> backpatched all the way. > > ..so unless objected to this seems like an appropriate fix. LGTM -- nathan

Re: Proposal: Allow excluding specific file patterns in pg_checksums

2025-10-23 Thread Daniel Gustafsson
> On 23 Oct 2025, at 16:39, Greg Sabino Mullane wrote: > > Putting files inside base/ is just a bad idea. Even if you handle > pg_checksums and pg_basebackup, external tools like pgbackrest will have > issues as well. Agreed. -- Daniel Gustafsson

Re: Git clone over git protocol fails

2025-10-23 Thread Daniel Gustafsson
> On 23 Oct 2025, at 16:41, Daniel Gustafsson wrote: > I don't remember the exact details (and an archive search is failing me) but > I seem to recall support for the Git protocol being removed a while back. This was just confirmed off-list.. >> The docs page mentioned in the first command need

Re: Git clone over git protocol fails

2025-10-23 Thread Daniel Gustafsson
> On 23 Oct 2025, at 01:17, Gurjeet Singh wrote: > > I'm not sure if it's expected because of some recent infrastructure changes, > but cloning Postgres repo with the following commands fails. I don't remember the exact details (and an archive search is failing me) but I seem to recall support

Re: Proposal: Allow excluding specific file patterns in pg_checksums

2025-10-23 Thread Greg Sabino Mullane
Putting files inside base/ is just a bad idea. Even if you handle pg_checksums and pg_basebackup, external tools like pgbackrest will have issues as well. I think better solutions are one of: * Store these non-Postgres files somewhere else. Can still be in the data directory * Make sure the files

Re: CI: Add task that runs pgindent

2025-10-23 Thread Daniel Gustafsson
> On 23 Oct 2025, at 11:40, Jelte Fennema-Nio wrote: > > On Wed, 22 Oct 2025 at 14:06, Daniel Gustafsson wrote: >> I like the different shape and symbol, but I would probably keep it green to >> indicate that it's informational rather than actionable. We don't want a >> flurry of patch re-submi

Re: WIP: parallel GiST index builds

2025-10-23 Thread Kirill Reshke
On Fri, 8 Nov 2024 at 19:53, Tomas Vondra wrote: > > On 10/31/24 19:05, Andrey M. Borodin wrote: > > > > > >> On 8 Oct 2024, at 17:05, Tomas Vondra wrote: > >> > >> Here's an updated patch adding the queryid. > > > > I've took another round of looking through the patch. > > Everything I see seems

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Jelte Fennema-Nio
On Thu, 23 Oct 2025 at 15:07, Andrey Borodin wrote: > > SELECT encode(uuidv7() :: bytea, 'base32'); > > That's an excellent feedback! Would such conversion be idiomatic for Postgres > users? > Are there any other alternative approaches? Agreed that extending the encode function is the way to go.

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

2025-10-23 Thread Jelte Fennema-Nio
The main reason that libpq does not request protocol version 3.2 by default is because other proxy/server implementations don't implement the negotiation. This is a bit of a chicken and egg problem: We don't bump the default version that libpq asks, but proxies will only implement version negotati

Re: Include extension path on pg_available_extensions

2025-10-23 Thread Euler Taveira
On Wed, Oct 22, 2025, at 10:28 PM, Chao Li wrote: >> On 9/16/25 8:18 AM, Matheus Alcantara wrote: >> >>> Any opinions on this? >>> [1] >>> https://www.postgresql.org/message-id/CAKFQuwbR1Fzr8yRuMW%3DN1UMA1cTpFcqZe9bW_-ZF8%3DBa2Ud2%3Dw%40mail.gmail.com >> Just as the discussion here. Adding extens

Re: [PATCH] Free memory allocated by waitonlock_error_callback()

2025-10-23 Thread Aleksander Alekseev
Hi Tom, > Yeah, I object. Didn't 89d57c1fb already solve this in a more > general way? If it's not fixed by that, why not? I can confirm that 89d57c1fb fixed the issue under question, thanks! Marking the patch as Withdrawn. -- Best regards, Aleksander Alekseev

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-23 Thread Andrey Borodin
Hello! > On 23 Oct 2025, at 14:55, Aleksander Alekseev > wrote: > > Secondly, in order to propose a patch please use `git format-patch` > and send it as an attachment. Then register it on the nearest open > commitfest [1]. I think it's not about review yet, but more of a discussing viability a

Add GoAway protocol message for graceful but fast server shutdown/switchover

2025-10-23 Thread Jelte Fennema-Nio
This change introduces a new GoAway backend-to-frontend protocol message (byte 'g') that the server can send to the client to politely request that client to disconnect/reconnect when convenient. This message is advisory only - the connection remains fully functional and clients may continue execu

Re: Implement waiting for wal lsn replay: reloaded

2025-10-23 Thread Xuneng Zhou
Hi, On Thu, Oct 23, 2025 at 6:46 PM Alexander Korotkov wrote: > > Hi! > > In Thu, Oct 16, 2025 at 10:12 AM Xuneng Zhou wrote: > > On Wed, Oct 15, 2025 at 8:48 PM Xuneng Zhou wrote: > > > > > > Hi, > > > > > > Thank you for the grammar review and the clear recommendation. > > > > > > On Wed, Oct

Re: Making pg_rewind faster

2025-10-23 Thread Robert Haas
On Thu, Oct 23, 2025 at 4:22 AM Michael Paquier wrote: > +* However we check last_common_segno and file_size again for sanity. > +*/ > + if (file_segno < last_common_segno && source_size == target_size) > > What if a segment has a size different than the one a cluster has been > initiali

Re: pgsql: Use CompactAttribute more often, when possible

2025-10-23 Thread Robert Haas
On Tue, Oct 21, 2025 at 6:36 PM David Rowley wrote: > There are some locations where I've left the code using > FormData_pg_attribute. These are mostly in the ALTER TABLE code. Using > CompactAttribute here seems more risky as often the TupleDesc is being > changed and those changes may not have

Re: amcheck: support for GiST

2025-10-23 Thread Arseniy Mukhin
Hi, On Wed, Oct 22, 2025 at 9:57 PM Kirill Reshke wrote: > > Hi! Thank you for your review. Thank you for the new version! > Im posting new version of 0001 patch of series > > On Tue, 22 Jul 2025 at 15:47, Arseniy Mukhin > wrote: > > > > Hi, Andrey! > > > > Thank you for working on this! There

Re: issue with synchronized_standby_slots

2025-10-23 Thread Amit Kapila
On Thu, Oct 23, 2025 at 2:58 PM Shlok Kyal wrote: > > On Thu, 23 Oct 2025 at 13:45, Hayato Kuroda (Fujitsu) > wrote: > > > > 2. > > Also, test for PG18 should not have the case which rejects the reserved > > name. > > Why to have that even for HEAD and PG18? > > 3. > > ``` > > -- Parallel work

Re: Logical Replication of sequences

2025-10-23 Thread Amit Kapila
On Thu, Oct 23, 2025 at 11:45 AM vignesh C wrote: > > The attached patch has the changes for the same. > I have pushed 0001 and the following are comments on 0002. 1. @@ -1414,6 +1414,7 @@ CREATE VIEW pg_stat_subscription_stats AS ss.subid, s.subname, ss.apply_error_co

Remove an unnecessary blank line on the PQisBusy() comments

2025-10-23 Thread Yugo Nagata
Hi, I’ve attached a very trivial patch that removes an unnecessary line after the comments on PQisBusy(), just for consistency with the surrounding code. Regards, Yugo Nagata -- Yugo Nagata diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 0b1e37ec30b..f8859076

Re: Implement waiting for wal lsn replay: reloaded

2025-10-23 Thread Alexander Korotkov
Hi! In Thu, Oct 16, 2025 at 10:12 AM Xuneng Zhou wrote: > On Wed, Oct 15, 2025 at 8:48 PM Xuneng Zhou wrote: > > > > Hi, > > > > Thank you for the grammar review and the clear recommendation. > > > > On Wed, Oct 15, 2025 at 4:51 PM Álvaro Herrera wrote: > > > > > > I didn't review the patch oth

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

2025-10-23 Thread shveta malik
Please find a few comments: 1) RequestDisableLogicalDecoding: Shall we have 'Assert(!MyReplicationSlot)' here to ensure that this function is invoked after we have released and dropped the slot. This is similar to 'Assert(MyReplicationSlot)' in EnsureLogicalDecodingEnabled(). 2) EnsureLogicalDeco

  1   2   >