pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Julien Rouhaud <rjuju123@gmail.com>
To: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Subject: Re: pg_upgrade and logical replication
Date: Mon, 24 Apr 2023 14:50:32 +0800
Message-ID: <20230424065032.4w7vm33qmaput3al@jrouhaud> (raw )
In-Reply-To: <TYAPR01MB5866401A4B923A07C535D59EF5999@TYAPR01MB5866.jpnprd01.prod.outlook.com >
References: <CAA4eK1+4ORS7C+j3NS9yfoKdjfpdat0XrhUy1opBvw8WN58g4Q@mail.gmail.com >
<CAOBaU_YavOL0AhS0uU07Ea_0ZyR7youtJAvSHDnhmADGDw+VwA@mail.gmail.com >
<CAA4eK1+pWXqDSO+QpGtLFqcCP5+qCXkvLN-YviRqdXV+d7Fdow@mail.gmail.com >
<20230309083456.xpjcsuycyn7d2yvr@jrouhaud >
<20230327084955.m624nwfaf7mbzo6j@jrouhaud >
<TYAPR01MB58667340763002108CEB5EB8F5919@TYAPR01MB5866.jpnprd01.prod.outlook.com >
<20230407022802.jqmdhgjhrnj5lpcl@jrouhaud >
<TYAPR01MB58667233ECDB40B7FFDDB22CF59B9@TYAPR01MB5866.jpnprd01.prod.outlook.com >
<20230413025110.gt6nahvrerngoz2m@jrouhaud >
<TYAPR01MB5866401A4B923A07C535D59EF5999@TYAPR01MB5866.jpnprd01.prod.outlook.com >
Hi,
On Fri, Apr 14, 2023 at 04:19:35AM +0000, Hayato Kuroda (Fujitsu) wrote:
>
> I have tested, but srsublsn became NULL if copy_data was specified as off.
> This is because when copy_data is false, all tuples in pg_subscription_rels are filled
> as state = 'r' and srsublsn = NULL, and tablesync workers will never boot.
> See CreateSubscription().
> Doesn't it mean that there is a possibility that LSN option is not specified while
> ALTER SUBSCRIPTION ADD TABLE?
It shouldn't be the case for now, as pg_upgrade will check first if there's a
invalid remote_lsn and refuse to proceed if that's the case. Also, the
remote_lsn should be set as soon as some data is replicated, so unless you add
a table that's never modified to a publication you should be able to run
pg_upgrade at some point, once there's replicated DML on such a table.
I'm personally fine with the current restrictions, but I don't really use
logical replication in any project so maybe I'm not objective enough. For now
I'd rather keep things as-is, and later improve on it if some people want to
lift such restrictions (and such restrictions can actually be lifted).
view thread (221+ messages) latest in thread
Message-ID: <20230424065032.4w7vm33qmaput3al@jrouhaud>
Permalink: ../20230424065032.4w7vm33qmaput3al@jrouhaud/
Also on: postgresql.org/message-id/20230424065032.4w7vm33qmaput3al@jrouhaud
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: rjuju123@gmail.com, kuroda.hayato@fujitsu.com, pgsql-hackers@lists.postgresql.org, amit.kapila16@gmail.com
Subject: Re: pg_upgrade and logical replication
In-Reply-To: <20230424065032.4w7vm33qmaput3al@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox