From 66abc2608c7c00fcd449e00a9e23f13f02e65d04 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 10 Dec 2013 19:17:34 -0500 Subject: 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. --- src/backend/access/common/reloptions.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/backend/access/common') diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index b5fd30a4f95..31941e99edb 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -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); -- cgit v1.2.3