Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-11 Thread Michael Paquier
On Tue, Nov 11, 2025 at 01:22:49PM -0600, Bryan Green wrote: > I have attached v4 of the patch after correcting some whitespace errors > and a struct that didn't need the pgoff_t modification as requested by > Thomas. I also have attached Michael's patch where both patches can be > found by cfbot

Re: Extended Statistics set/restore/clear functions.

2025-11-11 Thread Michael Paquier
On Wed, Nov 12, 2025 at 01:47:33AM -0500, Corey Huinker wrote: >> Thanks for the new patch. And FWIW I disagree with this approach: >> cleanup and refactoring pieces make more sense if done first, as these >> lead to less code churn in the final result. So... I've begun to put >> my hands on the

Re: Make PQgetResult() not return NULL on out-of-memory error

2025-11-11 Thread Yugo Nagata
On Wed, 12 Nov 2025 16:20:13 +0900 Yugo Nagata wrote: > On Tue, 11 Nov 2025 20:16:11 +0900 > Fujii Masao wrote: > > > On Tue, Nov 11, 2025 at 2:43 PM Tom Lane wrote: > > > > > > Fujii Masao writes: > > > > To address this, callers need a way to distinguish between > > > > PGRES_FATAL_ERROR >

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-11 Thread Yugo Nagata
On Wed, 12 Nov 2025 00:22:38 +0900 Fujii Masao wrote: > On Tue, Nov 11, 2025 at 11:41 AM Chao Li wrote: > > I am also debugging the patch for the other purpose when I saw your email, > > so I tried to reproduce the problem with your script. > > > > I think in master branch, we can simply fix th

Re: [patch] ALTER COLUMN SET EXPRESSION [GENERATED|STORED]

2025-11-11 Thread jian he
On Thu, Aug 28, 2025 at 12:00 PM jian he wrote: > > hi. > I realized that we can also modify attgenerated when updating the generated > expression using ALTER COLUMN SET EXPRESSION. > so POC attached. > hi. rebased with minor updates to comments and test cases. -- jian https://www.enterprisedb

Re: SQL:2011 Application Time Update & Delete

