You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
WAL Log invalidations at command end with wal_level=logical.
When wal_level=logical, write invalidations at command end into WAL sothat decoding can use this information.This patch is required to allow the streaming of in-progress transactionsin logical decoding. The actual work to allow streaming will be committedas a separate patch.We still add the invalidations to the cache and write them to WAL atcommit time in RecordTransactionCommit(). This uses the existingXLOG_INVALIDATIONS xlog record type, from the RM_STANDBY_ID resourcemanager (see LogStandbyInvalidations for details).So existing code relying on those invalidations (e.g. redo) does not needto be changed.The invalidations written at command end uses a new xlog record typeXLOG_XACT_INVALIDATIONS, from RM_XACT_ID resource manager. SeeLogLogicalInvalidations for details.These new xlog records are ignored by existing redo procedures, whichstill rely on the invalidations written to commit records.The invalidations are decoded and accumulated in top-transaction, and thenexecuted during replay. This obviates the need to decode theinvalidations as part of a commit record.Bump XLOG_PAGE_MAGIC, since this introduces XLOG_XACT_INVALIDATIONS.Author: Dilip Kumar, Tomas Vondra, Amit KapilaReviewed-by: Amit KapilaTested-by: Neha Sharma and Mahendra Singh ThalorDiscussion:https://postgr.es/m/688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com