Re: running logical replication as the subscription owner

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>, Jeff Davis <pgsql@j-davis.com>, Jelte Fennema <postgres@jeltef.nl>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2023-05-11T11:38:41Z
Lists: pgsql-hackers
On Tue, Apr 4, 2023 at 9:40 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Mon, Apr 3, 2023 at 10:09 PM Noah Misch <noah@leadboat.com> wrote:
> > I gather we agree on what to do for v16, which is good.
>
> I have committed the patches.
>

Do we want the initial sync to also respect 'run_as_owner' option? I
might be missing something but I don't see anything in the docs about
initial sync interaction with this option. In the commit a2ab9c06ea,
we did the permission checking during the initial sync so I thought we
should do it here as well.

-- 
With Regards,
Amit Kapila.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Honor run_as_owner option in tablesync worker.

  2. Document new pg_subscription columns.

  3. Add a run_as_owner option to subscriptions.

  4. Perform logical replication actions as the table owner.

  5. Add new predefined role pg_create_subscription.

  6. Respect permissions within logical replication.

  7. Empty search_path in logical replication apply worker and walsender.

  8. Empty search_path in Autovacuum and non-psql/pgbench clients.