Re: Logical Replication of sequences

2025-10-24 Thread Amit Kapila
On Fri, Oct 24, 2025 at 8:52 PM vignesh C wrote: > > On Thu, 23 Oct 2025 at 16:47, Amit Kapila wrote: > > > > 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. >

Re: Logical Replication of sequences

2025-10-24 Thread Amit Kapila
On Fri, Oct 24, 2025 at 11:43 AM shveta malik wrote: > > 5) > For the race condition where the worker is going to access the seq > locally and meanwhile it is altered; now the worker correctly reports > this. But it reports this as a success scenario. And once the scenario > is reported as 'seq-wo

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

2025-10-24 Thread Akshay Joshi
On Thu, Oct 23, 2025 at 12:19 AM Philip Alger wrote: > > > >>> The get_formatted_string function is needed. Instead of using multiple >> if statements for the pretty flag, it’s better to have a generic >> function. This will be useful if the pretty-format DDL implementation is >> accepted by the

Re: Feature: psql - display current search_path in prompt

2025-10-24 Thread Florents Tselai
On Fri, Oct 24, 2025 at 5:20 PM Nathan Bossart wrote: > On Fri, Oct 24, 2025 at 05:10:13PM +0300, Florents Tselai wrote: > > Good catch. v2 attached > > Thanks. > > + > + %S > + The current search path. > + > > I'd suggest linking to a page about the search_path [0]. > Done

Re: C11: should we use char32_t for unicode code points?

2025-10-24 Thread Thomas Munro
On Sat, Oct 25, 2025 at 4:25 AM Jeff Davis wrote: > On Fri, 2025-10-24 at 18:43 +0900, Tatsuo Ishii wrote: > > Unless char32_t is solely used for the Unicode code point data, I > > think it would be better to define something like "pg_unicode" and > > use > > it instead of directly using char32_t

Re: Making pg_rewind faster

2025-10-24 Thread Srinath Reddy Sadipiralla
On Sat, Oct 25, 2025 at 6:46 AM Michael Paquier wrote: > On Fri, Oct 24, 2025 at 05:51:54PM +0530, Srinath Reddy Sadipiralla wrote: > > -* These files exist on the source and the target services, so > they > > should > > +* These files exist on the source and the target servers, s

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

2025-10-24 Thread David Rowley
Since e2debb643, we've had the ability to determine if a column is NULLable as early as during constant folding. This seems like a good time to consider converting COUNT(not_null_col) into COUNT(*), which is faster and may result in far fewer columns being deformed from the tuple. To make this wo

Re: Making pg_rewind faster

2025-10-24 Thread Michael Paquier
On Fri, Oct 24, 2025 at 05:51:54PM +0530, Srinath Reddy Sadipiralla wrote: > -* These files exist on the source and the target services, so they > should > +* These files exist on the source and the target servers, so they > should Not sure what my fingers were doing here. > I thi

Re: Remove Item type

2025-10-24 Thread Peter Geoghegan
On Mon, Sep 29, 2025 at 6:20 AM Peter Eisentraut wrote: > Continuing the theme of cleaning up old and weird stuff in the code, I > propose to remove the Item type. +1 -- Peter Geoghegan

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

2025-10-24 Thread Matheus Alcantara
On Fri Oct 24, 2025 at 4:36 AM -03, Arseniy Mukhin wrote: >> I would expect to add 002_aborted_tx_notifies.pl in a separate patch >> since it's not related to this bug fix. >> >> --- >> +# Test checks that listeners do not receive notifications from aborted >> +# transaction even if notifications h

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

2025-10-24 Thread Matheus Alcantara
Thanks for the review! On Thu Oct 23, 2025 at 8:42 PM -03, Masahiko Sawada wrote: > 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_aborte

Re: Bug in pg_stat_statements

2025-10-24 Thread Sami Imseih
v4 corrects some code comments. Also, I created a CF entry [0]. [0] https://commitfest.postgresql.org/patch/6167/ v4-0001-pg_stat_statements-Fix-duplicate-constant-locatio.patch Description: Binary data v4-0002-pg_stat_statements-move-out-jumble-specific-routi.patch Description: Binary data

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

