Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations

2025-12-01 Thread Robert Haas
On Mon, Dec 1, 2025 at 10:29 AM Nathan Bossart wrote: > > 4. Since, with this change, the size column will show memory allocation > > regardless of whether it is currently mapped in the local process, I > > think it would be helpful to add a boolean column to display the mapped > > status as a fut

Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations

2025-12-01 Thread Nathan Bossart
On Thu, Nov 27, 2025 at 01:51:39PM +0530, Rahila Syed wrote: > Thank you for this improvement. I think it will be very helpful to have > the ability to report dsa and dshash memory sizes. Thanks for reviewing! > 1. As a result of this change, the following comment in > pg_get_dsm_registry_allocat

Re: IPC/MultixactCreation on the Standby server

2025-12-01 Thread Andrey Borodin
> On 1 Dec 2025, at 17:40, Heikki Linnakangas wrote: > > All of those conflicts were pretty straightforward to handle, but it's > enough code churn for silly mistakes to slip in, especially when the TAP > test didn't apply. So if you have a chance, please help to review and > test each of t

Re: Safer hash table initialization macro

2025-12-01 Thread Jelte Fennema-Nio
On Mon, 1 Dec 2025 at 14:45, Bertrand Drouvot wrote: > Thoughts? I think the hashtable creation API in postgres is so terrible that it actively discourages usage. At Citus we definitely had the problem that we would use Lists for cases where a hashtable was preferable perf wise, just because the

Re: Remove unused fields from BufferCacheNumaRec

2025-12-01 Thread Bertrand Drouvot
Hi, Thanks for having looked at it! On Sun, Nov 23, 2025 at 12:27:08PM +0800, Chao Li wrote: > > As long as compile passes, that proves the removal of the unused fields is > safe. Most of the time, but not always, see [1]. [1]: https://www.postgresql.org/message-id/aS2b3LoUypW1/Gdz%40ip-10-9

Re: [PATCH] Better Performance for PostgreSQL with large INSERTs

2025-12-01 Thread Philipp Marek
Hi Filip, I am also proposing the introduction of a new GUC variable for setting PQ_RECV_BUFFER_SIZE in the first patch. thanks a lot; this allows configuration for all connections to a database, and so should fit our needs while not changing any behaviour in the default case. And the secon

Safer hash table initialization macro

