replnodes.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*-------------------------------------------------------------------------
  2. *
  3. * replnodes.h
  4. * definitions for replication grammar parse nodes
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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 reserve_wal;
  51. } CreateReplicationSlotCmd;
  52. /* ----------------------
  53. * DROP_REPLICATION_SLOT command
  54. * ----------------------
  55. */
  56. typedef struct DropReplicationSlotCmd
  57. {
  58. NodeTag type;
  59. char *slotname;
  60. } DropReplicationSlotCmd;
  61. /* ----------------------
  62. * START_REPLICATION command
  63. * ----------------------
  64. */
  65. typedef struct StartReplicationCmd
  66. {
  67. NodeTag type;
  68. ReplicationKind kind;
  69. char *slotname;
  70. TimeLineID timeline;
  71. XLogRecPtr startpoint;
  72. List *options;
  73. } StartReplicationCmd;
  74. /* ----------------------
  75. * TIMELINE_HISTORY command
  76. * ----------------------
  77. */
  78. typedef struct TimeLineHistoryCmd
  79. {
  80. NodeTag type;
  81. TimeLineID timeline;
  82. } TimeLineHistoryCmd;
  83. #endif /* REPLNODES_H */