2025-10-24 Thread Masahiko Sawada
On Fri, Oct 24, 2025 at 3:42 PM Sergey Prokhorenko wrote: > > > > On Friday 24 October 2025 at 09:24:15 pm GMT+3, Masahiko Sawada > wrote: > > > On Fri, Oct 24, 2025 at 12:17 AM Sergey Prokhorenko > wrote: > > > > > > Masahiko, > > > > Developers will still be able to use the long canonical 'he

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

2025-10-24 Thread Sergey Prokhorenko
On Friday 24 October 2025 at 09:24:15 pm GMT+3, Masahiko Sawada wrote: On Fri, Oct 24, 2025 at 12:17 AM Sergey Prokhorenko wrote: > > > Masahiko, > > Developers will still be able to use the long canonical 'hex' UUID format for > compatibility. But the short format is not a developer

Re: another autovacuum scheduling thread

2025-10-24 Thread David Rowley
On Sat, 25 Oct 2025 at 10:14, Peter Geoghegan wrote: > > On Wed, Oct 22, 2025 at 3:35 PM David Rowley wrote: > > If we had the varying sleep time as I mentioned above, the > > failsafe code could even be removed as the > > "autovacuum_vacuum_cost_delay / " calculation would > > effectively zero t

Re: ci: Improve OpenBSD core dump backtrace handling

2025-10-24 Thread Thomas Munro
On Sat, Oct 25, 2025 at 2:20 AM Nazir Bilal Yavuz wrote: > Any feedback would be appreciated. +filename=$(basename "$corefile") +base=$(echo "$filename" | sed 's/\.core.*$//') +binary=$(find "$executable_directory" -type f -name "$base" 2>/dev/null | head -n 1) + +

Re: Instability of phycodorus in pg_upgrade tests with JIT

2025-10-24 Thread Tom Lane
Andres Freund writes: > On 2025-10-15 19:39:03 -0400, Tom Lane wrote: >> phycodorus seems to be running a remarkably ancient LLVM version. > It intentionally tests the oldest supported version... If we don't care, I'm > happy enough to just remove the animal. Sure, we'd need to change our docs a

Re: another autovacuum scheduling thread

2025-10-24 Thread Peter Geoghegan
On Wed, Oct 22, 2025 at 3:35 PM David Rowley wrote: > If we had the varying sleep time as I mentioned above, the > failsafe code could even be removed as the > "autovacuum_vacuum_cost_delay / " calculation would > effectively zero the sleep time with any table > failsafe age. I'm not sure what yo

Re: Bug in pg_stat_statements

2025-10-24 Thread Sami Imseih
> > > > Having said > > > > that it seems that another solution would be to check for duplicated > > > > constants > > > > in fill_in_constant_length > > > > > > Yes, I started thinking along these lines as well, where we check for > > > duplicates > > > in fill_in_constant_length; or after jumbli

Re: use SIMD in GetPrivateRefCountEntry()

2025-10-24 Thread Peter Geoghegan
On Fri, Oct 24, 2025 at 4:32 PM Peter Geoghegan wrote: > I was unable to notice any improvements in any of the microbenchmarks > that I've been using to test the index prefetching patch set. For > whatever reason, these test cases are neither improved nor regressed > by your patch series. Correct

Re: use SIMD in GetPrivateRefCountEntry()

2025-10-24 Thread Peter Geoghegan
On Fri, Oct 3, 2025 at 10:48 AM Nathan Bossart wrote: > I quickly hacked together some patches for this. 0001 adds new static > variables so that we have a separate array of the buffers and the index for > the current ReservedRefCountEntry. 0002 optimizes the linear search in > GetPrivateRefCoun

Re: display hot standby state in psql prompt

2025-10-24 Thread Jim Jones
On 24/10/2025 18:13, Jim Jones wrote: > > On 24/10/2025 17:21, Fujii Masao wrote: >> + const char *hs = PQparameterStatus(pset.db, "in_hot_standby"); >> + const char *ro = PQparameterStatus(pset.db, >> "default_transaction_read_only"); >> >> When either hs or ro is NULL, the displayed status ca

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

2025-10-24 Thread Gregory Smith
On Fri, Oct 24, 2025 at 8:38 AM Tomas Vondra wrote: > Hmmm, I wonder if the m_w_m is high enough to confuse the trimming logic > in some way. Can you try if using smaller m_w_m (maybe 128MB-256MB) > makes the issue go away? > The index builds at up to 4GB of m_w_m. 5GB and above crashes. Now t

[PATCH] Add pg_get_role_ddl() functions for role recreation

2025-10-24 Thread Bryan Green
Attached is a patch adding two new functions for generating DDL to recreate roles: pg_get_role_ddl() and pg_get_role_ddl_statements(). These functions return the CREATE ROLE statement and any ALTER ROLE SET configuration parameters needed to recreate a role. The former returns everything as a si

Re: Improving and extending int128.h to more of numeric.c

2025-10-24 Thread Dean Rasheed
On Fri, 24 Oct 2025 at 15:23, Andres Freund wrote: > > FWIW, there are a few interesting messages on the host of my buildfarm animal: > > Aug 19 02:05:31 andres-postgres-buildfarm-v6 kernel: traps: > test_int128[1678696] trap divide error ip:55764d59802c sp:7fffc378f7f8 > error:0 in test_int128[

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

2025-10-24 Thread Viktor Holmberg
Looks great. The test is easy to understand now. I’ve set the commitfest entry to “ready for committer”. /Viktor On 20 Oct 2025 at 15:29 +0200, Dean Rasheed , wrote: > While looking at the INSERT ... ON CONFLICT DO SELECT patch, I noticed > that the "Policies Applied by Command Type" table on the

Re: Unused variable in perl test

2025-10-24 Thread Daniel Gustafsson
> On 24 Oct 2025, at 16:12, Daniil Davydov <[email protected]> wrote: > There is an unused variable "backup_name" in > test/recovery/t/006_logical_decoding.pl > What about getting rid of it? Seems to have been unused since introduced in d851bef2d60ff close to a decade ago. -- Daniel Gustafsso

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

2025-10-24 Thread Daniel Gustafsson
> On 24 Oct 2025, at 14:40, Ranier Vilela wrote: > Em sex., 24 de out. de 2025 às 09:24, Álvaro Herrera > escreveu: >> Hmm? That makes no sense. Do you have references to documentation that >> says the system works the way you claim? > There are a bunch of messages

Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array

2025-10-24 Thread Masahiko Sawada
On Thu, Oct 23, 2025 at 1:17 AM Xuneng Zhou wrote: > > Hi Sawada-san, Michael, > > Thanks for your comments on this patch. > > On Thu, Oct 23, 2025 at 8:28 AM Masahiko Sawada wrote: > > > > On Mon, Oct 20, 2025 at 11:13 PM Xuneng Zhou wrote: > > > > > > Hi, > > > > > > Thanks for looking into th

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-24 Thread Matheus Alcantara
Hi, thanks for testing this patch! On Thu Oct 23, 2025 at 6:49 AM -03, jian he wrote: > On Thu, Oct 23, 2025 at 8:01 AM Matheus Alcantara > wrote: >> >> Please see the attached v3 version that implements this idea. >> > hi. > > I am not famailith with this module. > some of the foreach can be rep

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

2025-10-24 Thread Masahiko Sawada
On Fri, Oct 24, 2025 at 12:17 AM Sergey Prokhorenko wrote: > > > Masahiko, > > Developers will still be able to use the long canonical 'hex' UUID format for > compatibility. But the short format is not a developer choice, but a > convention. We mustn't allow a situation where 25% of systems use

Re: Bug in pg_stat_statements

2025-10-24 Thread Sami Imseih
> > > Having said > > > that it seems that another solution would be to check for duplicated > > > constants > > > in fill_in_constant_length > > > > Yes, I started thinking along these lines as well, where we check for > > duplicates > > in fill_in_constant_length; or after jumbling, we de-duplic

Re: create table like including storage parameter

2025-10-24 Thread Nathan Bossart
On Sun, Sep 28, 2025 at 08:28:45PM -0500, David G. Johnston wrote: > On Sunday, September 28, 2025, jian he wrote: >> Since we already support INCLUDING STORAGE, I’m not sure that >> INCLUDING STORAGE PARAMETER is the right syntax to go with. > > I’d just call it “including parameters”; sure, all

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

2025-10-24 Thread David E. Wheeler
On Oct 22, 2025, at 18:36, Nathan Bossart wrote: >>> so I guess we need to add 24f6c1bd4 to that history. >> >> Yup. Will do. > > Ope, looks like you took care of it already, thanks. Looks like everything’s back to green. Thanks everyone, this sort of setup is exactly what I had hoped to see

Re: Change initdb default to the builtin collation provider

2025-10-24 Thread Jeff Davis
On Fri, 2025-10-17 at 15:02 -0700, Jeff Davis wrote: > On Fri, 2025-10-17 at 17:23 +0200, Peter Eisentraut wrote: > > I remain violently opposed to this idea.  I don't understand how it > > could be acceptable to just not provide a good display order by > > default > > and have everyone rewrite th

Re: display hot standby state in psql prompt

2025-10-24 Thread Jim Jones
On 24/10/2025 17:21, Fujii Masao wrote: > + const char *hs = PQparameterStatus(pset.db, "in_hot_standby"); > + const char *ro = PQparameterStatus(pset.db, > "default_transaction_read_only"); > > When either hs or ro is NULL, the displayed status can be incorrect. > For example, connecting to a

Re: List TAP test files in makefiles

2025-10-24 Thread Nathan Bossart
On Sat, Aug 23, 2025 at 10:17:59AM -0400, Tom Lane wrote: > This proposed fix adds more manual maintenance effort, and I really > doubt that it will do much to solve the ostensible problem that > people forget to update the meson.build files. This was my reaction, too. I suspect folks will update

Re: Remove Item type

2025-10-24 Thread Nathan Bossart
On Mon, Sep 29, 2025 at 12:20:00PM +0200, Peter Eisentraut wrote: > So I'm proposing to remove the Item type, replace it with void * in > function prototypes, and remove all the casts. The general idea seems reasonable to me, but I'm a little concerned that using "void *" could break extensions wr

Re: C11: should we use char32_t for unicode code points?

2025-10-24 Thread Jeff Davis
On Fri, 2025-10-24 at 18:43 +0900, Tatsuo Ishii wrote: > > Unless char32_t is solely used for the Unicode code point data, I > think it would be better to define something like "pg_unicode" and > use > it instead of directly using char32_t because it would be cleaner for > code readers. That was

Re: display hot standby state in psql prompt

2025-10-24 Thread Fujii Masao
On Wed, Jul 23, 2025 at 5:04 PM Jim Jones wrote: > v3 attached. + const char *hs = PQparameterStatus(pset.db, "in_hot_standby"); + const char *ro = PQparameterStatus(pset.db, "default_transaction_read_only"); When either hs or ro is NULL, the displayed status can be incorrect. For example, conne

Re: display hot standby state in psql prompt

2025-10-24 Thread Srinath Reddy Sadipiralla
On Fri, Oct 24, 2025 at 8:36 PM Greg Sabino Mullane wrote: > > read-only > read/write > > +1 -- Thanks, Srinath Reddy Sadipiralla EDB: https://www.enterprisedb.com/

Re: another autovacuum scheduling thread

2025-10-24 Thread Nathan Bossart
Here is an updated patch based on the latest discussion. -- nathan >From 232bc8a73711c743e74d964abfb202563e176aa5 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 10 Oct 2025 12:28:37 -0500 Subject: [PATCH v4 1/1] autovacuum scheduling improvements --- src/backend/postmaster/autovacuum

Re: display hot standby state in psql prompt

2025-10-24 Thread Greg Sabino Mullane
*shrug* I still like the earlier versions: read-only read/write

Re: display hot standby state in psql prompt

2025-10-24 Thread Nathan Bossart
On Fri, Oct 24, 2025 at 10:54:57AM -0400, Greg Sabino Mullane wrote: > On Fri, Oct 24, 2025 at 10:12 AM Nathan Bossart > wrote: >> I'm currently leaning towards ro/rw, but I'm also hoping that others chime >> in with opinions here. > > -1. Too short, too cryptic, too similar. I know our existing

Re: display hot standby state in psql prompt

2025-10-24 Thread Greg Sabino Mullane
On Fri, Oct 24, 2025 at 10:12 AM Nathan Bossart wrote: > I'm currently leaning towards ro/rw, but I'm also hoping that others chime > in with opinions here. > -1. Too short, too cryptic, too similar. I know our existing symbols aren't great either, but we can do better. Cheers, Greg -- Crunchy

Re: IPC/MultixactCreation on the Standby server

2025-10-24 Thread Ivan Bykov
Hi, Andrey! I started reviewing the TAP tests and for the current master (14ee8e6403001c3788f2622cdcf81a8451502dc2), src/test/modules/test_slru/t/001_multixact.pl reproduces the problem, but we can do it in a more transparent way. The test should fail on timeout; otherwise, it would be hard to

Re: Bug in pg_stat_statements

2025-10-24 Thread Dmitry Dolgov
> On Fri, Oct 24, 2025 at 09:17:22AM -0500, Sami Imseih wrote: > > Having said > > that it seems that another solution would be to check for duplicated > > constants > > in fill_in_constant_length > > Yes, I started thinking along these lines as well, where we check for > duplicates > in fill_in_

Re: Improving and extending int128.h to more of numeric.c

2025-10-24 Thread Andres Freund
Hi, On 2025-07-14 17:22:38 +0700, John Naylor wrote: > On Thu, Jul 10, 2025 at 9:06 PM Dean Rasheed wrote: > > > > On Wed, 9 Jul 2025 at 22:31, Dean Rasheed wrote: > > > > > > On Wed, 9 Jul 2025 at 18:27, Andres Freund wrote: > > > > > > > > I think we should wire this up to the buildsystem and

Re: Feature: psql - display current search_path in prompt

2025-10-24 Thread Nathan Bossart
On Fri, Oct 24, 2025 at 05:10:13PM +0300, Florents Tselai wrote: > Good catch. v2 attached Thanks. + + %S + The current search path. + I'd suggest linking to a page about the search_path [0]. +extern const char *session_search_path(void); This function appears to be unused.

Re: Instability of phycodorus in pg_upgrade tests with JIT

2025-10-24 Thread Andres Freund
Hi, On 2025-10-15 19:39:03 -0400, Tom Lane wrote: > Michael Paquier writes: > > I have spotted a couple of buildfarm failures for buildfarm member > > phycodorus on REL_14_STABLE and REL_13_STABLE: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=phycodurus&dt=2025-10-15%2009%3A12%3A36

Re: Bug in pg_stat_statements

2025-10-24 Thread Sami Imseih
> This sort of short cut the verification for duplicated constants. Having said > that it seems that another solution would be to check for duplicated constants > in fill_in_constant_lengths just before skipping squashed constants and reset > the length if needed. Hi, yes, I was not convinced my

Re: display hot standby state in psql prompt

2025-10-24 Thread Nathan Bossart
On Fri, Oct 24, 2025 at 01:07:41AM +0200, Jim Jones wrote: > Although I prefer it being explicit in this case, I can live with either > approach. Do you think we should go for "ro" or "rw"? I'm currently leaning towards ro/rw, but I'm also hoping that others chime in with opinions here. -- natha

Unused variable in perl test

2025-10-24 Thread Daniil Davydov
Hi, here is my 2c :) There is an unused variable "backup_name" in test/recovery/t/006_logical_decoding.pl What about getting rid of it? -- Best regards, Daniil Davydov From a0087458cf931826a18a1079b3618d867acdbf96 Mon Sep 17 00:00:00 2001 From: Daniil Davidov Date: Fri, 24 Oct 2025 21:02:51 +070

