]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid reporting permission-denied publisher sequences as missing
authorFujii Masao <fujii@postgresql.org>
Sat, 25 Jul 2026 01:30:30 +0000 (10:30 +0900)
committerFujii Masao <fujii@postgresql.org>
Sat, 25 Jul 2026 01:32:34 +0000 (10:32 +0900)
commitbb6125ca3ac756a44be9ef574e89aa5cff482afb
treeb328a708b92fb4fb000edc0eaff8ecba31ffaa0a
parent72207b17daa328d83b1609b4bc5cc4047fe4ba01
Avoid reporting permission-denied publisher sequences as missing

Previously, if a sequence synchronization batch contained both a sequence
that had been dropped on the publisher and another for which the
replication role lacked SELECT privilege, the latter was reported
twice: once as a permission failure and again as missing on the
publisher.

This happened because the permission-denied sequence was not marked as
found on the publisher. As a result, when another sequence in the batch
was genuinely missing, the later missing-sequence check incorrectly
classified the permission-denied sequence as missing as well.

Fix this by marking the permission-denied sequence as found before
reporting the permission failure, so it is not later reported as
missing.

Reported-by: Noah Misch <noah@leadboat.com>
Author: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CALDaNm3LsUjW7PahuCsbYAxajSF+S328tw5E9rF0erdh7dKOXw@mail.gmail.com
Backpatch-through: 19
src/backend/replication/logical/sequencesync.c