pgsql: Fix issues in binary_upgrade_logical_slot_has_caught_up().

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix issues in binary_upgrade_logical_slot_has_caught_up().
Date: 2023-12-07 03:24:39
Message-ID: E1rB50B-008xjk-Bo@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix issues in binary_upgrade_logical_slot_has_caught_up().

The commit 29d0a77fa6 labelled binary_upgrade_logical_slot_has_caught_up()
as a non-strict function to allow providing a better error message to callers
in case the passed slot_name is NULL. On further discussion, it seems that
it is not helpful to have a different error message for NULL input in this
function, so this patch marks the function as strict.

This patch also removes the explicit permission check to use replication
slots as this function is invoked only by superusers and instead adds an
Assert.

Reported-by: Masahiko Sawada
Author: Hayato Kuroda
Reviewed-by: Vignesh C
Discussion: https://postgr.es/m/CAD21AoDSyiBKkMXBxN_gUayZZUCOgyHnG8Ge8rcPXNP3Tf6B4g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0bf62460bb9e86101d24e31e915c2e8922675296

Modified Files
--------------
src/backend/utils/adt/pg_upgrade_support.c | 10 +++++-----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 5 ++---
3 files changed, 8 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-12-07 05:28:58 pgsql: Improve some error messages with invalid indexes for REINDEX CON
Previous Message Michael Paquier 2023-12-06 23:31:20 pgsql: Fix assertion failure with REINDEX and event triggers