2025-11-11 Thread Peter Eisentraut
I have looked at the patch v59-0004-Add-range_minus_multi-and-multirange_minus_multi.patch This seems sound in principle. Perhaps you could restate why you chose a set-returning function rather than (what I suppose would be the other options) returning multirange or an array of ranges. (I do

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-11 Thread Xuneng Zhou
Hi, On Wed, Nov 12, 2025 at 1:04 PM shveta malik wrote: > > On Wed, Nov 12, 2025 at 9:54 AM vignesh C wrote: > > > > Hi, > > > > This patch proposes renaming a column in the view > > pg_stat_subscription_stats to disambiguate between table sync and > > sequence sync error counts. With the introd

Re: Issue with logical replication slot during switchover

2025-11-11 Thread Alexander Kukushkin
Hi Amit, On Wed, 12 Nov 2025 at 05:22, Amit Kapila wrote: > It is difficult to tell when this can happen but you detailed there is > a theoretical possibility of the same. If we had an in-core cluster > tool that manages nodes on its own which doesn't allow such scenarios > to happen then we cou

Re: Make PQgetResult() not return NULL on out-of-memory error

2025-11-11 Thread Yugo Nagata
On Tue, 11 Nov 2025 20:16:11 +0900 Fujii Masao wrote: > On Tue, Nov 11, 2025 at 2:43 PM Tom Lane wrote: > > > > Fujii Masao writes: > > > To address this, callers need a way to distinguish between > > > PGRES_FATAL_ERROR > > > and OOM. Functions that loop until PQgetResult() returns NULL shoul

Re: Implement waiting for wal lsn replay: reloaded

2025-11-11 Thread Xuneng Zhou
Hi, On Wed, Nov 5, 2025 at 5:51 PM Alexander Korotkov wrote: > > Hi! > > On Mon, Nov 3, 2025 at 5:13 PM Andres Freund wrote: > > 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

Re: HASH INDEX builds seems confused

2025-11-11 Thread John Naylor
On Tue, Nov 11, 2025 at 6:08 PM Amit Kapila wrote: > > On Tue, Nov 11, 2025 at 11:27 AM John Naylor wrote: > > However, since commit e09d7a126 it's harder to believe sorts are ever > > useless, since we then decided that sorts should have a more strict > > sort order for the sake of sequential ac

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

2025-11-11 Thread Fujii Masao
On Wed, Nov 5, 2025 at 1:44 PM Fujii Masao wrote: > > On Wed, Nov 5, 2025 at 8:26 AM Peter Smith wrote: > > > > Bump. I found this old thread of mine had received no responses for > > several months. > > > > Any thoughts about the problem it describes? > > +1 to fixing the misleading synopsis. Th

Re: Proposal: Conflict log history table for Logical Replication

2025-11-11 Thread shveta malik
On Fri, Sep 26, 2025 at 4:42 PM Dilip Kumar wrote: > > On Thu, Sep 25, 2025 at 4:19 PM Dilip Kumar wrote: > > > > On Thu, Sep 25, 2025 at 11:53 AM Dilip Kumar wrote: > > > > > > > [1] > > > > /* > > > > * For logical decode we need combo CIDs to properly decode the > > > > * catalog > > > > */ >

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-11 Thread Chao Li
Hi Vaibhav, I just reviewed the patch and got some comments: > On Nov 11, 2025, at 23:51, Vaibhav Dalvi > wrote: > > > 1. ``` + +/* + * build_subscription_ddl_string - Build CREATE SUBSCRIPTION statement for + * a subscription from its OID. This is internal version which helps + * pg_get_su

Fwd: BUG #19095: Test if function exit() is used fail when linked static

2025-11-11 Thread BharatDB
-- Forwarded message - From: BharatDB Date: Wed, Nov 12, 2025 at 11:23 AM Subject: Re: BUG #19095: Test if function exit() is used fail when linked static To: , , < [email protected]> Cc: VASUKI M > Hello Hackers, > > While reproducing a static linking issue between libpq and

Re: [PATCH] Fix translation consistency issues in Korean, Chinese Traditional, and Tamil

2025-11-11 Thread Tom Lane
Henson Choi writes: > I found and fixed three translation consistency issues across different > language files. Thanks for the report, but you should send this to [email protected]. The main -hackers list doesn't deal in translation issues. (In fact, we don't even run the a

Type of pg_buffercache_pages()::forknum

2025-11-11 Thread Ashutosh Bapat
Hi All, The SQL definition of pg_buffercache_pages() and pg_buffercache declares relforknum as int2 CREATE FUNCTION pg_buffercache_pages() RETURNS SETOF RECORD AS 'MODULE_PATHNAME', 'pg_buffercache_pages' LANGUAGE C PARALLEL SAFE; -- Create a view for convenient access. CREATE VIEW pg_buffercache

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-11 Thread shveta malik
On Wed, Nov 12, 2025 at 9:54 AM vignesh C wrote: > > Hi, > > This patch proposes renaming a column in the view > pg_stat_subscription_stats to disambiguate between table sync and > sequence sync error counts. With the introduction of > seq_sync_error_count, the existing column name sync_error_coun

[PATCH] Fix translation consistency issues in Korean, Chinese Traditional, and Tamil

2025-11-11 Thread Henson Choi
Hi PostgreSQL hackers, I found and fixed three translation consistency issues across different language files. The patches are ordered by importance based on their impact on users. = PATCH 1/3: Fix missing "PostgreSQL" in

Re: Is this a typo?

2025-11-11 Thread Chao Li
> On Nov 12, 2025, at 09:36, Thomas Munro wrote: > > On Tue, Nov 11, 2025 at 6:27 PM Chao Li wrote: >> Thanks all for the clarification. Peter and Thomas expressed clear >> preference for "cacheable", and Tom confirmed it is the more common >> spelling. I just created a patch to replace all

Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-11 Thread vignesh C
Hi, This patch proposes renaming a column in the view pg_stat_subscription_stats to disambiguate between table sync and sequence sync error counts. With the introduction of seq_sync_error_count, the existing column name sync_error_count becomes ambiguous, it's unclear whether it refers to tables,

Re: Issue with logical replication slot during switchover

2025-11-11 Thread Amit Kapila
On Tue, Nov 11, 2025 at 9:27 PM Fabrice Chapuis wrote: > > if I resume your scenario > 1. A standby S has a failover slot slot1 synchronized with slot1 on primary P > 2. We promote S > 3. On P we drop slot1 and create slot1 again with failover mode (a subscriber > exist on another instance by exa

Re: Trying out read streams in pgvector (an extension)

2025-11-11 Thread Thomas Munro
On Wed, Nov 12, 2025 at 12:19 PM Thomas Munro wrote: > On Wed, Nov 12, 2025 at 11:52 AM Melanie Plageman > wrote: > > If we are worried about regressing other extensions using > > read_stream_reset(), we could make the read stream reset which > > preserves the distance a different function in bac

Re: display hot standby state in psql prompt

2025-11-11 Thread Fujii Masao
On Mon, Nov 10, 2025 at 5:14 PM Jim Jones wrote: > > > > On 10/11/2025 08:30, Fujii Masao wrote: > > If the main goal of this feature is to help users easily determine > > whether they're connected to a primary or a standby, > > seems simply showing whether the server is in hot standby > > should

Re: Extended Statistics set/restore/clear functions.

2025-11-11 Thread jian he
On Tue, Nov 11, 2025 at 11:14 PM jian he wrote: > > On Tue, Nov 11, 2025 at 4:07 PM Michael Paquier wrote: > > I've rebased the full set using the new structure. 0001~0004 are > > clean. 0005~ need more work and analysis, but that's a start. hi. +Datum +pg_ndistinct_out(PG_FUNCTION_ARGS) + +

Re: Add tests for object size limits of injection points

2025-11-11 Thread Chao Li
> On Nov 10, 2025, at 18:27, Xuneng Zhou wrote: > > Hi Michael, Chao, > > On Mon, Nov 10, 2025 at 11:32 AM Michael Paquier wrote: >> >> On Mon, Nov 10, 2025 at 10:30:31AM +0800, Chao Li wrote: >>> Is really confused. The error message says “maximum of 64”, but the >>> test right uses a name

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

2025-11-11 Thread Thomas Munro
On Wed, Nov 12, 2025 at 2:01 PM Bryan Green wrote: > [v3] "The original commit included a comment suggesting that our open() replacement doesn't create inheritable handles, but it appears this may have been based on a misunderstanding of the code path. In practice, the code was creating inherita

Re: Improve logical replication usability when tables lack primary keys

2025-11-11 Thread Chao Li
> On Nov 11, 2025, at 20:09, Euler Taveira wrote: > > On Mon, Nov 10, 2025, at 5:06 AM, Chao Li wrote: >> I evaluated a few approaches and am proposing the following: >> >> - Introduce a new GUC: `logical_replication_fallback_to_full_identity`. >> - When enabled, if a table being logically re

Re: Add tests for object size limits of injection points

2025-11-11 Thread Xuneng Zhou
Hi, On Wed, Nov 12, 2025 at 9:37 AM Michael Paquier wrote: > > On Mon, Nov 10, 2025 at 06:27:41PM +0800, Xuneng Zhou wrote: > > Thanks for the patch. I also agree with Chao's suggestion that the > > error message better reflects the actual character limits. I > > implemented a patch for that and

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

2025-11-11 Thread Masahiko Sawada
On Sun, Nov 9, 2025 at 8:51 PM Peter Smith wrote: > > Hi Sawada-San. > > Some review comments for v24-0001. > > == > src/backend/replication/slot.c > > ReplicationSlotsDropDBSlots: > > 1. > LWLockAcquire(ReplicationSlotControlLock, LW_SHARED); > for (i = 0; i < max_replication_slots; i++)

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

2025-11-11 Thread Masahiko Sawada
On Mon, Nov 10, 2025 at 8:05 PM shveta malik wrote: > > On Thu, Nov 6, 2025 at 4:32 AM Masahiko Sawada wrote: > > > > > > I've updated and rebased the patch. > > > > Thanks for the patch. Please find a few comments: > > > 1) > ReplicationSlotsDropDBSlots: > > + SpinLockAcquire(&s->mutex); > + inv

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

2025-11-11 Thread Masahiko Sawada
On Tue, Nov 11, 2025 at 2:33 AM Amit Kapila wrote: > > On Tue, Nov 11, 2025 at 9:35 AM shveta malik wrote: > > > > Thanks for the patch. Please find a few comments: > > > > > > 1) > > ReplicationSlotsDropDBSlots: > > > > + SpinLockAcquire(&s->mutex); > > + invalidated = s->data.invalidated == RS_

Re: pg_createsubscriber --dry-run logging concerns

2025-11-11 Thread Peter Smith
On Tue, Nov 11, 2025 at 8:17 PM Álvaro Herrera wrote: > > On 2025-Nov-10, Peter Smith wrote: > > > Hi Alvaro, > > > > Here is patch v4-0001 modified as requested: > > - dashes are removed > > - the message is a single string > > Okay, thanks. I split the strings in two lines, as we customarily do

Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

2025-11-11 Thread Fujii Masao
On Wed, Nov 12, 2025 at 10:10 AM Masahiko Sawada wrote: > +1 for hard-coding the supported encoding list. I think it's a good > start point. We can revisit the idea of dynamically constructing the > encoding list if we're concerned about its maintenance cost. +1 Regards, -- Fujii Masao

Re: Non-blocking archiver process

2025-11-11 Thread Chao Li
> On Nov 10, 2025, at 18:41, BharatDB wrote: > > Dear PostgreSQL Community, > I found 8 Bugs in `shell_archive.c` > > While studying how `archive_command` works, I discovered **8 real issues** > that affect reliability, performance, and safety: > | # | Bug | Impact | |---|-||

Re: Add tests for object size limits of injection points

2025-11-11 Thread Michael Paquier
On Mon, Nov 10, 2025 at 06:27:41PM +0800, Xuneng Zhou wrote: > Thanks for the patch. I also agree with Chao's suggestion that the > error message better reflects the actual character limits. I > implemented a patch for that and updated the test patch as well. > Please check. The restriction relate

Re: Is this a typo?

2025-11-11 Thread Thomas Munro
On Tue, Nov 11, 2025 at 6:27 PM Chao Li wrote: > Thanks all for the clarification. Peter and Thomas expressed clear preference > for "cacheable", and Tom confirmed it is the more common spelling. I just > created a patch to replace all three occurrences accordingly. Pushed. Thanks!

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-11 Thread Peter Smith
Hi Vaibhav. Here are some review comments for v5-0001. == doc/src/sgml/func/func-info.sgml 1. + Get Object DDL Functions Should the title just be "Object DDL Functions" (e.g. sans the "Get")? ~~~ 2. + +The functions shown in +print the DDL statements for various database obj

Re: gen_guc_tables.pl: Validate required GUC fields before code generation

2025-11-11 Thread Chao Li
On Mon, Nov 10, 2025 at 8:02 PM Dagfinn Ilmari Mannsåker wrote: > Chao Li writes: > > > Hi Hacker, > > > > While working on the other patch and editing guc_parameters.dat, I > > mistakenly deleted a “max” value line, then I got the following error > > during build: > > > > ``` > > '/opt/homebrew

Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

2025-11-11 Thread Masahiko Sawada
On Tue, Nov 11, 2025 at 7:14 AM Sugamoto Shinya wrote: > > Thanks everyone for checking my proposal. > Other than how to make the hint string, every comment looks good to me. I'll > take those into my patch. I appreciate it. > > > Given the comments you all made, I looked into the source code to

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

2025-11-11 Thread Bryan Green
On 11/7/2025 11:28 AM, Bryan Green wrote: > On 11/6/2025 8:42 AM, Bryan Green wrote: >> On 11/6/2025 7:43 AM, Thomas Munro wrote: ... >> So the plan would be: >> >> Backport branches (v16+): >> #define O_DIRECT0x8000 >> #define O_CLOEXEC 0x0400 >> #define O_DSYNC _O_NO_INHERIT >>

Re: another autovacuum scheduling thread

2025-11-11 Thread Robert Treat
On Tue, Nov 11, 2025 at 3:27 PM David Rowley wrote: > On Wed, 12 Nov 2025 at 09:13, Nathan Bossart wrote: > > On Wed, Nov 12, 2025 at 09:03:54AM +1300, David Rowley wrote: > > > /* when enough time has passed, refresh the list to ensure the > > > scores aren't too out-of-date */ > > > if

Re: Trying out read streams in pgvector (an extension)

2025-11-11 Thread Thomas Munro
On Wed, Nov 12, 2025 at 11:52 AM Melanie Plageman wrote: > On Tue, Nov 11, 2025 at 4:22 PM Thomas Munro wrote: > > But for now, to fix pgvector's woes, I wonder if it might make sense > > to call this a bug in v18, and back-patch the tiniest possible change. > > Something like what I posted[2] in

Re: Include extension path on pg_available_extensions

2025-11-11 Thread Rohit Prasad
Hi Matheus, Apologies for the mix up on the names :-) I agree with your responses (please ignore my prior comment about test_extension code; I had missed some of your changes there). I also reviewed v5 of your patch and the changes look good to me. Thanks, -Rohit

