mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Simplify printing of LSNs
Add a macro LSN_FORMAT_ARGS for use in printf-style printing of LSNs. Convert all applicable code to use it. Reviewed-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/CAExHW5ub5NaTELZ3hJUCE6amuvqAtsSxc7O+uK7y4t9Rrk23cw@mail.gmail.com
This commit is contained in:
@@ -35,6 +35,13 @@ typedef uint64 XLogRecPtr;
|
||||
*/
|
||||
#define FirstNormalUnloggedLSN ((XLogRecPtr) 1000)
|
||||
|
||||
/*
|
||||
* Handy macro for printing XLogRecPtr in conventional format, e.g.,
|
||||
*
|
||||
* printf("%X/%X", LSN_FORMAT_ARGS(lsn));
|
||||
*/
|
||||
#define LSN_FORMAT_ARGS(lsn) (AssertVariableIsOfTypeMacro((lsn), XLogRecPtr), (uint32) ((lsn) >> 32)), ((uint32) (lsn))
|
||||
|
||||
/*
|
||||
* XLogSegNo - physical log file sequence number.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user