Skip to content

Commit 84f1bf4

Browse files
committed
Clear 'xid' in dummy async notify entries written to fill up pages
Before we started to freeze async notify entries (commit 8eeb4a0), 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 8eeb4a0, but I forgot to include this change there. Author: Álvaro Herrera <alvherre@kurilemu.de> Discussion: https://www.postgresql.org/message-id/202511071410.52ll56eyixx7@alvherre.pgsql Backpatch-through: 14
1 parent c2e58c0 commit 84f1bf4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/commands/async.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,7 @@ asyncQueueAddEntries(ListCell *nextNotify)
14841484
*/
14851485
qe.length = QUEUE_PAGESIZE - offset;
14861486
qe.dboid = InvalidOid;
1487+
qe.xid = InvalidTransactionId;
14871488
qe.data[0] = '\0'; /* empty channel */
14881489
qe.data[1] = '\0'; /* empty payload */
14891490
}

0 commit comments

Comments
 (0)