2025-12-01 Thread Bertrand Drouvot
Hi hackers, Currently to create a hash table we do things like: A) create a struct, say: typedef struct SeenRelsEntry { Oid rel_id; int list_index; } SeenRelsEntry; where the first member is the hash key, and then later: B) ctl.keysize = sizeof(Oid); ctl.entrysize = sizeof(Se

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Pavel Stehule
po 1. 12. 2025 v 13:45 odesílatel Aleksander Alekseev < [email protected]> napsal: > Hi, > > > I am not sure if there are some authorities who specified some generic > template of meson.build for extensions. > > [...] > > but now, there is zero support for meson for extension from Postgres

Re: Non-text mode for pg_dumpall

2025-12-01 Thread tushar
On Thu, Nov 27, 2025 at 2:49 PM Mahendra Singh Thalor wrote: > > Fixed. Here, I am attaching an updated patch for the review and testing. > Thanks Mahendra, please refer this scenario where restoring the dump(database contain tablespace) throwing an error *Steps to reproduce * initdb (./initdb

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Aleksander Alekseev
Hi, > I am not sure if there are some authorities who specified some generic > template of meson.build for extensions. > [...] > but now, there is zero support for meson for extension from Postgres side. contrib/*/meson.build seem quite generic and quite supported. Or perhaps I don't quite unde

Re: IPC/MultixactCreation on the Standby server

2025-12-01 Thread Heikki Linnakangas
On 30/11/2025 14:15, Andrey Borodin wrote: On 29 Nov 2025, at 00:51, Heikki Linnakangas wrote: I didn't understand why the 'kill9' and 'poll_start' stuff is needed. We have plenty of tests that kill the server with regular "$node->stop('immediate')", and restart the server normally. The checkpo

Re: POC: make mxidoff 64 bits

2025-12-01 Thread Ashutosh Bapat
On Mon, Dec 1, 2025 at 2:23 PM Maxim Orlov wrote: > > > > On Fri, 28 Nov 2025 at 16:17, Ashutosh Bapat > wrote: >> >> One more thing, >> An UPDATE waits for FOR SHARE query to finish, and vice versa. In my >> experiments I didn't see an UPDATE creating a multi-xact. Why do we >> have UPDATEs in

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Pavel Stehule
po 1. 12. 2025 v 12:48 odesílatel Aleksander Alekseev < [email protected]> napsal: > Hi Pavel, > > > But when you use autotools for extensions, then you still should to > maintain it. > > True, but the problem can be decomposed into two parts - maintaining > for the core and maintaining for

Re: Row pattern recognition

2025-12-01 Thread Tatsuo Ishii
>> On Nov 27, 2025, at 11:10, Tatsuo Ishii wrote: >> >> Hi Chao, >> >> Any comment on this? >> 13 - 0005 - nodeWindowAgg.c ``` static int do_pattern_match(char *pattern, char *encoded_str, int len) { static regex_t *regcache = NULL; static regex_t preg; >

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

2025-12-01 Thread shveta malik
One trivial comment: +logical replication slots. The system automatically increases the +effective WAL level to logical when creating the first +logical replication slot, and decreases it back to replica +when dropping the last logical replication slot. The current

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2025-12-01 Thread Amul Sul
On Tue, Nov 25, 2025 at 8:30 AM jian he wrote: > > On Mon, Nov 24, 2025 at 11:38 AM Amul Sul wrote: > > > > [...] > +static inline float8 > +float8_div_safe(const float8 val1, const float8 val2, struct Node *escontext) > > but we can change float8_div to: > > static inline float8 > float8_div(con

Re: Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp

2025-12-01 Thread Amul Sul
On Mon, Dec 1, 2025 at 12:32 PM Michael Paquier wrote: > > On Fri, Nov 28, 2025 at 09:46:43AM +0530, Amul Sul wrote: > > I have attached patch 0002 that renames it. I also updated patch 0001 > > to accommodate Amit's comment suggestions. > > Thanks, applied this one after more tweaks. Regarding 0

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Aleksander Alekseev
Hi Pavel, > But when you use autotools for extensions, then you still should to maintain > it. True, but the problem can be decomposed into two parts - maintaining for the core and maintaining for the extensions. At least core developers won't have to check if another patch compiles with Autotoo

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-01 Thread Mihail Nikalayeu
Hello! On Sun, Nov 30, 2025 at 6:26 PM Mihail Nikalayeu wrote: > I think it is better to implement something in isolationtester to > natively support the case from [0] (in such case we don't need NOTICE > on .pre-invalidate-catalog-snapshot-end). I think I have implemented a better solution - wi

[PATCH] Expose checkpoint reason to completion log messages.

2025-12-01 Thread Soumya S Murali
Hi all, This patch is an update after reworking the “checkpoint reason” changes as a standalone patch, separate from the pg_stat_checkpointer additions as suggested [1]. I applied the patch on a clean tree and verified that the logging changes work as expected under different workloads. I am attac

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Dilip Kumar
On Fri, Nov 28, 2025 at 6:06 AM Peter Smith wrote: > > Some review comments for v8-0001. Thank Peter, yes these all make sense and will fix in next version along with other comments by Vignesh/Shveta and Amit, except one comment > 9. > +-- ok - conflict_log_table should not be published with ALL

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Pavel Stehule
po 1. 12. 2025 v 11:42 odesílatel Aleksander Alekseev < [email protected]> napsal: > Hi Pavel, > > >> No, there is currently no agreed schedule for this. > > > > almost all extensions has not meson support still > > Extensions shouldn't necessarily be built using the same build system > as

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-01 Thread Mihail Nikalayeu
Hello, Antonin! On Mon, Dec 1, 2025 at 11:29 AM Antonin Houska wrote: > With logical replication, we cannot really use multiple snapshots as Mihail is > proposing elsewhere in the thread, because the logical decoding system only > generates the snapshot for non-catalog tables once (LR uses that s

RE: Parallel Apply

2025-12-01 Thread Hayato Kuroda (Fujitsu)
Dear Tomas, Thanks for seeing the thread and sorry for late response. I had a PostgreSQL conference in Japan. > However, the patch seems fairly large (~80kB, although a fair bit of > that is comments). Would it be possible to split it into smaller chunks? > Is there some "minimal patch", which co

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Aleksander Alekseev
Hi Pavel, >> No, there is currently no agreed schedule for this. > > almost all extensions has not meson support still Extensions shouldn't necessarily be built using the same build system as the PG core. I can build PG using Meson and then install a 3rd party extension using `make install && mak

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Dilip Kumar
On Mon, Dec 1, 2025 at 3:12 PM Amit Kapila wrote: > > On Mon, Dec 1, 2025 at 2:58 PM shveta malik wrote: > > > > On Mon, Dec 1, 2025 at 2:04 PM Dilip Kumar wrote: > > > > > > On Mon, Dec 1, 2025 at 1:57 PM shveta malik > > > wrote: > > > > > > > > Since there is a concern that multiple rows fo

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-01 Thread Antonin Houska
Hannu Krosing wrote: > On Fri, Nov 28, 2025 at 6:58 PM Hannu Krosing wrote: > > > > On Fri, Nov 28, 2025 at 5:58 PM Matthias van de Meent > > wrote: > > > > > ... > > > I'm a bit worried, though, that LR may lose updates due to commit > > > order differences between WAL and PGPROC. I don't know

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Pavel Stehule
po 1. 12. 2025 v 11:06 odesílatel Peter Eisentraut napsal: > On 01.12.25 09:47, Aleksander Alekseev wrote: > > Quick and somewhat related question: if Meson support was added in PG > > 16, does this mean that Autotools will be supported up to and > > including PG 20? > > No, there is currently no

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Peter Eisentraut
On 01.12.25 09:47, Aleksander Alekseev wrote: Quick and somewhat related question: if Meson support was added in PG 16, does this mean that Autotools will be supported up to and including PG 20? No, there is currently no agreed schedule for this.

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Amit Kapila
On Mon, Dec 1, 2025 at 2:58 PM shveta malik wrote: > > On Mon, Dec 1, 2025 at 2:04 PM Dilip Kumar wrote: > > > > On Mon, Dec 1, 2025 at 1:57 PM shveta malik wrote: > > > > > > Since there is a concern that multiple rows for > > > multiple_unique_conflicts can cause data-bloat, it made me rethink

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread shveta malik
On Mon, Dec 1, 2025 at 2:04 PM Dilip Kumar wrote: > > On Mon, Dec 1, 2025 at 1:57 PM shveta malik wrote: > > > > On Thu, Nov 13, 2025 at 9:17 PM Dilip Kumar wrote: > > > > > > On Thu, Nov 13, 2025 at 2:39 PM shveta malik > > > wrote: > > > > > > > > > Few observations related to publication. >

回复: UPDATE run check constraints for affected columns only

2025-12-01 Thread li carol
Hi, +1 on Tom's point about BEFORE UPDATE triggers. I also noticed that in execReplication.c, ExecSimpleRelationUpdate() passes CMD_INSERT to ExecConstraints(): ExecConstraints(CMD_INSERT, resultRelInfo, slot, estate); I think this should be CMD_UPDATE? Regards, Yuan Li(carol) -邮件原件- 发件

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

2025-12-01 Thread shveta malik
On Mon, Dec 1, 2025 at 11:48 AM Masahiko Sawada wrote: > > On Thu, Nov 27, 2025 at 11:00 PM shveta malik wrote: > > > > On Thu, Nov 27, 2025 at 4:33 PM shveta malik wrote: > > > > > > A few more comments: > > > > > > > > > 10) > > > +# Promote standby3, increasing effective_wal_level to 'logical

Re: PoC: Simplify recovery after dropping a table by LOGGING the restore LSN

2025-12-01 Thread Дмитрий Лебедев
Subject: Re: PoC: Simplify recovery after dropping a table by LOGGING the restore LSN Hi all, I've implemented an improved version of this feature that addresses Kirill's concern about logging the wrong LSN [1]. The key difference: instead of logging WAL insert pointer at lock time, this patch l

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-12-01 Thread Antonin Houska
Matthias van de Meent wrote: > I'm a bit worried, though, that LR may lose updates due to commit > order differences between WAL and PGPROC. I don't know how that's > handled in logical decoding, and can't find much literature about it > in the repo either. Can you please give me an example of t

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

2025-12-01 Thread shveta malik
On Mon, Dec 1, 2025 at 11:40 AM Masahiko Sawada wrote: > > > > 11) > > my ($result, $stdout, $stderr) = $standby4->psql('postgres', > > qq[select pg_logical_slot_get_changes('standby4_slot', null, null)]); > > like( > > $stderr, > > qr/ERROR: logical decoding on standby requires "effective_wal_le

Re: POC: make mxidoff 64 bits

2025-12-01 Thread Maxim Orlov
On Fri, 28 Nov 2025 at 16:17, Ashutosh Bapat wrote: > One more thing, > An UPDATE waits for FOR SHARE query to finish, and vice versa. In my > experiments I didn't see an UPDATE creating a multi-xact. Why do we > have UPDATEs in the load created by the test? Am I missing something? As far as I

Re: Migrate to autoconf 2.72?

2025-12-01 Thread Aleksander Alekseev
Hi hackers, Quick and somewhat related question: if Meson support was added in PG 16, does this mean that Autotools will be supported up to and including PG 20? -- Best regards, Aleksander Alekseev

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

2025-12-01 Thread shveta malik
On Mon, Dec 1, 2025 at 11:29 AM Masahiko Sawada wrote: > > On Thu, Nov 27, 2025 at 3:51 AM shveta malik wrote: > > > > On Thu, Nov 27, 2025 at 2:32 AM Masahiko Sawada > > wrote: > > > > > > > > > I've squashed all fixup patches and attached the updated patch. > > > > > > > Thanks for test resul

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Dilip Kumar
On Mon, Dec 1, 2025 at 1:57 PM shveta malik wrote: > > On Thu, Nov 13, 2025 at 9:17 PM Dilip Kumar wrote: > > > > On Thu, Nov 13, 2025 at 2:39 PM shveta malik wrote: > > > > > > > Few observations related to publication. > > > > -- > > > > Thanks Shveta, for testing a

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread shveta malik
On Thu, Nov 13, 2025 at 9:17 PM Dilip Kumar wrote: > > On Thu, Nov 13, 2025 at 2:39 PM shveta malik wrote: > > > > > Few observations related to publication. > > > -- > > Thanks Shveta, for testing and sharing your thoughts. IMHO for > conflict log tables it should be

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Dilip Kumar
On Fri, Nov 28, 2025 at 2:32 PM shveta malik wrote: > > On Thu, Nov 27, 2025 at 5:50 PM Dilip Kumar wrote: > > > > > > I have fixed all these comments and also the comments of 0002, now I > > feel we can actually merge 0001 and 0002, so I have merged both of > > them. > > > > Now pending work sta

Re: Proposal: Conflict log history table for Logical Replication

2025-12-01 Thread Dilip Kumar
On Fri, Nov 28, 2025 at 12:24 PM vignesh C wrote: > > On Thu, 27 Nov 2025 at 17:50, Dilip Kumar wrote: > > > > On Thu, Nov 27, 2025 at 6:30 AM Peter Smith wrote: > > > > I have fixed all these comments and also the comments of 0002, now I > > feel we can actually merge 0001 and 0002, so I have m

Re: [PATCH] Expose checkpoint timestamp and duration in pg_stat_checkpointer

2025-12-01 Thread Michael Banck
Hi, On Mon, Dec 01, 2025 at 11:05:19AM +0530, Soumya S Murali wrote: > > On Fri, Nov 28, 2025 at 10:23:54AM +0530, Soumya S Murali wrote: > > I am still not convinced of the usefulness of those changes to > > pg_stat_checkpointer, but some feedback on the patch: > > According to my understanding,

Re: Some optimizations for COALESCE expressions during constant folding

2025-12-01 Thread Richard Guo
Attached is the patch set rebased on current master. I have split the patch into two parts: 0001 teaches eval_const_expressions to simplify COALESCE arguments using NOT NULL constraints, and 0002 teaches expr_is_nonnullable to handle COALESCE expressions. In addition, 0003 is a WIP patch that ext