Files
postgresql/src/include/nodes/replnodes.h
Amit Kapila 7329240437 Allow setting failover property in the replication command.
This commit implements a new replication command called
ALTER_REPLICATION_SLOT and a corresponding walreceiver API function named
walrcv_alter_slot. Additionally, the CREATE_REPLICATION_SLOT command has
been extended to support the failover option.

These new additions allow the modification of the failover property of a
replication slot on the publisher. A subsequent commit will make use of
these commands in subscription commands and will add the tests as well to
cover the functionality added/changed by this commit.

Author: Hou Zhijie, Shveta Malik
Reviewed-by: Peter Smith, Bertrand Drouvot, Dilip Kumar, Masahiko Sawada, Nisha Moond, Kuroda, Hayato, Amit Kapila
Discussion: https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com
2024-01-29 09:37:23 +05:30

133 lines
2.4 KiB
C

/*-------------------------------------------------------------------------
*
* replnodes.h
* definitions for replication grammar parse nodes
*
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/nodes/replnodes.h
*
*-------------------------------------------------------------------------
*/
#ifndef REPLNODES_H
#define REPLNODES_H
#include "access/xlogdefs.h"
#include "nodes/pg_list.h"
typedef enum ReplicationKind
{
REPLICATION_KIND_PHYSICAL,
REPLICATION_KIND_LOGICAL,
} ReplicationKind;
/* ----------------------
* IDENTIFY_SYSTEM command
* ----------------------
*/
typedef struct IdentifySystemCmd
{
NodeTag type;
} IdentifySystemCmd;
/* ----------------------
* BASE_BACKUP command
* ----------------------
*/
typedef struct BaseBackupCmd
{
NodeTag type;
List *options;
} BaseBackupCmd;
/* ----------------------
* CREATE_REPLICATION_SLOT command
* ----------------------
*/
typedef struct CreateReplicationSlotCmd
{
NodeTag type;
char *slotname;
ReplicationKind kind;
char *plugin;
bool temporary;
List *options;
} CreateReplicationSlotCmd;
/* ----------------------
* DROP_REPLICATION_SLOT command
* ----------------------
*/
typedef struct DropReplicationSlotCmd
{
NodeTag type;
char *slotname;
bool wait;
} DropReplicationSlotCmd;
/* ----------------------
* ALTER_REPLICATION_SLOT command
* ----------------------
*/
typedef struct AlterReplicationSlotCmd
{
NodeTag type;
char *slotname;
List *options;
} AlterReplicationSlotCmd;
/* ----------------------
* START_REPLICATION command
* ----------------------
*/
typedef struct StartReplicationCmd
{
NodeTag type;
ReplicationKind kind;
char *slotname;
TimeLineID timeline;
XLogRecPtr startpoint;
List *options;
} StartReplicationCmd;
/* ----------------------
* READ_REPLICATION_SLOT command
* ----------------------
*/
typedef struct ReadReplicationSlotCmd
{
NodeTag type;
char *slotname;
} ReadReplicationSlotCmd;
/* ----------------------
* TIMELINE_HISTORY command
* ----------------------
*/
typedef struct TimeLineHistoryCmd
{
NodeTag type;
TimeLineID timeline;
} TimeLineHistoryCmd;
/* ----------------------
* UPLOAD_MANIFEST command
* ----------------------
*/
typedef struct UploadManifestCmd
{
NodeTag type;
} UploadManifestCmd;
#endif /* REPLNODES_H */