From 84f1bf4afa5e7c329ca4dd908334205f8282c398 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 12 Nov 2025 21:19:03 +0200 Subject: [PATCH] Clear 'xid' in dummy async notify entries written to fill up pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before we started to freeze async notify entries (commit 8eeb4a0f7c), no one looked at the 'xid' on an entry with invalid 'dboid'. But now we might actually need to freeze it later. Initialize them with InvalidTransactionId to begin with, to avoid that work later. Álvaro pointed this out in review of commit 8eeb4a0f7c, but I forgot to include this change there. Author: Álvaro Herrera Discussion: https://www.postgresql.org/message-id/202511071410.52ll56eyixx7@alvherre.pgsql Backpatch-through: 14 --- src/backend/commands/async.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 68ab69fc294..efa2d111a61 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -1484,6 +1484,7 @@ asyncQueueAddEntries(ListCell *nextNotify) */ qe.length = QUEUE_PAGESIZE - offset; qe.dboid = InvalidOid; + qe.xid = InvalidTransactionId; qe.data[0] = '\0'; /* empty channel */ qe.data[1] = '\0'; /* empty payload */ }