On Fri, Dec 29, 2023 at 02:36:19PM +0100, Matthias van de Meent wrote:
> I don't think this is an actionable change, as this wastes 4 more bytes (or
> 8 with alignment) in nearly all WAL records that don't use the
> HEAP/HEAP2/XLOG rmgrs, which would then be up to 10 (if not 14, when
> 64but-aligned) bytes per record. Unless something like [0] gets committed
> this will add a significant write overhead to all operations, even if they
> are not doing anything that needs an XID.

I was eyeing at the patches before reading your comment, and saw this
across the two patches:

@@ -176,7 +176,7 @@ struct PGPROC
        Latch           procLatch;              /* generic latch for process */
 
 
-       TransactionId xid;                      /* id of top-level transaction 
currently being
+       FullTransactionId xid;          /* id of top-level transaction 
currently being
[...]
 typedef struct XLogRecord
 {
        uint32          xl_tot_len;             /* total len of entire record */
-       TransactionId xl_xid;           /* xact id */
+       pg_crc32c       xl_crc;                 /* CRC for this record */
+       FullTransactionId xl_xid;       /* xact id */

And FWIW, echoing with Matthias, making these generic structures
arbitrary larger is a non-starter.  We should try to make them
shorter.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to