Skip to content

Commit 0e8eaa2

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 44e8c60 commit 0e8eaa2

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
@@ -1470,6 +1470,7 @@ asyncQueueAddEntries(ListCell *nextNotify)
14701470
*/
14711471
qe.length = QUEUE_PAGESIZE - offset;
14721472
qe.dboid = InvalidOid;
1473+
qe.xid = InvalidTransactionId;
14731474
qe.data[0] = '\0'; /* empty channel */
14741475
qe.data[1] = '\0'; /* empty payload */
14751476
}

0 commit comments

Comments
 (0)