mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Clear 'xid' in dummy async notify entries written to fill up pages
Before we started to freeze async notify entries (commit8eeb4a0f7c), 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 commit8eeb4a0f7c, 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
This commit is contained in:
@@ -1418,6 +1418,7 @@ asyncQueueAddEntries(ListCell *nextNotify)
|
|||||||
*/
|
*/
|
||||||
qe.length = QUEUE_PAGESIZE - offset;
|
qe.length = QUEUE_PAGESIZE - offset;
|
||||||
qe.dboid = InvalidOid;
|
qe.dboid = InvalidOid;
|
||||||
|
qe.xid = InvalidTransactionId;
|
||||||
qe.data[0] = '\0'; /* empty channel */
|
qe.data[0] = '\0'; /* empty channel */
|
||||||
qe.data[1] = '\0'; /* empty payload */
|
qe.data[1] = '\0'; /* empty payload */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user