pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_upgrade and logical replication
Date: Fri, 29 Sep 2023 09:33:59 +0900
Message-ID: <ZRYbdzsSlAp9bnR3@paquier.xyz> (raw)
In-Reply-To: <CAA4eK1+gQEesHUHcncDixjUdEVF1e=Ymu_z-CLj1yyRoMc1bwA@mail.gmail.com>
References: <TYAPR01MB586682CF17623F6E71B9D3ADF59D9@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<20230424072224.qd3awkfrjcanw2pa@jrouhaud>
	<TYAPR01MB5866FE3A990CAE1FFA3F1472F56A9@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<CALDaNm1ZrbHaWpJwwNhDTJocRKWd3rEkgJazuDdZ9Z-WdvonFg@mail.gmail.com>
	<TYAPR01MB5866F1BA00D86EA7EA134348F5F1A@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<CALDaNm1JzqTreCUrhNu5E1gq7Q8r_u3+FrisyT7moOED=UdoCg@mail.gmail.com>
	<CAA4eK1+J0Ki74WScoTC4mJSYn4mSOhgrRFcFMQ_OCV0bfXjWVg@mail.gmail.com>
	<CALDaNm3QgD17nNVmdPtTfP+J5F_UfGqC9n40c+X+RV9VAfWa-Q@mail.gmail.com>
	<CALDaNm2sdoTu=nsfEE9+WyXiYBYrE5bE2s6xi9zmqheqsLaNXg@mail.gmail.com>
	<CAA4eK1+gQEesHUHcncDixjUdEVF1e=Ymu_z-CLj1yyRoMc1bwA@mail.gmail.com>

On Wed, Sep 27, 2023 at 07:31:41PM +0530, Amit Kapila wrote:
> On Wed, Sep 27, 2023 at 3:37 PM vignesh C <vignesh21@gmail.com> wrote:
>> Once the table is in SUBREL_STATE_SYNCDONE state, the apply worker
>> will check if the apply worker has some LSN records that need to be
>> applied to reach the LSN of the table. Once the required WAL is
>> applied, the table state will be changed from SUBREL_STATE_SYNCDONE to
>> SUBREL_STATE_READY state. Since there is a chance that in this case
>> the apply worker has to apply some transactions to get all the tables
>> in READY state, I felt the minimum requirement should be that at least
>> all the tables should be in READY state for the upgradation of the
>> Subscriber.
> 
> I don't think this theory is completely correct because the pending
> WAL can be applied even after an upgrade.

Yeah, agreed that putting a pre-check about the state of the relations
stored in pg_subscription_rel when handling the upgrade of a
subscriber is not necessary.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (221+ messages)  latest in thread

Message-ID: <ZRYbdzsSlAp9bnR3@paquier.xyz>
Permalink:  ../ZRYbdzsSlAp9bnR3@paquier.xyz/
Also on:    postgresql.org/message-id/ZRYbdzsSlAp9bnR3@paquier.xyz

 · 

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: michael@paquier.xyz, amit.kapila16@gmail.com, vignesh21@gmail.com, kuroda.hayato@fujitsu.com, rjuju123@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_upgrade and logical replication
  In-Reply-To: <ZRYbdzsSlAp9bnR3@paquier.xyz>

* 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