On Sat, 20 Jun 2026 at 14:54, Fujii Masao <[email protected]> wrote: > > On Sat, Jun 20, 2026 at 1:38 AM Tristan Partin <[email protected]> wrote: > > > Updated patches attached. > > > > Looks great! Thanks for fixing this. > > Thanks for the review! I've pushed the patches.
There was an issue reported by Noah at [1], finding-8
("Permission-denied sequences double-reported as 'missing on
publisher'"). This is a residual issue left by commit d4a657b. The
issue occurs when a sequence synchronization batch contains both a
sequence that was dropped on the publisher and another for which the
replication role lacks SELECT privilege. In that case, the
permission-denied sequence is reported twice: once as having
insufficient privileges on the publisher sequence and again as missing
on the publisher. The root cause is that get_and_validate_seq_info()
returns COPYSEQ_PUBLISHER_INSUFFICIENT_PERM before marking the
sequence as found on the publisher. As a result, if another sequence
in the same batch is genuinely missing, the post-commit scan also
classifies the permission-denied sequence as missing.
The attached patch fixes this by marking the sequence as found on the
publisher before returning COPYSEQ_PUBLISHER_INSUFFICIENT_PERM. Since
receiving a row from the publisher proves that the sequence exists
there, it should not also be reported as missing.
[1] -
https://www.postgresql.org/message-id/20260710045217.f0.noahmisch%40microsoft.com
Regards,
Vignesh
v1-0001-Avoid-reporting-permission-denied-publisher-seque.patch
Description: Binary data