Re: Trying out read streams in pgvector (an extension)

2025-11-11 Thread Melanie Plageman
On Tue, Nov 11, 2025 at 4:22 PM Thomas Munro wrote: > > But for now, to fix pgvector's woes, I wonder if it might make sense > to call this a bug in v18, and back-patch the tiniest possible change. > Something like what I posted[2] in this thread almost two years ago. > I don't think it really aff

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-11-11 Thread Manni Wood
On Wed, Oct 29, 2025 at 5:23 PM Andrew Dunstan wrote: > > On 2025-10-22 We 3:24 PM, Nathan Bossart wrote: > > On Wed, Oct 22, 2025 at 03:33:37PM +0300, Nazir Bilal Yavuz wrote: > >> On Tue, 21 Oct 2025 at 21:40, Nathan Bossart > wrote: > >>> I wonder if we could mitigate the regression further b

Re: 2025-11-13 release announcement draft

2025-11-11 Thread Nathan Bossart
On Mon, Nov 10, 2025 at 08:57:32PM -0500, Jonathan S. Katz wrote: > For the point that Nathan nit'd, I just removed it because I couldn't come > up with a pithy way to describe it after reading the release note a bunch of > times. Open to suggestions if we want to include, with revised wording. Ma

Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)

2025-11-11 Thread Boris Mironov
Hello hackers, For some of my specific hardware tests I needed to generate big databases well beyond RAM size. Hence I turned to pgbench tool and its default 2 modes for client- and server-side generation for TPC-B tests. When I use "scale" factor in range of few thousands (eg, 3000 - 5000) dat

Re: obsolete autovacuum comment

2025-11-11 Thread Nathan Bossart
On Wed, Nov 12, 2025 at 09:52:49AM +1300, David Rowley wrote: > I've never been able to make sense of that comment. I tried to dig a > bit yesterday and still couldn't make sense of it in the context of > the commit when it was added. I assume it's talking about > pg_stat_all_tables.autovacuum_cou

Re: Trying out read streams in pgvector (an extension)

2025-11-11 Thread Thomas Munro
On Fri, Sep 6, 2024 at 4:28 PM Thomas Munro wrote: > Here's a new version with a TODO tidied up. I also understood that we > need to tweak the read_stream_reset() function, so that it doesn't > forget its current readhead distance when it hops between HNSW nodes > (which is something that comes u

Re: Asynchronous MergeAppend

2025-11-11 Thread Matheus Alcantara
On Wed Nov 5, 2025 at 3:30 AM -03, Alexander Pyhalov wrote: >> So I'm +1 for the idea. I know it's been while since the last patch, >> and unfortunully it hasn't received reviews since then. Do you still >> plan to work on it? I still need to take a look on the code to see if >> I can help with som

Re: pg_dump not dumping default_text_search_config WAI?

2025-11-11 Thread Philip Warner
I'm not sure where this leaves this idea. I don't want to write the patch to be told its not acceptable for the reasons outlined in this brief discussion, but I am happy to iterate a patch process if the idea is at least viable. The basic idea would be to add: --include-database-config On a

Re: another autovacuum scheduling thread

2025-11-11 Thread Sami Imseih
> > The thing I’m hoping to address is something I’ve seen many times in > > practice. > > Autovacuum workers can get stuck on specific large or slow tables, and when > > that happens, users often end up running manual vacuums on those tables > > just to keep things moving for the smaller/faster v

Re: obsolete autovacuum comment

2025-11-11 Thread David Rowley
On Wed, 12 Nov 2025 at 09:35, Nathan Bossart wrote: > > On Mon, Nov 10, 2025 at 02:03:27PM -0600, Nathan Bossart wrote: > > Any objections to removing this comment? > > If none materialize, I will proceed with removal in a couple of days. I've never been able to make sense of that comment. I trie

Re: another autovacuum scheduling thread

2025-11-11 Thread David Rowley
On Wed, 12 Nov 2025 at 09:25, Sami Imseih wrote: > The thing I’m hoping to address is something I’ve seen many times in practice. > Autovacuum workers can get stuck on specific large or slow tables, and when > that happens, users often end up running manual vacuums on those tables > just to keep t

Re: obsolete autovacuum comment

2025-11-11 Thread Nathan Bossart
On Mon, Nov 10, 2025 at 02:03:27PM -0600, Nathan Bossart wrote: > While working on my autovacuum scheduling patch [0], I noticed the > following comment in relation_needs_vacanalyze(): > > /* > * Note that we don't need to take special consideration for stat > * reset, be

Re: Improve tab completion for various SET/RESET forms

2025-11-11 Thread Dagfinn Ilmari Mannsåker
Shinya Kato writes: > On Wed, Aug 13, 2025 at 5:52 PM Shinya Kato wrote: >> > > I also noticed that ALTER SYSTEM RESET tab completes with all variables, >> > > not just ones that have been set with ALTER SYSTEM. Getting this right >> > > is a bit more complicated, since the only way to distingu

Re: another autovacuum scheduling thread

2025-11-11 Thread David Rowley
On Wed, 12 Nov 2025 at 09:13, Nathan Bossart wrote: > > On Wed, Nov 12, 2025 at 09:03:54AM +1300, David Rowley wrote: > > /* when enough time has passed, refresh the list to ensure the > > scores aren't too out-of-date */ > > if (time is > lastcheck + autovacuum_naptime * ) > > { > >

Re: another autovacuum scheduling thread

2025-11-11 Thread Sami Imseih
> On Sat, 8 Nov 2025 at 08:23, Sami Imseih wrote: > > > I'm confused at why we'd have set up our autovacuum trigger points as > > > they are today because we think those are good times to do a > > > vacuum/analyze, but then prioritise on something completely different. > > > Surely if we think 20%

Re: another autovacuum scheduling thread

2025-11-11 Thread Nathan Bossart
On Tue, Nov 11, 2025 at 02:50:55PM -0500, Robert Treat wrote: > On Tue, Nov 11, 2025 at 2:49 PM Nathan Bossart > wrote: >> On Tue, Nov 11, 2025 at 02:43:19PM -0500, Robert Treat wrote: >> > FWIW, when I have built these types of systems in the past, and when I >> > wanted an aggressive recheck-ty

Re: another autovacuum scheduling thread

2025-11-11 Thread Nathan Bossart
On Wed, Nov 12, 2025 at 09:03:54AM +1300, David Rowley wrote: > I'm still trying to work out what Sami sees in the results that he > doesn't think is good. I resuggested he try coding up the periodic > refresh-the-list code to see if it makes the thing he sees better. I > was hoping that we could g

Re: another autovacuum scheduling thread

2025-11-11 Thread David Rowley
On Wed, 12 Nov 2025 at 05:36, Nathan Bossart wrote: > From skimming the latest discussion, I gather we might want to consider > re-sorting the list periodically. Is the idea that we'll re-sort the > remaining tables in the list, or that we'll basically restart > do_autovacuum()? If it's the latt

Re: another autovacuum scheduling thread

2025-11-11 Thread Robert Treat
On Tue, Nov 11, 2025 at 2:49 PM Nathan Bossart wrote: > On Tue, Nov 11, 2025 at 02:43:19PM -0500, Robert Treat wrote: > > FWIW, when I have built these types of systems in the past, and when I > > wanted an aggressive recheck-type mechanism, the most common methods > > involved tying it to autovac

Re: Improve LWLock tranche name visibility across backends

2025-11-11 Thread Sami Imseih
> Done. LGTM. -- Sami Imseih Amazon Web Services (AWS)

Re: another autovacuum scheduling thread

2025-11-11 Thread Nathan Bossart
On Tue, Nov 11, 2025 at 02:43:19PM -0500, Robert Treat wrote: > FWIW, when I have built these types of systems in the past, and when I > wanted an aggressive recheck-type mechanism, the most common methods > involved tying it to autovacuum_max_workers. Would you mind elaborating on this point? Do

Re: vacuumdb: add --dry-run

2025-11-11 Thread Nathan Bossart
On Mon, Nov 10, 2025 at 05:33:34PM -0500, Corey Huinker wrote: >> My attempts to test this all got stuck in wait_on_slots(). I haven't >> looked too closely, but I suspect the issue is that the socket never >> becomes readable because we don't send a query. If I set free_slot->inUse >> to false b

Re: another autovacuum scheduling thread

2025-11-11 Thread Robert Treat
On Tue, Nov 11, 2025 at 11:36 AM Nathan Bossart wrote: > > Still catching up on the latest discussion, but here's a v8 patch that > amends the DEBUG3 in relation_needs_vacanalyze() to also log the score. I > might attempt to add some sort of brief documentation about autovacuum > prioritization n

Re: Improve LWLock tranche name visibility across backends

2025-11-11 Thread Nathan Bossart
On Mon, Nov 10, 2025 at 05:17:47PM -0600, Sami Imseih wrote: > Maybe we can improve the error message by showing > the "name", like this, In case, there are nested calls. > > ``` > else if (!entry->initialized) > { > ereport(ERROR, > (errmsg("requested DSM segment \"%s\" failed initialization", na

Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-11 Thread Bryan Green
On 11/8/2025 3:40 AM, Michael Paquier wrote: > On Fri, Nov 07, 2025 at 12:32:21PM +0900, Michael Paquier wrote: >> On Fri, Nov 07, 2025 at 03:56:07PM +1300, Thomas Munro wrote: >>> (It's signed per POSIX and on Windows so I assume you meant to write 2GB >>> here.) >> >> Yes, right.. > > So, pleas

Re: Trigger more frequent autovacuums of heavy insert tables

2025-11-11 Thread Nathan Bossart
On Mon, Mar 03, 2025 at 02:47:33PM -0500, Melanie Plageman wrote: > cool, I've changed it to this, pushed, and marked the commitfest entry > as committed. > Thanks so much for your attention and review! I think maintenance.sgml needs an update (specifically, the part about the insert threshold [0]

Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h

2025-11-11 Thread Heikki Linnakangas
On 10/11/2025 19:46, Heikki Linnakangas wrote: Fixed. And I just noticed another thing I forgot: pg_resetwal and pg_controldata. Fixed that. While testing, I noticed that pg_controldata doesn't check PG_CONTROL_VERSION. If you add a field to ControlFileData that changes the length, you'll ge

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

2025-11-11 Thread Dean Rasheed
On Tue, 11 Nov 2025 at 14:10, Florin Irion wrote: > > The change is relevant primarily when there is a single > permissive policy, the most common case. When multiple policies are in place, > the error message remains generic, which is appropriate. I'm not entirely convinced that this is a good i

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-11 Thread Fujii Masao
On Tue, Nov 11, 2025 at 11:49 AM Chao Li wrote: > I just did more tests on both pipeline mode and non-pipeline mode, I think > the main purpose of discardAvailableResults() is to drain results for > pipeline mode. In non-pipeline mode, a NULL res indicates no more result to > read; while in pip

Re: another autovacuum scheduling thread

2025-11-11 Thread Nathan Bossart
Still catching up on the latest discussion, but here's a v8 patch that amends the DEBUG3 in relation_needs_vacanalyze() to also log the score. I might attempt to add some sort of brief documentation about autovacuum prioritization next. >From skimming the latest discussion, I gather we might want

Re: Optimize LISTEN/NOTIFY

2025-11-11 Thread Joel Jacobson
On Sat, Nov 8, 2025, at 16:04, Joel Jacobson wrote: > On Sat, Nov 8, 2025, at 13:59, Joel Jacobson wrote: >> On Fri, Nov 7, 2025, at 19:59, Joel Jacobson wrote: >> This in turn could cause a listening backend to remain behind, if there >> would be no more notifies, so it unfortunately seems like we

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-11 Thread Daniel Gustafsson
> On 10 Nov 2025, at 06:14, Sergey Tatarintsev > wrote: > I'm trying to use pg_getaddrinfo_all() with NULL hints, but got segfault. > According to man(3) getaddrinfo, hints may be passed as NULL. In this case > af_family > is equivalent to AF_UNSPEC. Right, but pg_getaddrinfo_all isn't getaddr

Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement

2025-11-11 Thread Florin Irion
Hello, Cirrus-CI was complaining because we don't sort the constraints and thus they were making the test fail because of the random order. Made it sort with `list_sort`and `list_oid_cmp`not sure if that's the best thing to sort them. Check v4 attached. Cheers, Florin Irion Tim Waizenegger EDB (E

Re: Issue with logical replication slot during switchover

2025-11-11 Thread Fabrice Chapuis
Hi Amit, if I resume your scenario 1. A standby S has a failover slot slot1 synchronized with slot1 on primary P 2. We promote S 3. On P we drop slot1 and create slot1 again with failover mode (a subscriber exist on another instance by example) 4. A rewind is performed on P the former primary to r

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-11 Thread Vaibhav Dalvi
Hi Alvaro, I've realized this, I think stripping those values out of the String > wrapping > is the wrong direction to go in, because it leads to more contortions > rather than less. I also agree with you. I couldn't explain it well so I thought of doing the changes. Please find the attached p

Re: Document NULL

2025-11-11 Thread Álvaro Herrera
On 2025-Jun-18, David G. Johnston wrote: > Version 8. > > Marking this Ready to Commit in CF 2025-09 (CF PG19-1) I have rebased this; here's v9. I haven't reviewed it in depth, but intend to give it a read and get it pushed sometime in the not-too-distant future, so if anybody wants to review i

Patch: dumping tables data in multiple chunks in pg_dump

2025-11-11 Thread Hannu Krosing
Attached is a patch that adds the ability to dump table data in multiple chunks. Looking for feedback at this point: 1) what have I missed 2) should I implement something to avoid single-page chunks The flag --huge-table-chunk-pages which tells the directory format dump to dump tables where the

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-11 Thread Fujii Masao
On Tue, Nov 11, 2025 at 11:41 AM Chao Li wrote: > I am also debugging the patch for the other purpose when I saw your email, so > I tried to reproduce the problem with your script. > > I think in master branch, we can simply fix the problem by calling > discardAvailableResults(st) before discard

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-11 Thread Fujii Masao
On Tue, Nov 11, 2025 at 10:50 AM Yugo Nagata wrote: > I've attached a patch to fix this. Thanks for reporting the issue and providing the patch! > If a PGRES_PIPELINE_SYNC is followed by something other than > PGRES_PIPELINE_SYNC or NULL, > it means that another PGRES_PIPELINE_SYNC will eventua

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

2025-11-11 Thread Álvaro Herrera
On 2025-Nov-10, Nishant Sharma wrote: > PFA, v10 patch set. I propose the following changes for 0001, in patch hunk ordering. 1. pg_tablespace_location was introduced in 2011 (commit 16d8e594acd9), so claim copyright starting at that point. 2. readlink(2) claims, at least in my system, to need

Re: Extended Statistics set/restore/clear functions.

2025-11-11 Thread jian he
On Tue, Nov 11, 2025 at 4:07 PM Michael Paquier wrote: > I've rebased the full set using the new structure. 0001~0004 are > clean. 0005~ need more work and analysis, but that's a start. hi. diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index 106583fb2965..e0e9f0468cb8 10064

Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

2025-11-11 Thread Sugamoto Shinya
Thanks everyone for checking my proposal. Other than how to make the hint string, every comment looks good to me. I'll take those into my patch. I appreciate it. Given the comments you all made, I looked into the source code to see how we build `errhint` with values, and found the following. //

Re: Non-text mode for pg_dumpall

2025-11-11 Thread Andrew Dunstan
On 2025-11-11 Tu 12:59 AM, Mahendra Singh Thalor wrote: Hi, Here, I am attaching an updated patch for the review and testing. FIX: as suggested by Vaibhav, added error for --restrict-key option with non-text format. Regarding the name and format of the globals toc file, I'm inclined to t

Re: CURL_IGNORE_DEPRECATION

2025-11-11 Thread Tom Lane
Daniel Gustafsson writes: >> On 11 Nov 2025, at 12:41, Álvaro Herrera wrote: >> Given that we use that macro in a single place, >> what do you think about removing that and making a more surgical >> intervention to fix pgindent problem with it? I propose the attached. > This proposal is a bette

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

2025-11-11 Thread Florin Irion
Hi Jian, I reviewed your patch. The change is relevant primarily when there is a single permissive policy, the most common case. When multiple policies are in place, the error message remains generic, which is appropriate. All test updates confirm that the enhancement performs correctly across var

Re: CURL_IGNORE_DEPRECATION

2025-11-11 Thread Daniel Gustafsson
> On 11 Nov 2025, at 12:41, Álvaro Herrera wrote: > Given that we use that macro in a single place, > what do you think about removing that and making a more surgical > intervention to fix pgindent problem with it? I propose the attached. This proposal is a better solution than what was committ

Re: [PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm)

2025-11-11 Thread Peter Eisentraut
On 11.11.25 06:11, kenji uno wrote: I'm going to build psqlODBC (Arm64X binaries) for use with Windows 11 on Arm. The problem is that the `msvc_gendef.pl ` generates the wrong `postgres.def` for aarch64 (Windows). Currently, for aarch64, the preceding underscore is rem

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-11 Thread Robert Haas
On Mon, Nov 10, 2025 at 6:31 PM Michael Paquier wrote: > All the other solutions mentioned mean to work around the issue of the > unnamed portal still being present by maintaining the query string it > in a different context across multiple messages. And I doubt that > anybody would be thrilled b

Re: CURL_IGNORE_DEPRECATION

2025-11-11 Thread Andrew Dunstan
On 2025-11-11 Tu 6:41 AM, Álvaro Herrera wrote: Hackers, I just noticed that we have some ad-hoc hacks for the CURL_IGNORE_DEPRECATION macro in the pgindent Perl script, which I find a bit uncomfortable. Given that we use that macro in a single place, what do you think about removing that and

Re: Include extension path on pg_available_extensions

2025-11-11 Thread Matheus Alcantara
On Mon Nov 10, 2025 at 11:06 PM -03, Rohit Prasad wrote: > Hi Michael, > I think you wanted to say Matheus :) > I am just getting started in the Postgres community (this is my first > code review). So please excuse me if I have missed something (in terms > of process etc). > Thank you for reviewin

Re: Improve logical replication usability when tables lack primary keys

2025-11-11 Thread Chao Li
Hi Amit, Thanks for asking. > On Nov 11, 2025, at 19:18, Amit Kapila wrote: > > On Mon, Nov 10, 2025 at 1:36 PM Chao Li wrote: >> >> * BACKGROUND >> >> This requirement comes from several users operating large deployments, >> particularly in HIS (Hospital Information Systems). The situation

Re: gen_guc_tables.pl: Validate required GUC fields before code generation

2025-11-11 Thread Álvaro Herrera
On 2025-Nov-10, Chao Li wrote: > While working on the other patch and editing guc_parameters.dat, I > mistakenly deleted a “max” value line, then I got the following error > during build: > The error message is unclear and is not helpful to identify the real issue. Funny -- I made a very similar

Re: Spacing of options in getopt_long processing

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

Re: [PATCH} Move instrumentation structs

2025-11-11 Thread Álvaro Herrera
On 2025-Nov-11, Chao Li wrote: > I quickly went through this patch and got a big concern. From what I > have learned, “executor" depends on “access”. To prove that, I quickly > browse through a bunch of files under executor and access, which > showed me that files under executor can include access

Re: Improve logical replication usability when tables lack primary keys

2025-11-11 Thread Euler Taveira
On Mon, Nov 10, 2025, at 5:06 AM, Chao Li wrote: > I evaluated a few approaches and am proposing the following: > > - Introduce a new GUC: `logical_replication_fallback_to_full_identity`. > - When enabled, if a table being logically replicated has no primary > key, the system automatically uses `R

Re: [WiP] B-tree page merge during vacuum to reduce index bloat

2025-11-11 Thread Matthias van de Meent
On Sun, 31 Aug 2025 at 14:15, Andrey Borodin wrote: > > On 29 Aug 2025, at 13:39, Andrey Borodin wrote: > > > > I think to establish baseline for locking correctness we are going to start > > from writing index scan tests, that fail with proposed merge patch and pass > > on current HEAD. I want

  1   2   >