mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Add a new reloption, user_catalog_table.
When this reloption is set and wal_level=logical is configured, we'll record the CIDs stamped by inserts, updates, and deletes to the table just as we would for an actual catalog table. This will allow logical decoding to use historical MVCC snapshots to access such tables just as they access ordinary catalog tables. Replication solutions built around the logical decoding machinery will likely need to set this operation for their configuration tables; it might also be needed by extensions which perform table access in their output functions. Andres Freund, reviewed by myself and others.
This commit is contained in:
@ -61,6 +61,14 @@ static relopt_bool boolRelOpts[] =
|
||||
},
|
||||
true
|
||||
},
|
||||
{
|
||||
{
|
||||
"user_catalog_table",
|
||||
"Declare a table as an additional catalog table, e.g. for the purpose of logical replication",
|
||||
RELOPT_KIND_HEAP
|
||||
},
|
||||
false
|
||||
},
|
||||
{
|
||||
{
|
||||
"fastupdate",
|
||||
@ -1166,6 +1174,8 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
|
||||
offsetof(StdRdOptions, security_barrier)},
|
||||
{"check_option", RELOPT_TYPE_STRING,
|
||||
offsetof(StdRdOptions, check_option_offset)},
|
||||
{"user_catalog_table", RELOPT_TYPE_BOOL,
|
||||
offsetof(StdRdOptions, user_catalog_table)}
|
||||
};
|
||||
|
||||
options = parseRelOptions(reloptions, validate, kind, &numoptions);
|
||||
|
Reference in New Issue
Block a user