Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-04-16 Thread Michael Paquier
On Tue, Apr 16, 2024 at 02:19:56PM +0900, Michael Paquier wrote: > Actually, I've come up with an idea just after hitting the send > button: let's use an extra ALTER TABLE SET ACCESS METHOD rather than > rely on the GUC to set the AM of the partitioned table correctly. > This extra command should

Re: Extract numeric filed in JSONB more effectively

2024-04-16 Thread Andy Fan
Andy Fan writes: > Here is latest version, nothing changed besides the rebase to the latest > master. The most recent 3 questions should be addressed. > > - The error message compatible issue [1] and the Peter's answer at [2]. > - Peter's new question at [2] and my answer at [3]. > > Any effrot

Solaris tar issues, or other reason why margay fails 010_pg_basebackup?

2024-04-16 Thread Thomas Munro
Hi, I noticed that margay (Solaris) has started running more of the tests lately, but is failing in pg_basebaseup/010_pg_basebackup. It runs successfully on wrasse (in older branches, Solaris 11.3 is desupported in 17/master), and also on pollock (illumos, forked from common ancestor Solaris 10

Re: POC: GROUP BY optimization

2024-04-16 Thread Andrei Lepikhov
On 4/12/24 06:44, Tom Lane wrote: * I'm pretty unconvinced by group_keys_reorder_by_pathkeys (which I notice has already had one band-aid added to it since commit). In particular, it seems to believe that the pathkeys and clauses lists match one-for-one, but I seriously doubt that that invariant

Re: An improved README experience for PostgreSQL

2024-04-16 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 02:21:49PM -0600, Nathan Bossart wrote: > I see many projects have files like SECURITY.md, CODE_OF_CONDUCT.md, and > CONTRIBUTING.md, and I think it would be relatively easy to add content to > each of those for PostgreSQL, even if they just link elsewhere. Here's a first

Re: Why is parula failing?

2024-04-16 Thread David Rowley
On Tue, 16 Apr 2024 at 18:58, Robins Tharakan wrote: > The last 25 consecutive runs have passed [1] after switching > REL_12_STABLE to -O0 ! So I am wondering whether that confirms that > the compiler version is to blame, and while we're still here, > is there anything else I could try? I don't

Re: cpluspluscheck/headerscheck require build in REL_16_STABLE

2024-04-16 Thread John Naylor
On Mon, Apr 15, 2024 at 9:20 PM Marina Polyakova wrote: > > On 2024-04-13 08:40, John Naylor wrote: > > so that they build fine on PG16 as well. The problem is, not all the > > required headers are generated when invoking `make headerscheck`. The > > attached patch brings in some Makefile rules

Re: pg_combinebackup does not detect missing files

2024-04-16 Thread David Steele
On 4/16/24 23:50, Robert Haas wrote: On Wed, Apr 10, 2024 at 9:36 PM David Steele wrote: I've been playing around with the incremental backup feature trying to get a sense of how it can be practically used. One of the first things I always try is to delete random files and see what happens.

Re: post-freeze damage control

2024-04-16 Thread Jeff Davis
On Mon, 2024-04-08 at 15:47 -0400, Robert Haas wrote: > - I couldn't understand why the "Operate > XLogCtl->log{Write,Flush}Result with atomics" code was correct when I > read it. I reviewed ee1cbe806d. It followed a good process of discussion and review. It was a bit close to the feature freeze

Re: pg17 issues with not-null contraints

2024-04-16 Thread Justin Pryzby
On Tue, Apr 16, 2024 at 08:11:49PM +0200, Alvaro Herrera wrote: > On 2024-Apr-15, Alvaro Herrera wrote: > > > - Fourth thought: we do as in the third thought, except we also allow > > DROP CONSTRAINT a constraint that's marked "local, inherited" to be > > simply an inherited constraint (remove

Re: Parallel CREATE INDEX for BRIN indexes

2024-04-16 Thread Tomas Vondra
On 4/15/24 20:35, Tomas Vondra wrote: > On 4/15/24 10:18, Tomas Vondra wrote: >> ... >> >> I'll try a bit more to make this work without the temp table. >> > > Considering the earlier discussion in e2933a6e1, I think making the > table TEMP is the best fix, so I'll do that. Thanks for remembering

Re: Differential code coverage between 16 and HEAD

2024-04-16 Thread Jeff Davis
On Tue, 2024-04-16 at 11:58 -0700, Andres Freund wrote: > > Hm, that seems annoying, even for update-unicode :/. But I guess it > won't be > very common to have such failures? Things don't change a lot between Unicode versions (and are subject to the stability policy), but the tests are

Re: documentation structure

2024-04-16 Thread Andres Freund
Hi, On 2024-04-16 15:05:32 -0400, Tom Lane wrote: > Andres Freund writes: > > I think we should work on generating a lot of func.sgml. Particularly the > > signature etc should just come from pg_proc.dat, it's pointlessly painful to > > generate that by hand. And for a lot of the functions we

Re: Differential code coverage between 16 and HEAD

2024-04-16 Thread Jeff Davis
On Mon, 2024-04-15 at 21:35 -0400, Tom Lane wrote: > It's definitely not OK for the standard test suite to include > internet access. The update-unicode target is not run as part of the standard test suite. >   Seems like we need to separate "download new > source files" from "generate the

Re: documentation structure

2024-04-16 Thread Bruce Momjian
On Tue, Apr 16, 2024 at 03:05:32PM -0400, Tom Lane wrote: > Andres Freund writes: > > I think we should work on generating a lot of func.sgml. Particularly the > > signature etc should just come from pg_proc.dat, it's pointlessly painful to > > generate that by hand. And for a lot of the

Re: documentation structure

2024-04-16 Thread Tom Lane
Andres Freund writes: > I think we should work on generating a lot of func.sgml. Particularly the > signature etc should just come from pg_proc.dat, it's pointlessly painful to > generate that by hand. And for a lot of the functions we should probably move > the existing func.sgml comments to

Re: Differential code coverage between 16 and HEAD

2024-04-16 Thread Andres Freund
Hi, On 2024-04-15 18:23:21 -0700, Jeff Davis wrote: > On Mon, 2024-04-15 at 17:05 -0700, Andres Freund wrote: > > Can't we test this as part of the normal testsuite? > > One thing that complicates things a bit is that the test compares the > results against ICU, so a mismatch in Unicode version

Re: pg17 issues with not-null contraints

2024-04-16 Thread Alvaro Herrera
On 2024-Apr-15, Justin Pryzby wrote: > Here's a couple more issues affecting upgrades from v16 to v17. > > postgres=# CREATE TABLE a(i int NOT NULL); CREATE TABLE b(i int PRIMARY KEY) > INHERITS (a); > pg_restore: error: could not execute query: ERROR: constraint >

Re: documentation structure

2024-04-16 Thread Andres Freund
Hi, On 2024-03-19 17:39:39 -0400, Andrew Dunstan wrote: > My own pet docs peeve is a purely editorial one: func.sgml is a 30k line > beast, and I think there's a good case for splitting out at least the > larger chunks of it. I think we should work on generating a lot of func.sgml. Particularly

Re: pg17 issues with not-null contraints

2024-04-16 Thread Alvaro Herrera
On 2024-Apr-15, Alvaro Herrera wrote: > - Fourth thought: we do as in the third thought, except we also allow > DROP CONSTRAINT a constraint that's marked "local, inherited" to be > simply an inherited constraint (remove its "local" marker). Here is an initial implementation of what I was

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-16 Thread Robert Haas
On Tue, Apr 16, 2024 at 12:06 PM Stefan Fercot wrote: > Sure, I can see your point here and how people could be tempted to through > away that backup_manifest if they don't know how important it is to keep it. > Probably in this case we'd need the list to be inside the tar, just like >

Re: Stack overflow issue

2024-04-16 Thread Alexander Korotkov
On Tue, Apr 16, 2024 at 6:35 PM Andres Freund wrote: > On 2024-04-16 15:45:42 +0300, Alexander Korotkov wrote: > > On Tue, Apr 16, 2024 at 1:48 AM Andres Freund wrote: > > > On 2024-03-06 14:17:23 +0200, Alexander Korotkov wrote: > > > > 0001 Turn tail recursion into iteration in

soliciting patches to review

2024-04-16 Thread Robert Haas
Hi, At 2024.pgconf.dev, Andres and I will be hosting a patch review workshop.[1] Part of the workshop will be a presentation, and part of it will be a practicum. That is, we're going to actually ask attendees to review some patches during the workshop. We'll also comment on those reviews, and the

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-16 Thread Stefan Fercot
On Tuesday, April 16th, 2024 at 3:22 PM, Robert Haas wrote: > What I fear is that this will turn into another situation like we had > with pg_xlog, where people saw "log" in the name and just blew it > away. Matter of fact, I recently encountered one of my few recent > examples of someone doing

Re: Table AM Interface Enhancements

2024-04-16 Thread Andres Freund
Hi, On 2024-04-16 08:31:24 -0400, Robert Haas wrote: > On Tue, Apr 16, 2024 at 6:52 AM Alexander Korotkov > wrote: > > Taking a closer look at acquire_sample_rows(), I think it would be > > good if table AM implementation would care about block-level (or > > whatever-level) sampling. So that

Re: Table AM Interface Enhancements

2024-04-16 Thread Andres Freund
On 2024-04-16 13:33:53 +0300, Alexander Korotkov wrote: > Reverted. Thanks!

Re: Issue with the PRNG used by Postgres

2024-04-16 Thread Andres Freund
Hi, On 2024-04-15 10:54:16 -0400, Robert Haas wrote: > On Fri, Apr 12, 2024 at 3:33 PM Andres Freund wrote: > > Here's a patch implementing this approach. I confirmed that before we > > trigger > > the stuck spinlock logic very quickly and after we don't. However, if most > > sleeps are

Re: Stack overflow issue

2024-04-16 Thread Andres Freund
Hi, On 2024-04-16 15:45:42 +0300, Alexander Korotkov wrote: > On Tue, Apr 16, 2024 at 1:48 AM Andres Freund wrote: > > On 2024-03-06 14:17:23 +0200, Alexander Korotkov wrote: > > > 0001 Turn tail recursion into iteration in CommitTransactionCommand() > > > I did minor revision of comments and

Re: Combine headerscheck and cpluspluscheck scripts

2024-04-16 Thread Anton Voloshin
Hello, hackers, On 10/03/2024 12:03, Peter Eisentraut wrote: Committed, thanks. This commit (7b8e2ae2f) have turned cpluspluscheck script into a --cplusplus option for headerscheck. I propose to update the src/tools/pginclude/README correspondingly, please see the attached patch. --

Re: Use streaming read API in ANALYZE

2024-04-16 Thread Nazir Bilal Yavuz
Hi, On Wed, 3 Apr 2024 at 22:25, Nazir Bilal Yavuz wrote: > > Hi, > > Thank you for looking into this! > > On Wed, 3 Apr 2024 at 20:17, Heikki Linnakangas wrote: > > > > On 03/04/2024 13:31, Nazir Bilal Yavuz wrote: > > > Streaming API has been committed but the committed version has a minor >

Re: pg_combinebackup does not detect missing files

2024-04-16 Thread Robert Haas
On Wed, Apr 10, 2024 at 9:36 PM David Steele wrote: > I've been playing around with the incremental backup feature trying to > get a sense of how it can be practically used. One of the first things I > always try is to delete random files and see what happens. > > You can delete pretty much

Re: Typos in the code and README

2024-04-16 Thread Nazir Bilal Yavuz
Hi, Thanks for working on this! On Mon, 15 Apr 2024 at 15:26, Daniel Gustafsson wrote: > > > On 14 Apr 2024, at 13:19, David Rowley wrote: > > > > On Sat, 13 Apr 2024 at 09:17, Daniel Gustafsson wrote: > >> > >>> On 12 Apr 2024, at 23:15, Heikki Linnakangas wrote: > >>> Here's a few more.

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-16 Thread Robert Haas
On Mon, Apr 15, 2024 at 10:12 PM David Steele wrote: > Anyway, I think it should be fixed or documented as a caveat since it > causes a hard failure on restore. Alright, I'll look into this. > I know Tomas added some optimizations that work best with --no-manifest > but if we can eventually

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-16 Thread Robert Haas
On Tue, Apr 16, 2024 at 3:10 AM Stefan Fercot wrote: > > > But ... I didn't really end up feeling very comfortable with it. Right > > > now, the backup manifest is something we only use to verify the > > > integrity of the backup. If we were to do this, it would become a > > > critical part of

Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-04-16 Thread Dean Rasheed
On Tue, 16 Apr 2024 at 11:35, Richard Guo wrote: > > On Tue, Apr 16, 2024 at 5:48 PM Aleksander Alekseev > wrote: >> >> Oversight of 0294df2f1f84 [1]. >> >> [1]: >> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0294df2f1f84 > > +1. I think this change improves the code

Re: Stack overflow issue

2024-04-16 Thread Alexander Korotkov
On Tue, Apr 16, 2024 at 1:48 AM Andres Freund wrote: > On 2024-03-06 14:17:23 +0200, Alexander Korotkov wrote: > > 0001 Turn tail recursion into iteration in CommitTransactionCommand() > > I did minor revision of comments and code blocks order to improve the > > readability. > > After sending >

Re: Table AM Interface Enhancements

2024-04-16 Thread Robert Haas
On Tue, Apr 16, 2024 at 6:52 AM Alexander Korotkov wrote: > Taking a closer look at acquire_sample_rows(), I think it would be > good if table AM implementation would care about block-level (or > whatever-level) sampling. So that acquire_sample_rows() just fetches > tuples one-by-one from table

Re: Table AM Interface Enhancements

2024-04-16 Thread Pavel Borisov
On Tue, 16 Apr 2024 at 14:52, Alexander Korotkov wrote: > On Mon, Apr 15, 2024 at 11:17 PM Andres Freund wrote: > > On 2024-04-15 16:02:00 -0400, Robert Haas wrote: > > > Do you want that patch applied, not applied, or applied with some set > of > > > modifications? > > > > I think we should

Re: Disallow changing slot's failover option in transaction block

2024-04-16 Thread shveta malik
On Tue, Apr 16, 2024 at 1:45 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Hou, > > > Kuroda-San reported an issue off-list that: > > > > If user execute ALTER SUBSCRIPTION SET (failover) command inside a txn block > > and rollback, only the subscription option change can be rolled back, while > >

Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-04-16 Thread Nazir Bilal Yavuz
Hi, I am working on using read streams in the CREATE DATABASE command when the strategy is wal_log. RelationCopyStorageUsingBuffer() function is used in this context. This function reads source buffers then copies them to the destination buffers. I used read streams only when reading source

Re: Add bump memory context type and use it for tuplesorts

2024-04-16 Thread Amul Sul
On Tue, Apr 16, 2024 at 3:44 PM David Rowley wrote: > On Tue, 16 Apr 2024 at 17:13, Amul Sul wrote: > > Attached is a small patch adding the missing BumpContext description to > the > > README. > > Thanks for noticing and working on the patch. > > There were a few things that were not quite

Re: Add bump memory context type and use it for tuplesorts

2024-04-16 Thread David Rowley
On Mon, 8 Apr 2024 at 00:37, David Rowley wrote: > I've now pushed all 3 patches. Thank you for all the reviews on > these and for the extra MemoryContextMethodID bit, Matthias. I realised earlier today when working on [1] that bump makes a pretty brain-dead move when adding dedicated blocks

Re: Table AM Interface Enhancements

2024-04-16 Thread Alexander Korotkov
On Mon, Apr 15, 2024 at 11:17 PM Andres Freund wrote: > On 2024-04-15 16:02:00 -0400, Robert Haas wrote: > > Do you want that patch applied, not applied, or applied with some set of > > modifications? > > I think we should apply Alexander's proposed revert and then separately > discuss what we

Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-04-16 Thread Richard Guo
On Tue, Apr 16, 2024 at 5:48 PM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Oversight of 0294df2f1f84 [1]. > > [1]: > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0294df2f1f84 +1. I think this change improves the code quality. I searched for other arrays indexed

Re: Table AM Interface Enhancements

2024-04-16 Thread Alexander Korotkov
On Mon, Apr 15, 2024 at 11:11 PM Andres Freund wrote: > On 2024-04-12 01:04:03 +0300, Alexander Korotkov wrote: > > 1) If we just apply my revert patch and leave c6fc50cb4028 and > > 041b96802ef in the tree, then we get our table AM API narrowed. As > > you expressed the current API requires

Re: Add bump memory context type and use it for tuplesorts

2024-04-16 Thread David Rowley
On Tue, 16 Apr 2024 at 17:13, Amul Sul wrote: > Attached is a small patch adding the missing BumpContext description to the > README. Thanks for noticing and working on the patch. There were a few things that were not quite accurate or are misleading: 1. > +These three memory contexts aim to

[PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-04-16 Thread Aleksander Alekseev
Oversight of 0294df2f1f84 [1]. [1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0294df2f1f84 -- Best regards, Aleksander Alekseev v1-0001-Replace-constant-3-with-NUM_MERGE_MATCH_KINDS.patch Description: Binary data

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread Bertrand Drouvot
Hi, On Tue, Apr 16, 2024 at 02:06:45PM +0530, shveta malik wrote: > On Tue, Apr 16, 2024 at 1:55 PM Zhijie Hou (Fujitsu) > wrote: > > I personally feel adding the additional check for sync_replication_slots may > > not improve the situation here. Because the GUC sync_replication_slots can > >

Re: Add recovery to pg_control and remove backup_label

2024-04-16 Thread Stefan Fercot
Hi, On Sunday, March 10th, 2024 at 4:47 AM, David Steele wrote: > I've had a new idea which may revive this patch. The basic idea is to > keep backup_label but also return a copy of pg_control from > pg_stop_backup(). This copy of pg_control would be safe from tears and > have a

Re: post-freeze damage control

2024-04-16 Thread Stefan Fercot
Hi, On Saturday, April 13th, 2024 at 12:18 PM, Tomas Vondra wrote: > On 4/13/24 01:03, David Steele wrote: > > On 4/12/24 22:12, Tomas Vondra wrote: > > > On 4/11/24 23:48, David Steele wrote: > > > > On 4/11/24 20:26, Tomas Vondra wrote: > > > > > > > > > FWIW that discussion also mentions

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread shveta malik
On Tue, Apr 16, 2024 at 1:55 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, April 16, 2024 2:52 PM Bertrand Drouvot > wrote: > > > Hi, > > > On Tue, Apr 16, 2024 at 10:00:04AM +0530, shveta malik wrote: > > > Please find v5 addressing above comments. > > > > Thanks! > > > > @@ -1634,9 +1677,14

Re: Typos in the code and README

2024-04-16 Thread Richard Guo
On Mon, Apr 15, 2024 at 8:26 PM Daniel Gustafsson wrote: > Thanks. Collecting all the ones submitted here, as well as a few submitted > off-list by Alexander, the patch is now a 3-part patchset of cleanups: > > 0001 contains the typos and duplicate words fixups, 0002 fixes a parameter > with >

Re: Add bump memory context type and use it for tuplesorts

2024-04-16 Thread Daniel Gustafsson
> On 16 Apr 2024, at 07:12, Amul Sul wrote: > > Attached is a small patch adding the missing BumpContext description to the > README. Nice catch, we should add it to the README. + pfree'd or realloc'd. I think it's best to avoid mixing API:s, "pfree'd or repalloc'd" keeps it to functions in

RE: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread Zhijie Hou (Fujitsu)
On Tuesday, April 16, 2024 2:52 PM Bertrand Drouvot wrote: Hi, > On Tue, Apr 16, 2024 at 10:00:04AM +0530, shveta malik wrote: > > Please find v5 addressing above comments. > > Thanks! > > @@ -1634,9 +1677,14 @@ SyncReplicationSlots(WalReceiverConn *wrconn) { >

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread shveta malik
On Tue, Apr 16, 2024 at 12:03 PM Bertrand Drouvot wrote: > > > I think for now let's restrict their usage in parallel and make the > > promotion behavior consistent both for worker and API. > > Okay, let's do it that way. Is it worth to add a few words in the doc related > to >

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-16 Thread Daniel Gustafsson
> On 16 Apr 2024, at 01:03, Michael Paquier wrote: > > On Mon, Apr 15, 2024 at 11:07:05AM +0200, Daniel Gustafsson wrote: >> On 15 Apr 2024, at 07:04, Michael Paquier wrote: >>> On Fri, Apr 12, 2024 at 02:42:57PM +0200, Daniel Gustafsson wrote: Is the attached split in line with how you

RE: Disallow changing slot's failover option in transaction block

2024-04-16 Thread Hayato Kuroda (Fujitsu)
Dear Hou, > Kuroda-San reported an issue off-list that: > > If user execute ALTER SUBSCRIPTION SET (failover) command inside a txn block > and rollback, only the subscription option change can be rolled back, while > the > replication slot's failover change is preserved. > > This is because

Re: Slow catchup of 2PC (twophase) transactions on replica in LR

2024-04-16 Thread Ajin Cherian
On Tue, Apr 16, 2024 at 1:31 AM Давыдов Виталий wrote: > Dear All, > Just interested, does anyone tried to reproduce the problem with slow > catchup of twophase transactions (pgbench should be used with big number of > clients)? I haven't seen any messages from anyone other that me that the >

Re: Disallow changing slot's failover option in transaction block

2024-04-16 Thread Bertrand Drouvot
Hi, On Tue, Apr 16, 2024 at 06:32:11AM +, Zhijie Hou (Fujitsu) wrote: > Hi, > > Kuroda-San reported an issue off-list that: > > If user execute ALTER SUBSCRIPTION SET (failover) command inside a txn block > and rollback, only the subscription option change can be rolled back, while > the >

Re: Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block

2024-04-16 Thread Quan Zongliang
On 2024/3/11 09:25, Quan Zongliang wrote: On 2024/3/4 15:48, jian he wrote: Maybe we can tolerate LOG, first output the query plan then statement. It is more appropriate to let the extension solve its own problems. Of course, this change is not easy to implement. Due to the way XID is

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-16 Thread Stefan Fercot
Hi, > I think it would be reasonable to restrict what can be put in base/ and > global/ but users generally feel free to create whatever they want in > the root of PGDATA, despite being strongly encouraged not to. > > Anyway, I think it should be fixed or documented as a caveat since it > causes

Re: Things I don't like about \du's "Attributes" column

2024-04-16 Thread Pavel Luzanov
Hi, On 14.04.2024 05:02, Wen Yi wrote: I think we can change the output like this: postgres=# \du List of roles Role name | Login | Attributes | Password | Valid until | Connection limit

Re: Why is parula failing?

2024-04-16 Thread Robins Tharakan
On Mon, 15 Apr 2024 at 16:02, Tom Lane wrote: > David Rowley writes: > > If GetNowFloat() somehow was returning a negative number then we could > > end up with a large delay. But if gettimeofday() was so badly broken > > then wouldn't there be some evidence of this in the log timestamps on > >

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread Bertrand Drouvot
Hi, On Tue, Apr 16, 2024 at 10:00:04AM +0530, shveta malik wrote: > Please find v5 addressing above comments. Thanks! @@ -1634,9 +1677,14 @@ SyncReplicationSlots(WalReceiverConn *wrconn) { PG_ENSURE_ERROR_CLEANUP(slotsync_failure_callback, PointerGetDatum(wrconn)); { +

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread Amit Kapila
On Tue, Apr 16, 2024 at 12:03 PM Bertrand Drouvot wrote: > > On Tue, Apr 16, 2024 at 08:21:04AM +0530, Amit Kapila wrote: > > > There is no clear use case for allowing them in parallel and I feel it > > would add more confusion when it can work sometimes but not other > > times. However, if we

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-16 Thread Zhijie Hou (Fujitsu)
On Wednesday, March 13, 2024 11:49 AM vignesh C wrote: > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > >> > >> > >> Thanks, I have created the following Commitfest entry for this: > >>

Re: promotion related handling in pg_sync_replication_slots()

2024-04-16 Thread Bertrand Drouvot
Hi, On Tue, Apr 16, 2024 at 08:21:04AM +0530, Amit Kapila wrote: > On Mon, Apr 15, 2024 at 7:47 PM Bertrand Drouvot > wrote: > > > > On Mon, Apr 15, 2024 at 06:29:49PM +0530, Amit Kapila wrote: > > > On Mon, Apr 15, 2024 at 6:21 PM Bertrand Drouvot > > > wrote: > > > > > > > > On Mon, Apr 15,

Disallow changing slot's failover option in transaction block

2024-04-16 Thread Zhijie Hou (Fujitsu)
Hi, Kuroda-San reported an issue off-list that: If user execute ALTER SUBSCRIPTION SET (failover) command inside a txn block and rollback, only the subscription option change can be rolled back, while the replication slot's failover change is preserved. This is because ALTER SUBSCRIPTION SET

Re: Typo about the SetDatatabaseHasLoginEventTriggers?

2024-04-16 Thread Michael Paquier
On Tue, Apr 16, 2024 at 02:05:46PM +0800, Japin Li wrote: > Upon reviewing the login event trigger, I noticed a potential typo about > the SetDatabaseHasLoginEventTriggers function name. Indeed, thanks! Will fix and double-check the surroundings. -- Michael signature.asc Description: PGP

Re: Slow catchup of 2PC (twophase) transactions on replica in LR

2024-04-16 Thread Amit Kapila
On Tue, Apr 16, 2024 at 7:48 AM Hayato Kuroda (Fujitsu) wrote: > > > > FYI - We also considered the idea which walsender waits until all prepared > > transactions > > > are resolved before decoding and sending changes, but it did not work well > > > - the restarted walsender sent only COMMIT

Re: Things I don't like about \du's "Attributes" column

2024-04-16 Thread Pavel Luzanov
On 16.04.2024 01:06, David G. Johnston wrote: At this point I'm on board with retaining the \dr charter of simply being an easy way to access the detail exposed in pg_roles with some display formatting but without any attempt to convey how the system uses said information.  Without changing

Typo about the SetDatatabaseHasLoginEventTriggers?

2024-04-16 Thread Japin Li
Hi, Upon reviewing the login event trigger, I noticed a potential typo about the SetDatabaseHasLoginEventTriggers function name. diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 0d3214df9c..7a5ed6b985 100644 ---

Re: POC: GROUP BY optimization

2024-04-16 Thread Andrei Lepikhov
On 4/12/24 06:44, Tom Lane wrote: * The very first hunk causes get_eclass_for_sort_expr to have side-effects on existing EquivalenceClass data structures. What is the argument that that's not going to cause problems? At the very least it introduces asymmetry, in that the first caller wins the