mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Logical replication
- Add PUBLICATION catalogs and DDL - Add SUBSCRIPTION catalog and DDL - Define logical replication protocol and output plugin - Add logical replication workers From: Petr Jelinek <petr@2ndquadrant.com> Reviewed-by: Steve Singer <steve@ssinger.info> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Erik Rijkers <er@xs4all.nl> Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
This commit is contained in:
@@ -1547,10 +1547,13 @@ typedef enum ObjectType
|
||||
OBJECT_OPERATOR,
|
||||
OBJECT_OPFAMILY,
|
||||
OBJECT_POLICY,
|
||||
OBJECT_PUBLICATION,
|
||||
OBJECT_PUBLICATION_REL,
|
||||
OBJECT_ROLE,
|
||||
OBJECT_RULE,
|
||||
OBJECT_SCHEMA,
|
||||
OBJECT_SEQUENCE,
|
||||
OBJECT_SUBSCRIPTION,
|
||||
OBJECT_TABCONSTRAINT,
|
||||
OBJECT_TABLE,
|
||||
OBJECT_TABLESPACE,
|
||||
@@ -3248,4 +3251,52 @@ typedef struct AlterTSConfigurationStmt
|
||||
bool missing_ok; /* for DROP - skip error if missing? */
|
||||
} AlterTSConfigurationStmt;
|
||||
|
||||
|
||||
typedef struct CreatePublicationStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *pubname; /* Name of of the publication */
|
||||
List *options; /* List of DefElem nodes */
|
||||
List *tables; /* Optional list of tables to add */
|
||||
bool for_all_tables; /* Special publication for all tables in db */
|
||||
} CreatePublicationStmt;
|
||||
|
||||
typedef struct AlterPublicationStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *pubname; /* Name of of the publication */
|
||||
|
||||
/* parameters used for ALTER PUBLICATION ... WITH */
|
||||
List *options; /* List of DefElem nodes */
|
||||
|
||||
/* parameters used for ALTER PUBLICATION ... ADD/DROP TABLE */
|
||||
List *tables; /* List of tables to add/drop */
|
||||
bool for_all_tables; /* Special publication for all tables in db */
|
||||
DefElemAction tableAction; /* What action to perform with the tables */
|
||||
} AlterPublicationStmt;
|
||||
|
||||
typedef struct CreateSubscriptionStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *subname; /* Name of of the subscription */
|
||||
char *conninfo; /* Connection string to publisher */
|
||||
List *publication; /* One or more publication to subscribe to */
|
||||
List *options; /* List of DefElem nodes */
|
||||
} CreateSubscriptionStmt;
|
||||
|
||||
typedef struct AlterSubscriptionStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *subname; /* Name of of the subscription */
|
||||
List *options; /* List of DefElem nodes */
|
||||
} AlterSubscriptionStmt;
|
||||
|
||||
typedef struct DropSubscriptionStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *subname; /* Name of of the subscription */
|
||||
bool drop_slot; /* Should we drop the slot on remote side? */
|
||||
bool missing_ok; /* Skip error if missing? */
|
||||
} DropSubscriptionStmt;
|
||||
|
||||
#endif /* PARSENODES_H */
|
||||
|
||||
Reference in New Issue
Block a user