Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid
Дата
Msg-id ZZC5cJTKgYcdWOvz@paquier.xyz
обсуждение исходный текст
Ответ на Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid  (Maxim Orlov <orlovmg@gmail.com>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Add PQsendSyncMessage() to libpq
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Commitfest 2024-01 starting in 3 days!