Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

2025-09-02 Thread Jim Jones
Hi Andrew On 28.08.25 11:29, Andrei Klychkov wrote: > I'm submitting a patch to fix a bug where ALTER SYSTEM SET with empty > strings for > GUC_LIST_QUOTE parameters (like shared_preload_libraries) results in > malformed > configuration entries that cause server crashes on restart. I tested the p

Re: SQL:2023 JSON simplified accessor support

2025-09-02 Thread Chao Li
> On Sep 2, 2025, at 11:53, David G. Johnston > wrote: > > On Monday, September 1, 2025, Chao Li > wrote: >> >> The last comment is about error message: >> >> ``` >> evantest=# select data.a from test_jsonb_types; >> ERROR: missing FROM-clause entry for table

Re: Refactoring: Use soft error reporting for *_opt_error functions

2025-09-02 Thread Amul Sul
On Tue, Sep 2, 2025 at 12:59 PM Michael Paquier wrote: > > On Tue, Sep 02, 2025 at 12:40:25PM +0530, Amul Sul wrote: > > Just a quick question regarding the naming conventions. It looks like > > we have a choice between two options for consistency. Should we rename > > the pg_lsn_in_internal funct

Re: Get rid of pgstat_count_backend_io_op*() functions

2025-09-02 Thread Bertrand Drouvot
Hi, On Tue, Sep 02, 2025 at 08:19:22AM +0900, Michael Paquier wrote: > On Mon, Sep 01, 2025 at 02:07:27PM +, Bertrand Drouvot wrote: > > Instead, it now copies the IO pending stats to the backend IO pending stats > > when > > the pending IO stats are flushed. This behaves the same way as for

RE: Avoid retaining conflict-related data when no tables are subscribed

2025-09-02 Thread Zhijie Hou (Fujitsu)
On Friday, August 29, 2025 12:05 PM Amit Kapila wrote: > > On Thu, Aug 28, 2025 at 7:54 AM Zhijie Hou (Fujitsu) > wrote: > > > > Hi, > > > > My colleague Nisha reported an issue to me off-list: dead tuples can't > > be removed when retain_dead_tuples is enabled for a subscription with no > table

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-02 Thread Julien Rouhaud
On Tue, Sep 02, 2025 at 09:37:31AM +0200, Jelte Fennema-Nio wrote: > On Tue, 2 Sept 2025 at 02:03, Julien Rouhaud wrote: > > One not too uncommon scenario is an extension in a dedicated schema that > > creates additional objects dynamically, for instance creating new > > partitions using trigger

Re: Pathify RHS unique-ification for semijoin planning

2025-09-02 Thread Andrei Lepikhov
On 2/9/2025 12:10, Richard Guo wrote: So this specific case runs about 3.7 times faster, which is really nice.No questions, it is good enough optimisation. I'm worried only about implementation: It creates one more RelOptInfo that may look like a baserel, but we can't find it by find_base_rel o

Re: Refactoring: Use soft error reporting for *_opt_error functions

2025-09-02 Thread Michael Paquier
On Tue, Sep 02, 2025 at 12:40:25PM +0530, Amul Sul wrote: > Just a quick question regarding the naming conventions. It looks like > we have a choice between two options for consistency. Should we rename > the pg_lsn_in_internal function by replacing "_internal" with "_safe", > or should we rename a

Re: Pathify RHS unique-ification for semijoin planning

2025-09-02 Thread Richard Guo
On Wed, Jul 23, 2025 at 5:11 PM Álvaro Herrera wrote: > As a very trivial test on this patch, I ran the query in your opening > email, both with and without the patch, scaling up the size of the table > a little bit. > This is a really nice improvement. I think we could find queries that > are a

Avoid use of uninitialized variable (src/pl/plperl/plperl.c)

2025-09-02 Thread Ranier Vilela
Hi. In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and *MYMALLOC* is not, is possible use of variable *perl_sys_init_done* uninitialized. To fix, explicitly initialize the variable. In pass change type to bool, what was the initial intention. trivial patch attached. best regards, Ra

Re: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)

2025-09-02 Thread Andres Freund
Hi, On 2025-09-02 14:39:44 -0300, Ranier Vilela wrote: > In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and > *MYMALLOC* is not, is possible use of variable > *perl_sys_init_done* uninitialized. Static variables are zero initialized by definition, no? Greetings, Andres Freund

Re: Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h)

2025-09-02 Thread Jacob Champion
On Tue, Sep 2, 2025 at 12:44 PM Tom Lane wrote: > We might be able to s/pqbool/bool/ in the struct, but I kind of > wonder if that wouldn't be an ABI break: at the very least it > would lead to subtle changes in code compiled to use the struct. I have FUD around C++ compilers in particular when i

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-09-02 Thread Ilia Evdokimov
On 04.06.2025 13:40, Alena Rybakina wrote: Do you have any ideas on how to solve this problem? So far, the only approach I see is to try an alternative plan but I'm still learning this. Hi, I've reviewed this patch, and I have suggestion about the approach. Currently, the patch extends '

Re: Get rid of pgstat_count_backend_io_op*() functions

2025-09-02 Thread Andres Freund
Hi, On 2025-09-02 08:19:22 +0900, Michael Paquier wrote: > On Mon, Sep 01, 2025 at 02:07:27PM +, Bertrand Drouvot wrote: > > Instead, it now copies the IO pending stats to the backend IO pending stats > > when > > the pending IO stats are flushed. This behaves the same way as for some > > re

Re: pgsql: Preserve conflict-relevant data during logical replication.

2025-09-02 Thread Robert Haas
On Wed, Jul 23, 2025 at 11:44 PM Amit Kapila wrote: > The fix looks good to me. I'll push your patch in sometime. The tests in this patch are insufficient to prove that this logic works properly. I tried with this patch: diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/tra

Re: Fix use of variable after pfree

2025-09-02 Thread Daniel Gustafsson
> On 2 Sep 2025, at 09:42, Amit Kapila wrote: > On Tue, Sep 2, 2025 at 1:02 PM Shlok Kyal wrote: >> While going through the code of the slot sync worker, I found that in >> functions ReplSlotSyncWorkerMain and pg_sync_replication_slots the >> variable app_name.data is being used after it is free

Fix use of variable after pfree

2025-09-02 Thread Shlok Kyal
Hi, While going through the code of the slot sync worker, I found that in functions ReplSlotSyncWorkerMain and pg_sync_replication_slots the variable app_name.data is being used after it is freed. We can get logs as following: 2025-09-02 12:26:48.520 IST [3908359] ERROR: synchronization worker "

Re: Increase OpenBSD CI task's RAM disk size

2025-09-02 Thread Daniel Gustafsson
> On 15 Aug 2025, at 12:20, Nazir Bilal Yavuz wrote: > On Fri, 15 Aug 2025 at 12:19, Daniel Gustafsson wrote: >> >>> On 15 Aug 2025, at 10:46, Nazir Bilal Yavuz wrote: >>> Sometimes OpenBSD CI tasks fail with 'No space left on device' [1]. >>> It's due to the OpenBSD CI task's RAM disk size be

Re: Resetting recovery target parameters in pg_createsubscriber

2025-09-02 Thread Alyona Vinter
Dear Michael and Hayato, Thank you both for your valuable feedback on the previous patch version. I've reworked the patch based on your suggestions - the new version should address the concerns about ALTER SYSTEM and follows the same patterns as the 'setup_recovery' code. I kept primary_conninfo

Use bool with synced field (src/include/replication/slot.h)

2025-09-02 Thread Ranier Vilela
Hi. IMO in the struct ReplicationSlotPersistentData, the field *synced* has wrong type declaration. The intention was *bool* not *char* type. Since it is only used in Boolean comparison. trivial patch attached. best regards, Ranier Vilela v1-001-use-bool-for-synced-field-slot.patch Descriptio

Re: Serverside SNI support in libpq

2025-09-02 Thread Daniel Gustafsson
> On 1 Sep 2025, at 03:58, Michael Paquier wrote: > > On Wed, Aug 27, 2025 at 09:49:34PM +0200, Daniel Gustafsson wrote: >> When looking into why the SNI tests failed on Windows I think I found a >> pre-existing issue that we didn't have tests for, which my patch added tests >> for and thus broke

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-09-02 Thread Alena Rybakina
Hi! Thank you for your attention to this patch! On 03.09.2025 00:07, Ilia Evdokimov wrote: On 04.06.2025 13:40, Alena Rybakina wrote: Do you have any ideas on how to solve this problem? So far, the only approach I see is to try an alternative plan but I'm still learning this. Hi, I've rev

Re: Use bool with synced field (src/include/replication/slot.h)

2025-09-02 Thread Nathan Bossart
Committed. -- nathan

Re: COPY TO: provide hint when WHERE clause is used

2025-09-02 Thread Fujii Masao
On Mon, Sep 1, 2025 at 7:12 PM Jim Jones wrote: > > > > On 01.09.25 11:09, Fujii Masao wrote: > > The patch looks good to me. Barring any objections, I'm thinking to > > commit the patch. > > LGTM. I've pushed the patch. Thanks! Regards, -- Fujii Masao

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-09-02 Thread Melanie Plageman
On Thu, Aug 28, 2025 at 5:12 AM Kirill Reshke wrote: > > I did micro git-blame research here. I spotted only one related change > [0]. Looks like before this change pin was indeed needed. > But not after this change, so this visibilitymap_pin is just an oversight? > Related thread is [1]. I quickl

Re: Use bool with synced field (src/include/replication/slot.h)

2025-09-02 Thread Ranier Vilela
Em ter., 2 de set. de 2025 às 18:57, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Tue, Sep 02, 2025 at 04:54:59PM -0500, Nathan Bossart wrote: > > Committed. > > Gah, the commit message lists your name under the Discussion tag, and I > missed adding the link to the archives. Please f

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Fujii Masao
On Tue, Sep 2, 2025 at 5:42 PM Chao Li wrote: > > Hi Hackers, > > I noticed a problem with pg_waldump. When "-e" is not specified, or given a > bigger number beyond the current LSN, pg_dump always print an error message > like: > > ``` > chaol@ChaodeMacBook-Air cndb % pg_waldump -p pg_wal -s 0/2

Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