Re: Feature: psql - display current search_path in prompt

2025-10-24 Thread Florents Tselai
On Thu, Oct 23, 2025 at 11:52 PM Nathan Bossart wrote: > 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/patc

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

2025-10-24 Thread Bryan Green
On 10/24/2025 7:40 AM, Ranier Vilela wrote: Em sex., 24 de out. de 2025 às 09:24, Álvaro Herrera mailto:[email protected]>> escreveu: On 2025-Oct-24, Ranier Vilela wrote: > Handles are a scarce Windows resource. > The work of freeing these resources is not done by exit(), b

Re: Bug in pg_stat_statements

2025-10-24 Thread Dmitry Dolgov
> On Thu, Oct 23, 2025 at 07:49:55PM -0500, Sami Imseih wrote: > I believe the correct answer is to fix this in queryjumblefuncs.c > and more specifically inside _jumbleElements. We should not > record the same location twice. We can do this by tracking the > start location of the last recorded co

ci: Improve OpenBSD core dump backtrace handling

2025-10-24 Thread Nazir Bilal Yavuz
Hi, While working on [1], I realized that the core dump output of OpenBSD has very little information. We had an off-list chat with Thomas and found that this happens because OpenBSD core dump files do not include the executable information; so we need to run `lldb` with the executable path. Attac

