diff options
author | Amit Kapila <akapila@postgresql.org> | 2024-04-05 09:48:49 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2024-04-05 09:48:49 +0530 |
commit | 6f132ed693b6a0be0997f092c42abf14878362ac (patch) | |
tree | a497a168c1450efbd2dc4e6ac17b5cf9d4039fa9 /doc/src | |
parent | f98dbdeb51d1175c07258cd2bd4b56f560dfc3cf (diff) | |
download | postgresql-6f132ed693b6a0be0997f092c42abf14878362ac.tar.gz postgresql-6f132ed693b6a0be0997f092c42abf14878362ac.zip |
Allow synced slots to have their inactive_since.
This commit does two things:
1) Maintains inactive_since for sync slots whenever the slot is released
just like any other regular slot.
2) Ensures the value is set to the current timestamp during the promotion
of standby to help correctly interpret the time after promotion. We don't
want the slots to appear inactive for a long time after promotion if they
haven't been synchronized recently. This would also avoid the invalidation
of such slots immediately after promotion if tomorrow we have a feature
that invalidates slots based on their inactivity time. Whoever acquires
the slot i.e. makes the slot active will reset it to NULL.
Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Amit Kapila, Shveta Malik, Masahiko Sawada
Discussion: https://postgr.es/m/CAA4eK1KrPGwfZV9LYGidjxHeW+rxJ=E2ThjXvwRGLO=iLNuo=Q@mail.gmail.com
Discussion: https://postgr.es/m/CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.com
Discussion: https://postgr.es/m/CA+Tgmob_Ta-t2ty8QrKHBGnNLrf4ZYcwhGHGFsuUoFrAEDw4sA@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/system-views.sgml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index 3c8dca8ca30..7ed617170f2 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -2530,6 +2530,13 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <para> The time since the slot has become inactive. <literal>NULL</literal> if the slot is currently being used. + Note that for slots on the standby that are being synced from a + primary server (whose <structfield>synced</structfield> field is + <literal>true</literal>), the + <structfield>inactive_since</structfield> indicates the last + synchronization (see + <xref linkend="logicaldecoding-replication-slots-synchronization"/>) + time. </para></entry> </row> |