2
0

replnodes.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*-------------------------------------------------------------------------
  2. *
  3. * replnodes.h
  4. * definitions for replication grammar parse nodes
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/nodes/replnodes.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef REPLNODES_H
  15. #define REPLNODES_H
  16. #include "access/xlogdefs.h"
  17. #include "nodes/pg_list.h"
  18. typedef enum ReplicationKind
  19. {
  20. REPLICATION_KIND_PHYSICAL,
  21. REPLICATION_KIND_LOGICAL
  22. } ReplicationKind;
  23. /* ----------------------
  24. * IDENTIFY_SYSTEM command
  25. * ----------------------
  26. */
  27. typedef struct IdentifySystemCmd
  28. {
  29. NodeTag type;
  30. } IdentifySystemCmd;
  31. /* ----------------------
  32. * BASE_BACKUP command
  33. * ----------------------
  34. */
  35. typedef struct BaseBackupCmd
  36. {
  37. NodeTag type;
  38. List *options;
  39. } BaseBackupCmd;
  40. /* ----------------------
  41. * CREATE_REPLICATION_SLOT command
  42. * ----------------------
  43. */
  44. typedef struct CreateReplicationSlotCmd
  45. {
  46. NodeTag type;
  47. char *slotname;
  48. ReplicationKind kind;
  49. char *plugin;
  50. bool temporary;
  51. List *options;
  52. } CreateReplicationSlotCmd;
  53. /* ----------------------
  54. * DROP_REPLICATION_SLOT command
  55. * ----------------------
  56. */
  57. typedef struct DropReplicationSlotCmd
  58. {
  59. NodeTag type;
  60. char *slotname;
  61. bool wait;
  62. } DropReplicationSlotCmd;
  63. /* ----------------------
  64. * START_REPLICATION command
  65. * ----------------------
  66. */
  67. typedef struct StartReplicationCmd
  68. {
  69. NodeTag type;
  70. ReplicationKind kind;
  71. char *slotname;
  72. TimeLineID timeline;
  73. XLogRecPtr startpoint;
  74. List *options;
  75. } StartReplicationCmd;
  76. /* ----------------------
  77. * READ_REPLICATION_SLOT command
  78. * ----------------------
  79. */
  80. typedef struct ReadReplicationSlotCmd
  81. {
  82. NodeTag type;
  83. char *slotname;
  84. } ReadReplicationSlotCmd;
  85. /* ----------------------
  86. * TIMELINE_HISTORY command
  87. * ----------------------
  88. */
  89. typedef struct TimeLineHistoryCmd
  90. {
  91. NodeTag type;
  92. TimeLineID timeline;
  93. } TimeLineHistoryCmd;
  94. #endif /* REPLNODES_H */