pg_replication_origin.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_replication_origin.h
  4. * definition of the "replication origin" system catalog
  5. * (pg_replication_origin)
  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/catalog/pg_replication_origin.h
  11. *
  12. * NOTES
  13. * The Catalog.pm module reads this file and derives schema
  14. * information.
  15. *
  16. *-------------------------------------------------------------------------
  17. */
  18. #ifndef PG_REPLICATION_ORIGIN_H
  19. #define PG_REPLICATION_ORIGIN_H
  20. #include "access/xlogdefs.h"
  21. #include "catalog/genbki.h"
  22. #include "catalog/pg_replication_origin_d.h"
  23. /* ----------------
  24. * pg_replication_origin. cpp turns this into
  25. * typedef struct FormData_pg_replication_origin
  26. * ----------------
  27. */
  28. CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION
  29. {
  30. /*
  31. * Locally known id that get included into WAL.
  32. *
  33. * This should never leave the system.
  34. *
  35. * Needs to fit into an uint16, so we don't waste too much space in WAL
  36. * records. For this reason we don't use a normal Oid column here, since
  37. * we need to handle allocation of new values manually.
  38. */
  39. Oid roident;
  40. /*
  41. * Variable-length fields start here, but we allow direct access to
  42. * roname.
  43. */
  44. /* external, free-format, name */
  45. text roname BKI_FORCE_NOT_NULL;
  46. #ifdef CATALOG_VARLEN /* further variable-length fields */
  47. #endif
  48. } FormData_pg_replication_origin;
  49. typedef FormData_pg_replication_origin *Form_pg_replication_origin;
  50. DECLARE_TOAST_WITH_MACRO(pg_replication_origin, 4181, 4182, PgReplicationOriginToastTable, PgReplicationOriginToastIndex);
  51. DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, ReplicationOriginIdentIndex, on pg_replication_origin using btree(roident oid_ops));
  52. DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, ReplicationOriginNameIndex, on pg_replication_origin using btree(roname text_ops));
  53. #endif /* PG_REPLICATION_ORIGIN_H */