pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: doc: add transaction processing chapter with internals info
7+ messages / 2 participants
[nested] [flat]
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
2023-04-23 03:11 ` Re: pgsql: doc: add transaction processing chapter with internals info Peter Geoghegan <pg@bowt.ie>
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/66bc9d2d3e57acca20bcb0b6deb225abb01384bf
Modified Files
--------------
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/datatype.sgml | 3 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/func.sgml | 20 +++-
doc/src/sgml/glossary.sgml | 3 +-
doc/src/sgml/monitoring.sgml | 6 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback.sgml | 8 +-
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/system-views.sgml | 7 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 205 ++++++++++++++++++++++++++++++++
14 files changed, 292 insertions(+), 44 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pgsql: doc: add transaction processing chapter with internals info
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
@ 2023-04-23 03:11 ` Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 7+ messages in thread
From: Peter Geoghegan @ 2023-04-23 03:11 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-committers@lists.postgresql.org
On Tue, Nov 29, 2022 at 5:50 PM Bruce Momjian <bruce@momjian.us> wrote:
> doc: add transaction processing chapter with internals info
This patch added something about 32-bit transaction IDs:
+ <para>
+ The internal transaction ID type <type>xid</type> is 32 bits wide
+ and <link linkend="vacuum-for-wraparound">wraps around</link> every
+ 4 billion transactions. A 32-bit epoch is incremented during each
+ wraparound. There is also a 64-bit type <type>xid8</type> which
+ includes this epoch and therefore does not wrap around during the
+ life of an installation; it can be converted to xid by casting.
+ The functions in <xref linkend="functions-pg-snapshot"/>
+ return <type>xid8</type> values. Xids are used as the
+ basis for <productname>PostgreSQL</productname>'s <link
+ linkend="mvcc">MVCC</link> concurrency mechanism and streaming
+ replication.
+ </para>
(I noticed this during unrelated work on the VACUUM documentation,
with a focus on freezing.)
I think that it's quite reasonable to point out that there are
"truncated" 32-bit and 64-bit forms of XIDs, since advanced users are
likely to encounter both forms. However, I wonder why you're linking
to "vacuum-for-wraparound" here. What's it adding?
While it is of course true that freezing (and autovacuums to prevent
wraparound) are not *completely* unrelated, they're still very far
removed from what this is talking about. I think that it's just
confusing to connect the two issues.
The condition that is sometimes called "wraparound failure"
(internally referred to as the xidStopLimit mechanism) triggers when
the oldest relfrozenxid is a little over 2 billion XIDs old -- not 4
billion XIDs old. My concern is that the reader will conflate
wraparound of integers (a property of how unsigned 32-bit integers
work that can affect any individual integer) with something much more
specific to Postgres (confusion about whether some XID is in the past
or in the future, which is a problem that used to occur that affected
the system's ability to keep track of the logical state of the
database as a whole).
You're talking about how a 32-bit XID and a 32-bit epoch map directly
to a 64-bit transaction ID -- which does make sense. But why do you
need to talk about something that VACUUM does that is (in part) needed
to avoid storing an epoch inside every tuple header? The on-disk XIDs
in tuple headers *don't* ever wraparound -- they get frozen (or maybe
in extreme cases they prevent new XIDs from being allocated and
creating confusion about the past and the future).
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8592b56faf86be1a8684544ad3a93e2fe8f5aa1b
Modified Files
--------------
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/datatype.sgml | 3 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/func.sgml | 20 +++-
doc/src/sgml/glossary.sgml | 3 +-
doc/src/sgml/monitoring.sgml | 6 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback.sgml | 8 +-
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/system-views.sgml | 7 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 205 ++++++++++++++++++++++++++++++++
14 files changed, 292 insertions(+), 44 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/5d208b90b75b00ff96095e4402a7cfa55f65f2ac
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 7 +-
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/datatype.sgml | 3 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/func.sgml | 20 +++-
doc/src/sgml/glossary.sgml | 3 +-
doc/src/sgml/monitoring.sgml | 6 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback.sgml | 8 +-
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 205 ++++++++++++++++++++++++++++++++
14 files changed, 292 insertions(+), 44 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4df5462f345b5e50cedf42300cad8616c7df3f6d
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 7 +-
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/datatype.sgml | 3 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/func.sgml | 20 +++-
doc/src/sgml/glossary.sgml | 3 +-
doc/src/sgml/monitoring.sgml | 6 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback.sgml | 8 +-
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 205 ++++++++++++++++++++++++++++++++
14 files changed, 292 insertions(+), 44 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7b96f525cdec1b59c229457099653de254f9ddbf
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 7 +-
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/monitoring.sgml | 3 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback.sgml | 8 +-
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 200 ++++++++++++++++++++++++++++++++
11 files changed, 266 insertions(+), 36 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: doc: add transaction processing chapter with internals info
@ 2022-11-30 01:50 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2022-11-30 01:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add transaction processing chapter with internals info
This also adds references to this new chapter at relevant sections of
our documentation. Previously much of these internal details were
exposed to users, but not explained. This also updates RELEASE
SAVEPOINT.
Discussion: https://postgr.es/m/CANbhV-E_iy9fmrErxrCh8TZTyenpfo72Hf_XD2HLDppva4dUNA@mail.gmail.com
Author: Simon Riggs, Laurenz Albe
Reviewed-by: Bruce Momjian
Backpatch-through: 11
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/80e591676bf374c632cfec1b61fde0ca468988f8
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 7 +-
doc/src/sgml/config.sgml | 6 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/monitoring.sgml | 3 +-
doc/src/sgml/pgrowlocks.sgml | 3 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/release_savepoint.sgml | 62 ++++++----
doc/src/sgml/ref/rollback_to.sgml | 5 +-
doc/src/sgml/wal.sgml | 6 +-
doc/src/sgml/xact.sgml | 200 ++++++++++++++++++++++++++++++++
10 files changed, 262 insertions(+), 32 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2023-04-23 03:11 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
2023-04-23 03:11 ` Re: pgsql: doc: add transaction processing chapter with internals info Peter Geoghegan <pg@bowt.ie>
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
2022-11-30 01:50 pgsql: doc: add transaction processing chapter with internals info Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox