Re: Logical Replication of sequences

Поиск
Список
Период
Сортировка
От Nisha Moond
Тема Re: Logical Replication of sequences
Дата
Msg-id CABdArM7aY+u5Fv9KMHp_iX=AEixfDum5e2ixZkWS8YcOt_NO7Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Logical Replication of sequences  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
On Wed, Aug 6, 2025 at 2:28 PM vignesh C <vignesh21@gmail.com> wrote:
>
>
> The attached v20250806 version patch has the changes for the same.
>
Thank You for the patches.

patch-0005: sequencesync.c
+ aclresult = pg_class_aclcheck(RelationGetRelid(sequence_rel), GetUserId(),
+   ACL_UPDATE);
+ if (aclresult != ACLCHECK_OK)
+ aclcheck_error(aclresult,
+    get_relkind_objtype(sequence_rel->rd_rel->relkind),
+    seqname);

I see that the run_as_owner check has been removed from
LogicalRepSyncSequences() and added to copy_sequences() for the
SetSequence() call.

However, IIUC, the same check is also needed in
LogicalRepSyncSequences(). Currently, the sequencesync worker can fail
in the above permission check since user switching doesn’t happen when
run_as_owner is false.

```
ERROR:  permission denied for sequence n1
```
Should we add the run_as_owner handling here as well to avoid this?

--
Thanks,
Nisha



В списке pgsql-hackers по дате отправления: