On Tue, May 27, 2025 at 03:02:52PM -0500, Nathan Bossart wrote:
> Here is what I have staged for commit for the others.  I'm hoping to push
> these in the next couple of days.

Thanks for the refreshed versions.  Looks sensible to me overall.

+static inline void
+AssertHasSnapshotForToast(Relation rel)
[...]
+    /*
+     * Commit 16bf24e fixed accesses to pg_replication_origin without a
+     * an active snapshot by removing its TOAST table.  On older branches,
+     * these bugs are left in place.  Its only varlena column is roname (the
+     * replication origin name), so this is only a problem if the name
+     * requires out-of-line storage, which seems unlikely.  In any case,
+     * fixing it doesn't seem worth extra code churn on the back-branches.
+     */
+    if (RelationGetRelid(rel) == ReplicationOriginRelationId)
+        return;

As of the back-branches but not HEAD, this shortcut makes sense.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to