On Fri, Jul 24, 2026 at 3:37 PM vignesh C <[email protected]> wrote:
> 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.

Thanks for the patch!

It looks good to me, except for one minor comment:

+ * The publisher lacks the SELECT privilege required by
+ * pg_get_sequence_data(). Since we received a row for this sequence,
+ * mark it as found so it is not also reported as missing.

Even when we receive a row, we still classify the sequence as missing
if pg_get_sequence_data() returns NULLs and has_sequence_privilege()
returns true. So "received a row for this sequence" doesn't seem quite
accurate to me.

So, isn't it clearer to describe this in terms of has_sequence_privilege()
returning false rather than NULL? For example:

      /*
       * The publisher lacks the SELECT privilege required by
       * pg_get_sequence_data(). Since has_sequence_privilege() returned
       * false, not NULL, do not classify this sequence as missing on the
       * publisher.
       */

Regards,

-- 
Fujii Masao


Reply via email to