Re: use SIMD in GetPrivateRefCountEntry()

2025-10-24 Thread Andres Freund
Hi, On October 24, 2025 3:43:34 PM GMT+03:00, Yura Sokolov wrote: >03.10.2025 23:51, Nathan Bossart пишет: >> Sorry for the noise. I fixed x86-64 builds in v2. >> > >Why not just use simplehash for private ref counts? >Without separation on array and overflow parts. >Just single damn simple ha

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

2025-10-24 Thread Ranier Vilela
Em sex., 24 de out. de 2025 às 09:21, Álvaro Herrera escreveu: > On 2025-Oct-24, Ranier Vilela wrote: > > > Em sex., 24 de out. de 2025 às 03:03, Michael Paquier > > escreveu: > > > > This is just one of them, allocated in the context of what is a > > > short-term execution. > > > > In this case

Re: WIP: parallel GiST index builds

2025-10-24 Thread Tomas Vondra
On 10/23/25 16:13, Kirill Reshke wrote: > 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 lookin

Re: use SIMD in GetPrivateRefCountEntry()

2025-10-24 Thread Yura Sokolov
03.10.2025 23:51, Nathan Bossart пишет: > Sorry for the noise. I fixed x86-64 builds in v2. > Why not just use simplehash for private ref counts? Without separation on array and overflow parts. Just single damn simple hash table. -- regards Yura Sokolov aka funny-falcon

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

2025-10-24 Thread Ranier Vilela
Em sex., 24 de out. de 2025 às 09:24, Álvaro Herrera escreveu: > On 2025-Oct-24, Ranier Vilela wrote: > > > Handles are a scarce Windows resource. > > The work of freeing these resources is not done by exit(), but by > > Windows itself, when possible. > > If applications are not good citizens, th

Re: Report bytes and transactions actually sent downtream

2025-10-24 Thread Bertrand Drouvot
Hi, On Fri, Oct 24, 2025 at 03:23:44PM +0530, Ashutosh Bapat wrote: > On Mon, Oct 6, 2025 at 10:32 AM Ashutosh Bapat > wrote: > > > > On Fri, Oct 3, 2025 at 7:17 PM Bertrand Drouvot > > wrote: > > > > > > > Issue 2: Once X + 2 is loaded, further statistics are accumulated on > > > > the top of s

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

2025-10-24 Thread Tomas Vondra
Hi, On 10/24/25 05:03, Gregory Smith wrote: > 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 adju

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

2025-10-24 Thread Joe Conway
On 10/24/25 07:49, Joe Conway wrote: On 10/24/25 17:36, Tom Lane wrote: Anyway, we seem to need the attached in v18 and HEAD, and we really ought to get BF coverage going again. I will make those changes (and hope nothing breaks). And of course they did break :-( Rhino is still running on R

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

2025-10-24 Thread Álvaro Herrera
On 2025-Oct-24, Ranier Vilela wrote: > Handles are a scarce Windows resource. > The work of freeing these resources is not done by exit(), but by > Windows itself, when possible. > If applications are not good citizens, these resources will eventually > run out. Hmm? That makes no sense. Do you

Re: Making pg_rewind faster

2025-10-24 Thread Srinath Reddy Sadipiralla
On Fri, Oct 24, 2025 at 2:08 PM Michael Paquier wrote: > On Fri, Oct 24, 2025 at 04:56:33PM +0900, Michael Paquier wrote: > > I was just wondering about some queries on the new standby once we are > > done with the rewind. But after sleeping on it, I'd be happy with > > just the set of tests we

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

2025-10-24 Thread Álvaro Herrera
On 2025-Oct-24, Ranier Vilela wrote: > Em sex., 24 de out. de 2025 às 03:03, Michael Paquier > escreveu: > > This is just one of them, allocated in the context of what is a > > short-term execution. > > In this case, I believe pg_regress is run, thousands of times, on > hundreds of computers. Y

Re: Reorganize GUC structs

2025-10-24 Thread Heikki Linnakangas
@@ -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 *maxbytes,

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

2025-10-24 Thread Joel Jacobson
On Fri, Oct 24, 2025, at 11:55, Arseniy Mukhin wrote: > On Wed, Oct 22, 2025 at 3:02 AM Joel Jacobson wrote: >> How about doing some more work in vac_update_datfrozenxid()? >> >> Pseudo-code sketch: >> ... > I agree we need to add something like this. Looks like with v10 it's > possible for the li

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

2025-10-24 Thread Jelte Fennema-Nio
On Fri Oct 24, 2025 at 7:04 AM CEST, Kirill Reshke wrote: On Thu, 23 Oct 2025 at 18:05, Jelte Fennema-Nio wrote: Im +1 on this idea. This is something I wanted back in 2020, when implementing the 'online restart' feature for odyssey[0], but never bothered to create a thread. Yeah, to be clear:

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

2025-10-24 Thread Joe Conway
On 10/24/25 17:36, Tom Lane wrote: I think that rhinoceros is the only BF member testing with --with-selinux. Yes, as far as I know anyway. Looking at its logs, it is running the sepgsql tests (as a custom module) in v17 and before, but not in v18 or HEAD. I suppose that this is a consequenc

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

2025-10-24 Thread Amit Kapila
On Fri, Oct 24, 2025 at 3:23 AM Masahiko Sawada wrote: > > On Thu, Oct 23, 2025 at 11:52 AM Masahiko Sawada > wrote: > > I've addressed the above comments and made some cosmetic changes. > Below are few comments/questions: 1. + + When wal_level is set to replica, + dropping the

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

2025-10-24 Thread Mircea Cadariu
On 17/10/2025 00:23, Michael Paquier wrote: Yes, and the other members are not complaining as far as I can see, so we should be clear in terms of the tests. Now, back to the main issue.. So far so good! About the main issue, seems to me the consensus is that dropping unnamed portals more agg

Re: Unicode 17

2025-10-24 Thread Daniel Verite
Alexander Borisov wrote: > I can take care of this and send you an update for all the tables and > everything related to it. > > But maybe you have someone keeping an eye on things, or is it somehow > automated? With the current sources, the build process can pick up Unicode 17 without a

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

2025-10-24 Thread Ranier Vilela
Em sex., 24 de out. de 2025 às 02:57, Michael Paquier escreveu: > 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 ca

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

2025-10-24 Thread Ranier Vilela
Em sex., 24 de out. de 2025 às 03:03, Michael Paquier escreveu: > 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

Re: issue with synchronized_standby_slots

2025-10-24 Thread Shlok Kyal
On Fri, 24 Oct 2025 at 15:08, Amit Kapila wrote: > > On Fri, Oct 24, 2025 at 1:24 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Shlok, > > > > ``` > > -- Can set synchronized_standby_slots to a non-existent slot name. > > ALTER SYSTEM SET synchronized_standby_slots='missing'; > > SELECT pg_rel

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

2025-10-24 Thread Ashutosh Bapat
On Wed, Oct 22, 2025 at 4:49 AM Peter Smith wrote: > > On Tue, Oct 21, 2025 at 2:11 AM Robert Haas wrote: > > > > On Mon, Oct 20, 2025 at 3:20 AM Peter Smith wrote: > > > Do you have thoughts about the patch? > > > > I agree with the rationale that Ashutosh states but I don't see a > > strong ne

Re: Tab completion for large objects

2025-10-24 Thread Dagfinn Ilmari Mannsåker
Fujii Masao writes: > 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! Thanks! - ilmari

Re: Report bytes and transactions actually sent downtream

2025-10-24 Thread Ashutosh Bapat
On Mon, Oct 6, 2025 at 10:32 AM Ashutosh Bapat wrote: > > On Fri, Oct 3, 2025 at 7:17 PM Bertrand Drouvot > wrote: > > > > Hi, > > > > On Fri, Oct 03, 2025 at 12:22:05PM +0530, Ashutosh Bapat wrote: > > > Here's patchset addressing two issues: > > > > Thanks for the patch update! > > > > > I > >

Re: C11: should we use char32_t for unicode code points?

2025-10-24 Thread Tatsuo Ishii
> 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 a

Re: Question for coverage report

2025-10-24 Thread Álvaro Herrera
On 2025-Oct-22, Tom Lane wrote: > Interesting. I also realized, after re-reading the snippet I showed, > that gcc is treating the code leading up to a CALL instruction as a > separate basic block from the code following the CALL. So that begs > the question of which count is shown for the functi

Re: issue with synchronized_standby_slots

2025-10-24 Thread Amit Kapila
On Fri, Oct 24, 2025 at 1:24 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Shlok, > > ``` > -- Can set synchronized_standby_slots to a non-existent slot name. > ALTER SYSTEM SET synchronized_standby_slots='missing'; > SELECT pg_reload_conf(); > > -- Reset the GUC. > ALTER SYSTEM RESET synchronized_st

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

2025-10-24 Thread shveta malik
On Wed, Oct 22, 2025 at 10:25 AM Ajin Cherian wrote: > > > I've modified the comments to reflect the new changes. > > attaching patch v18 with the above changes. > Thanks for the patch. The test is still not clear. Can we please add the test after the test of "Test logical failover slots correspo

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

2025-10-24 Thread Arseniy Mukhin
On Wed, Oct 22, 2025 at 3:02 AM Joel Jacobson wrote: > > On Wed, Oct 22, 2025, at 02:16, Matheus Alcantara wrote: > >> Regarding the v8 patch, it introduces a fundamentally new way of > >> managing notification entries (adding entries with 'committed' state > >> and marking them 'aborted' in abort

Re: Making pg_rewind faster

2025-10-24 Thread Michael Paquier
On Fri, Oct 24, 2025 at 04:56:33PM +0900, Michael Paquier wrote: > I was just wondering about some queries on the new standby once we are > done with the rewind. But after sleeping on it, I'd be happy with > just the set of tests we have: the debug output checks, the size > checks pre and post-rew

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-10-24 Thread Andrew Kim
Hi Oleg, Thank you for the detailed review on v7 patch. On Mon, Oct 20, 2025 at 8:05 AM Oleg Tselebrovskiy wrote: > > Thanks for the new patch version! > > Another round of review: > > 1) I think that changes to contrib/pageinspect/rawpage.c should be in > the main patch, not in the benchmark pa

Re: Making pg_rewind faster

2025-10-24 Thread Michael Paquier
On Thu, Oct 23, 2025 at 03:01:32PM -0700, John H wrote: > On Thu, Oct 23, 2025 at 9:08 AM Srinath Reddy Sadipiralla > wrote: >> ... >> i guess this is what you want ,please let me know if it's otherwise, >> ... > > That looks right to me. Yes, that would be something among these lines, WAL segm

RE: issue with synchronized_standby_slots

2025-10-24 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, ``` -- Can set synchronized_standby_slots to a non-existent slot name. ALTER SYSTEM SET synchronized_standby_slots='missing'; SELECT pg_reload_conf(); -- Reset the GUC. ALTER SYSTEM RESET synchronized_standby_slots; SELECT pg_reload_conf(); ``` pg_reload_conf() is called twice here b

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-10-24 Thread Andrew Kim
Hi John, Thank you for your review on the previous patch versions. I've carefully addressed your concerns and those raised by Oleg, specifically focusing on patch separation and simplification of the configure tests. I am submitting the new version (V8) as two distinct patches: V8-0001: Pure ref

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

2025-10-24 Thread Arseniy Mukhin
On Fri, Oct 24, 2025 at 2:43 AM Masahiko Sawada wrote: > > 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

Re: issue with synchronized_standby_slots

2025-10-24 Thread Shlok Kyal
Hi Fujii-san, Amit, Thanks for reviewing the patch. On Fri, 24 Oct 2025 at 10:31, Amit Kapila wrote: > > 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_p

Re: issue with synchronized_standby_slots

2025-10-24 Thread Shlok Kyal
Hi Amit, Thanks for reviewing the patch. On Thu, 23 Oct 2025 at 16:58, Amit Kapila wrote: > > 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 reject

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

2025-10-24 Thread Sergey Prokhorenko
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: Add mode column to pg_stat_progress_vacuum

2025-10-24 Thread Shinya Kato
Thank you all for the reviews! On Wed, Oct 8, 2025 at 4:34 AM Masahiko Sawada wrote: > > On Tue, Oct 7, 2025 at 12:01 PM Nathan Bossart > wrote: > > > > On Tue, Oct 07, 2025 at 10:17:38AM -0700, Masahiko Sawada wrote: > > > Right. I think we cannot display both things in one mode column. Since

Re: Add mode column to pg_stat_progress_vacuum

2025-10-24 Thread Shinya Kato
On Thu, Oct 16, 2025 at 2:17 PM Michael Paquier wrote: > > On Thu, Oct 09, 2025 at 10:07:17AM -0500, Sami Imseih wrote: > >> IIUC are you suggesting I add such a last_autovacuum_reason column to > >> pg_stat_all_tables, which would be populated with one of the following > >> values? > >> - autovac