Re: running logical replication as the subscription owner

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: running logical replication as the subscription owner
Date: 2023-05-15 13:54:14
Message-ID: CAGECzQTV4o=SpE_Nrnxaq0xpvHm9BY1vfAko5f4U7XptnPg7gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 15 May 2023 at 14:47, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> Thank you for the patch! I think we might want to have tests for it.

Yes, code looks good. But indeed some tests would be great. It seems
we forgot to actually do:

On Fri, 12 May 2023 at 13:55, Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
> CREATE ROLE regress_alice NOSUPERUSER LOGIN;
> CREATE ROLE regress_admin SUPERUSER LOGIN;
> ...
>
> What I see is that as part of tablesync, the trigger invokes an
> updates admin_audit which it shouldn't, as the table owner
> of alice.test should not have access to the
> table admin_audit. This means the table copy is being invoked as the
> subscription owner and not the table owner.

I think having this as a tap/regress test would be very useful.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-05-15 13:55:45 Re: createuser --memeber and PG 16
Previous Message Robert Sjöblom 2023-05-15 13:36:15 Re: [DOC] Update ALTER SUBSCRIPTION documentation v2