Re: [16+] subscription can end up in inconsistent state

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [16+] subscription can end up in inconsistent state
Date: 2023-09-11 19:00:03
Message-ID: 5dff4caf26f45ce224a33a5e18e110b93a351b2f.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 2023-09-11 at 08:59 +0530, Amit Kapila wrote:
> Can we think of calling walrcv_check_conninfo() when the following
> check is true (MySubscription->passwordrequired &&
> !superuser_arg(MySubscription->owner))? IIUC this has to be done for
> both apply_worker and tablesync_worker.

To me, it would make sense to just have walrcv_connect() do both checks
(a) and (b) -- rather than only check (b) -- when must_use_password is
true. Separating these checks (which are really two parts of the same
check) led to this problem in the first place.

Another thought: we may also need to invalidate the subscription worker
in cases where a user loses their superuser status.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2023-09-12 01:01:21 Re: BUG #17928: Standby fails to decode WAL on termination of primary
Previous Message Laurenz Albe 2023-09-11 17:25:15 Re: BUG #18105: ogr_fdw_15 incompatible with latest gdal36-libs