diff options
| author | Michael Paquier | 2024-08-29 23:49:24 +0000 |
|---|---|---|
| committer | Michael Paquier | 2024-08-29 23:49:24 +0000 |
| commit | a83a944e9fdd573802c82d961126ba07bfb65f98 (patch) | |
| tree | 0d72e09dd3d9acc8b40537b064da18d49d787b00 /src/include | |
| parent | 43f2e7634d838b39fd3fa3aaddb6964392d98312 (diff) | |
Rename pg_sequence_read_tuple() to pg_get_sequence_data()
This commit removes log_cnt from the tuple returned by the SQL function.
This field is an internal counter that tracks when a WAL record should
be generated for a sequence, and it is reset each time the sequence is
restored or recovered. It is not necessary to rebuild the sequence DDL
commands for pg_dump and pg_upgrade where this function is used. The
field can still be queried with a scan of the "table" created
under-the-hood for a sequence.
Issue noticed while hacking on a feature that can rely on this new
function rather than pg_sequence_last_value(), aimed at making sequence
computation more easily pluggable.
Bump catalog version.
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/Zsvka3r-y2ZoXAdH@paquier.xyz
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
| -rw-r--r-- | src/include/catalog/pg_proc.dat | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 9a0ae278239..1980d492c3d 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202408122 +#define CATALOG_VERSION_NO 202408301 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 4abc6d95262..85f42be1b3c 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -3330,11 +3330,11 @@ prorettype => 'int8', proargtypes => 'regclass', prosrc => 'pg_sequence_last_value' }, { oid => '9876', descr => 'return sequence tuple, for use by pg_dump', - proname => 'pg_sequence_read_tuple', provolatile => 'v', proparallel => 'u', + proname => 'pg_get_sequence_data', provolatile => 'v', proparallel => 'u', prorettype => 'record', proargtypes => 'regclass', - proallargtypes => '{regclass,int8,int8,bool}', proargmodes => '{i,o,o,o}', - proargnames => '{sequence_oid,last_value,log_cnt,is_called}', - prosrc => 'pg_sequence_read_tuple' }, + proallargtypes => '{regclass,int8,bool}', proargmodes => '{i,o,o}', + proargnames => '{sequence_oid,last_value,is_called}', + prosrc => 'pg_get_sequence_data' }, { oid => '275', descr => 'return the next oid for a system table', proname => 'pg_nextoid', provolatile => 'v', proparallel => 'u', |