2025-09-02 Thread Andres Freund
Hi, On 2025-09-02 19:11:01 -0400, Melanie Plageman wrote: > From dd98177294011ee93cac122405516abd89f4e393 Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Wed, 27 Aug 2025 08:50:15 -0400 > Subject: [PATCH v8 01/22] Remove unneeded VM pin from VM replay LGTM. > From 7c5cb3edf89735eaa8b

Re: Get rid of pgstat_count_backend_io_op*() functions

2025-09-02 Thread Bertrand Drouvot
Hi, On Tue, Sep 02, 2025 at 07:41:59AM +, Bertrand Drouvot wrote: > On Tue, Sep 02, 2025 at 08:19:22AM +0900, Michael Paquier wrote: > > Removing both the function calls and the extra counter incrementations > > means to do the same thing as the WAL stats, where we have one > > structure in ch

Re: psql client does not handle WSAEWOULDBLOCK on Windows

2025-09-02 Thread Tom Lane
Michael Paquier writes: > This is going to require some platform-specific check that I don't > have with me, though I am ready to accept that what you are telling > here is true and that we should apply this macro. Could somebody > check that a bit more in depth? Andrew D. perhaps? > One thing

Re: Improve LWLock tranche name visibility across backends

2025-09-02 Thread Nathan Bossart
On Mon, Sep 01, 2025 at 10:18:46AM +, Bertrand Drouvot wrote: > Changes look good. Thanks for looking. > Not directly related, but I think that we can get rid of: > > size = add_size(size, LWLOCK_PADDED_SIZE); > > in LWLockShmemSize() and of: > > ptr += LWLOCK_PADDED_SIZE - ((uintptr_t) pt

Re: Improve LWLock tranche name visibility across backends

2025-09-02 Thread Nathan Bossart
On Mon, Sep 01, 2025 at 06:35:55PM +0530, Rahila Syed wrote: > Please see below for some comments regarding v20 patch. Thanks for looking. > 1. Following unused declaration is present in the lwlock.h file. > > extern void LWLockRegisterTranche(int tranche_id, const char *tranche_name); Whoops,

Re: Use bool with synced field (src/include/replication/slot.h)

2025-09-02 Thread Nathan Bossart
On Tue, Sep 02, 2025 at 09:47:49AM -0300, Ranier Vilela wrote: > IMO in the struct ReplicationSlotPersistentData, the field *synced* has > wrong type declaration. The intention was *bool* not *char* type. > > Since it is only used in Boolean comparison. LGTM. In the original thread, it looks lik

Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible

2025-09-02 Thread Nathan Bossart
On Mon, Sep 01, 2025 at 03:19:46PM +0900, Michael Paquier wrote: > I highly doubt that there are a lot of comments assigned to LOs, so > these numbers are pretty cool IMO. Security labels are a pain to test > in the upgrade path, or test_dummy_label could be extended with a new > TAP test and a pg

Re: aio/README.md comments

2025-09-02 Thread Jeff Davis
On Sat, 2025-08-30 at 12:20 -0400, Andres Freund wrote: > There might be some regressions that make io_method=sync beneficial, > but short > to medium term, the goal ought to be to make all non-ridiculous > configurations > (I don't care about AIO performing well with s_b=16) to not regress > meani

Re: Conflict detection for update_deleted in logical replication

2025-09-02 Thread shveta malik
On Mon, Sep 1, 2025 at 5:45 PM shveta malik wrote: > > > > > Here is V70 patch set. > > > > The patch v70-0001 looks good to me. Verified, all the old issues are > resolved. > > Will resume review of v70-0002 now. > Please find a few comments on v70-0002: 1) - * Note: Retention won't be resumed

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

2025-09-02 Thread Yura Sokolov
29.08.2025 01:31, Matheus Alcantara пишет: > On Thu Aug 21, 2025 at 8:14 PM -03, Matheus Alcantara wrote: >> I'll work on this considering the initial Daniil comments at [1] >> >> [1] >> https://www.postgresql.org/message-id/CAJDiXgg1ArRB1-6wLtXfVVnQ38P9Y%2BCDfEc9M2TXiOf_4kfBMg%40mail.gmail.com >>

Re: Fix use of variable after pfree

2025-09-02 Thread Amit Kapila
On Tue, Sep 2, 2025 at 1:02 PM Shlok Kyal wrote: > > Hi, > > While going through the code of the slot sync worker, I found that in > functions ReplSlotSyncWorkerMain and pg_sync_replication_slots the > variable app_name.data is being used after it is freed. > > We can get logs as following: > 2025

Concurrency Issue with pg_ctl causing processes to hang in PostgreSQL 15.12

2025-09-02 Thread Srirama Kucherlapati
Hi all, We are encountering a concurrency issue with pg_ctl in PostgreSQL 15.12, two separate processes are invoking pg_ctl simultaneously on different databases directories: - One process is attempting to stop a database. - Another process is concurrently executing pg_ctl status to check th

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

2025-09-02 Thread Amit Kapila
On Fri, Aug 29, 2025 at 9:38 AM Masahiko Sawada wrote: > > I've attached the updated patch. > Few comments: = 1. + * When XLogLogicalInfoActive() is true, guarantee that a subtransaction's + * xid can only be seen in the WAL stream if its toplevel xid has been + * logged before. If ne

Re: Add support for specifying tables in pg_createsubscriber.

2025-09-02 Thread Shubham Khanna
On Mon, Aug 25, 2025 at 12:53 PM Zhijie Hou (Fujitsu) wrote: > > On Monday, August 25, 2025 8:08 AM Peter Smith wrote: > > > > IIUC, the only purpose of the proposed '--table' spec is to allow some > > users the > > ability to tweak the default "CREATE PUBLICATION p FOR ALL TABLES;" that > > the

Re: Update outdated references to SLRU ControlLock

2025-09-02 Thread Michael Paquier
On Mon, Sep 01, 2025 at 01:19:41PM +0800, Julien Rouhaud wrote: > I don't really have a preference. Bank lock is shorter but may be a bit more > obscure, especially outside slru.c, so using "SLRU bank lock" could be better > indeed. Okay, I have used "SLRU bank lock" and backpatched that down to

Re: Improve error message for duplicate labels in enum types

2025-09-02 Thread Tom Lane
Jim Jones writes: > LGTM; I'll mark the CF entry as Ready for Committer. Pushed with some trivial cosmetic adjustments, including the perhaps-not-so-trivial fix of removing the comment you falsified. I was concerned about Rahila's upthread worry about the performance of this approach, but in som

Re: Raw parse tree is not dumped to log

2025-09-02 Thread Tatsuo Ishii
> The individual runs have quite a bit of variation. It's a known behavior of pgbench. > It's good to cross check results against known facts. If my napkin > math is right, a ~1% speedup for ~60ktps/s amounts to saving ~160ns > per query. It's not plausible that forcing the compiler's hand for >

Re: SQL:2023 JSON simplified accessor support

2025-09-02 Thread Alexandra Wang
Hi Chao, Continue from my previous email. On Mon, Sep 1, 2025 at 8:32 PM Chao Li wrote: > > > On Sep 2, 2025, at 10:59, Chao Li wrote: > > jsonbsubs doesn’t need to check is_slice flag as well, I will explain that > in my next email tougher with my new comments. > > > > Now jsonb_check_json_ne

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Michael Paquier
On Wed, Sep 03, 2025 at 09:11:15AM +0900, Fujii Masao wrote: > Can pg_waldump really distinguish between the end of WAL and corruption? I don't think you can really do that reliably, as some of the messages marking the end of WAL could also be bumped into upon a corruption, as far as I recall. We

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

2025-09-02 Thread Hayato Kuroda (Fujitsu)
Dear Sawada-san, Here are my comments. 01. ``` checkPoint.logicalDecodingEnabled = IsLogicalDecodingEnabled(); ``` Per my analysis, the value is always false here because StartupLogicalDecodingStatus is not called yet. Can we use "false" directly? 02. ``` elog(DEBUG1, "waiting for %d t

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Chao Li
Hi Fujii and Michael, Thanks for your comments. > On Sep 3, 2025, at 10:47, Michael Paquier wrote: > > On Wed, Sep 03, 2025 at 09:11:15AM +0900, Fujii Masao wrote: >> Can pg_waldump really distinguish between the end of WAL and corruption? > > I don't think you can really do that reliably, as

Re: Disabling memory overcommit deemed dangerous

2025-09-02 Thread Tom Lane
David Geier writes: > In our documentation we recommend disabling memory overcommit to prevent > the OOM killer from kicking in, see [1]. Accordingly, we expect > PostgreSQL to handle OOM situations gracefully. In my experience there > are unfortunately several severe problems with that approach:

Re: VM corruption on standby

2025-09-02 Thread Andrey Borodin
> On 3 Sep 2025, at 11:37, Alexander Korotkov wrote: > > Could you, please, recheck? That patch also adds CondVar sleep in critical section. That patch is how we understood that such sleep is dangerous. Actual patch to deteact a problem is much simpler: ``` diff --git a/src/backend/storage/

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-02 Thread Robert Haas
On Tue, Sep 2, 2025 at 5:02 AM Julien Rouhaud wrote: > Requiring superuser permission seems like a big penalty, especially since the > last few years have been all about *not* requiring superuser privileges. Note > also that not all extensions embeds compiled code, some are just doing plain > plp

Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Chao Li
Hi Hackers, I noticed a problem with pg_waldump. When "-e" is not specified, or given a bigger number beyond the current LSN, pg_dump always print an error message like: ``` chaol@ChaodeMacBook-Air cndb % pg_waldump -p pg_wal -s 0/2980DE10 -e 0/2980E680 <...omit some outputs...> rmgr: Standby

Re: SQL:2023 JSON simplified accessor support

2025-09-02 Thread Chao Li
> On Aug 29, 2025, at 15:22, Chao Li wrote: > > +static bool > +jsonb_check_jsonpath_needed(List *indirection) > +{ > + ListCell *lc; > + > + foreach(lc, indirection) > + { > + Node *accessor = lfirst(lc); > + > + if (IsA(accessor, String))

Re: Correction of RowMark Removal During Sel-Join Elimination

2025-09-02 Thread Andrei Lepikhov
On 31/8/2025 03:03, Richard Guo wrote: On Sun, Aug 31, 2025 at 9:50 AM Alexander Korotkov wrote: On Sun, Aug 31, 2025 at 2:51 AM Richard Guo wrote: I think it's better to push this patch sooner rather than later, as multiple people have encountered the issue in different ways. I'll go ahead

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

2025-09-02 Thread shveta malik
Few trivial comments for doc:

Re: Get rid of pgstat_count_backend_io_op*() functions

2025-09-02 Thread Michael Paquier
On Mon, Sep 01, 2025 at 02:07:27PM +, Bertrand Drouvot wrote: > Instead, it now copies the IO pending stats to the backend IO pending stats > when > the pending IO stats are flushed. This behaves the same way as for some > relation > and database stats (see pgstat_relation_flush_cb()). > > I

Re: SQL:2023 JSON simplified accessor support

2025-09-02 Thread Chao Li
Hi Alex, Thanks for addressing my comments. I have a few follow up comments: > On Sep 3, 2025, at 10:16, Alexandra Wang wrote: > > > > I don't like the idea of removing the "bool isSlice" argument from the > *SubscriptTransform() function pointer. This patch series should make > only minimal

Re: Add support for specifying tables in pg_createsubscriber.

2025-09-02 Thread Peter Smith
Hi Shubham, My first impression of patch v4-0001 was that the new design is adding unnecessary complexity by introducing a new --existing-publication option, instead of just allowing reinterpretation of the --publication by allowing it to name/reuse an existing publication. e.g. Q. What if there

Re: Conflict detection for update_deleted in logical replication

2025-09-02 Thread shveta malik
On Tue, Sep 2, 2025 at 3:30 PM shveta malik wrote: > > > > > > > > > Here is V70 patch set. > > > > > Please find a few comments on v70-003: 1) Doc of dead_tuple_retention_active says: True if retain_dead_tuples is enabled and the retention duration for information used in conflict detection is

Re: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)

2025-09-02 Thread Ranier Vilela
Em ter., 2 de set. de 2025 às 14:42, Andres Freund escreveu: > Hi, > > On 2025-09-02 14:39:44 -0300, Ranier Vilela wrote: > > In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and > > *MYMALLOC* is not, is possible use of variable > > *perl_sys_init_done* uninitialized. > > Static variab

Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h)

2025-09-02 Thread Ranier Vilela
Hi. In libpq-fe.h has an artifact pre C99, pqbool. IMO this is not more necessary, once Postgres supports C99 and bool becomes standard. So get ride of pqbool and use bool instead. trivial patch attached. best regards, Ranier Vilela v1-001-get-ride-pqbool-libpq-fe.patch Description: Binary da

Re: Update outdated references to SLRU ControlLock

2025-09-02 Thread Julien Rouhaud
On Wed, Sep 03, 2025 at 10:21:54AM +0900, Michael Paquier wrote: > On Mon, Sep 01, 2025 at 01:19:41PM +0800, Julien Rouhaud wrote: > > I don't really have a preference. Bank lock is shorter but may be a bit > > more > > obscure, especially outside slru.c, so using "SLRU bank lock" could be > > b

Re: Timeline switching with partial WAL records can break replica recovery

2025-09-02 Thread Alyona Vinter
On Wed, 3 Sept 2025 at 12:37, Alyona Vinter wrote: > I've found an error in my previous patch and have attached a fixed version. > Sorry, I've sent the wrong patches again. Here the correct ones From c947c47c95c625520f2eef2183e1f42594bf0c83 Mon Sep 17 00:00:00 2001 From: Alena Vinter Date: Mon,

Re: Use bool with synced field (src/include/replication/slot.h)

2025-09-02 Thread Nathan Bossart
On Tue, Sep 02, 2025 at 11:02:37AM -0500, Nathan Bossart wrote: > LGTM. In the original thread, it looks like this was added in v32 [0] and > effectively switched to a bool in v58 [1]. I was worried that we might need to bump SLOT_VERSION for this, but I see that as of v18 [0], we require sizeof(

Re: CREATE SCHEMA ... CREATE DOMAIN support

2025-09-02 Thread Tom Lane
jian he writes: > Please check the latest attached. > v7-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-SCHEMA.patch > v7-0002-CREATE-SCHEMA-CREATE-DOMAIN.patch > v7-0003-CREATE-SCHEMA-CREATE-COLLATION.patch > v7-0004-CREATE-SCHEMA-CREATE-TYPE.patch I think this is still kind of blocked, be

Solaris compiler status

2025-09-02 Thread Peter Eisentraut
I've been trying out the Solaris compiler (Oracle Developer Studio 12.6, on Solaris), mainly to test out some C11 support details. Observations: - That compiler has a certain known idiosyncratic way of dealing with some inline functions, which lead to commits such as 3e9ca526012 and discussio

Re: Get rid of pgstat_count_backend_io_op*() functions

2025-09-02 Thread Michael Paquier
On Tue, Sep 02, 2025 at 12:42:54PM -0400, Andres Freund wrote: > On 2025-09-02 08:19:22 +0900, Michael Paquier wrote: >> On Mon, Sep 01, 2025 at 02:07:27PM +, Bertrand Drouvot wrote: >>> Instead, it now copies the IO pending stats to the backend IO pending stats >>> when >>> the pending IO sta

Re: Timeline switching with partial WAL records can break replica recovery

2025-09-02 Thread Alyona Vinter
Hi hackers, I've found an error in my previous patch and have attached a fixed version. I'd also like to clarify the timeline switching bug scenario that this patch fixes: The issue occurs in this cluster configuration: [ master ] → [ cascade replica ] → [ replica ] When the master is lost and t

Re: Orphan page in _bt_split

2025-09-02 Thread Konstantin Knizhnik
On 02/09/2025 7:42 AM, Michael Paquier wrote: On Mon, Sep 01, 2025 at 02:35:56PM -0400, Peter Geoghegan wrote: I remember that when I worked on what became commit 9b42e71376 back in 2019 (which fixed a similar problem caused by the INCLUDE index patch), Tom suggested that we do things this way

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

2025-09-02 Thread Ajin Cherian
On Fri, Aug 29, 2025 at 3:01 PM shveta malik wrote: > > On Tue, Aug 26, 2025 at 9:58 AM Ajin Cherian wrote: > > Thank You for the patches. Please find a few comments. > > 1) > Change not needed: > > * without waiting for SLOTSYNC_RESTART_INTERVAL_SEC. > + * > */ > Removed. > 2) > Regarding

Re: Orphan page in _bt_split

2025-09-02 Thread Konstantin Knizhnik
On 01/09/2025 10:18 PM, Peter Geoghegan wrote: On Mon, Sep 1, 2025 at 3:04 PM Peter Geoghegan wrote: There's just no reason to think that we'd ever be able to tie back one of these LOG messages from VACUUM to the problem within _bt_split. There's too many other forms of corruption that might

Re: VM corruption on standby

2025-09-02 Thread Alexander Korotkov
On Tue, Aug 12, 2025 at 8:38 AM Kirill Reshke wrote: > On Wed, 6 Aug 2025 at 20:00, Andrey Borodin wrote: > > > > Hi hackers! > > > > I was reviewing the patch about removing xl_heap_visible and found the VM\WAL machinery very interesting. > > At Yandex we had several incidents with corrupted VM

Should io_method=worker remain the default?

2025-09-02 Thread Jeff Davis
Has there already been a discussion about leaving the default as io_method=worker? There was an Open Item for this, which was closed as "Won't Fix", but the links don't explain why as far as I can see. I tested a concurrent scan-heavy workload (see below) where the data fits in memory, and "work