postgresql/src/include/catalog
Alexander Korotkov 06c418e163 Implement pg_wal_replay_wait() stored procedure
pg_wal_replay_wait() is to be used on standby and specifies waiting for
the specific WAL location to be replayed before starting the transaction.
This option is useful when the user makes some data changes on primary and
needs a guarantee to see these changes on standby.

The queue of waiters is stored in the shared memory array sorted by LSN.
During replay of WAL waiters whose LSNs are already replayed are deleted from
the shared memory array and woken up by setting of their latches.

pg_wal_replay_wait() needs to wait without any snapshot held.  Otherwise,
the snapshot could prevent the replay of WAL records implying a kind of
self-deadlock.  This is why it is only possible to implement
pg_wal_replay_wait() as a procedure working in a non-atomic context,
not a function.

Catversion is bumped.

Discussion: https://postgr.es/m/eb12f9b03851bb2583adab5df9579b4b%40postgrespro.ru
Author: Kartyshov Ivan, Alexander Korotkov
Reviewed-by: Michael Paquier, Peter Eisentraut, Dilip Kumar, Amit Kapila
Reviewed-by: Alexander Lakhin, Bharath Rupireddy, Euler Taveira
2024-04-02 22:48:03 +03:00
..
.gitignore Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
Makefile Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
binary_upgrade.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
catalog.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
catversion.h Implement pg_wal_replay_wait() stored procedure 2024-04-02 22:48:03 +03:00
dependency.h Remove ObjectClass type 2024-03-26 10:08:56 +01:00
duplicate_oids Update copyright for 2024 2024-01-03 20:49:05 -05:00
genbki.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
heap.h Generalize handling of nullable pg_attribute columns in DDL 2024-03-17 12:30:51 +01:00
index.h Add attstattarget to FormExtraData_pg_attribute 2024-03-17 12:38:27 +01:00
indexing.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
namespace.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
objectaccess.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
objectaddress.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
partition.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_aggregate.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_aggregate.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_am.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_am.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_amop.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_amop.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_amproc.dat Add stratnum GiST support function 2024-01-19 15:42:13 +01:00
pg_amproc.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_attrdef.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_attribute.h Add attstattarget to FormExtraData_pg_attribute 2024-03-17 12:38:27 +01:00
pg_auth_members.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_authid.dat Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
pg_authid.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_cast.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_cast.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_class.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_class.h Allow specifying an access method for partitioned tables 2024-03-25 16:30:36 +01:00
pg_collation.dat Use version for builtin collations. 2024-03-29 10:53:26 -07:00
pg_collation.h Introduce "builtin" collation provider. 2024-03-13 23:33:44 -07:00
pg_constraint.h Add temporal FOREIGN KEY contraints 2024-03-24 07:37:13 +01:00
pg_control.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_conversion.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_conversion.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_database.dat Catalog changes preparing for builtin collation provider. 2024-03-09 14:48:18 -08:00
pg_database.h Catalog changes preparing for builtin collation provider. 2024-03-09 14:48:18 -08:00
pg_db_role_setting.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_default_acl.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_depend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_description.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_enum.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_event_trigger.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_extension.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_foreign_data_wrapper.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_foreign_server.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_foreign_table.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_index.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_inherits.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_init_privs.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_language.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_language.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_largeobject.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_largeobject_metadata.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_namespace.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_namespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_opclass.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_opclass.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_operator.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_operator.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_opfamily.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_opfamily.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_parameter_acl.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_partitioned_table.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_policy.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_proc.dat Implement pg_wal_replay_wait() stored procedure 2024-04-02 22:48:03 +03:00
pg_proc.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication_namespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_publication_rel.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_range.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_range.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_replication_origin.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_rewrite.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_seclabel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_sequence.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_shdepend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_shdescription.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_shseclabel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_statistic.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_statistic_ext.h Make stxstattarget nullable 2024-03-17 12:26:26 +01:00
pg_statistic_ext_data.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_subscription.h Add a failover option to subscriptions. 2024-01-30 16:49:28 +05:30
pg_subscription_rel.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_tablespace.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_tablespace.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_transform.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_trigger.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_config_map.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_config_map.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_dict.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_dict.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_parser.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_parser.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_ts_template.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_ts_template.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
pg_type.dat Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_type.h Revert "Improve compression and storage support with inheritance" 2024-02-20 11:10:59 +01:00
pg_user_mapping.h Generate syscache info from catalog files 2024-01-23 07:31:06 +01:00
reformat_dat_file.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
renumber_oids.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage_xlog.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
toasting.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unused_oids Update copyright for 2024 2024-01-03 20:49:05 -05:00