PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pg_replication_origin.h
Go to the documentation of this file.
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-2025, 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
21#include "access/xlogdefs.h"
22#include "catalog/genbki.h"
23#include "catalog/pg_replication_origin_d.h" /* IWYU pragma: export */
24
25/* ----------------
26 * pg_replication_origin. cpp turns this into
27 * typedef struct FormData_pg_replication_origin
28 * ----------------
29 */
30CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION
31{
32 /*
33 * Locally known id that get included into WAL.
34 *
35 * This should never leave the system.
36 *
37 * Needs to fit into an uint16, so we don't waste too much space in WAL
38 * records. For this reason we don't use a normal Oid column here, since
39 * we need to handle allocation of new values manually.
40 */
41 Oid roident;
42
43 /*
44 * Variable-length fields start here, but we allow direct access to
45 * roname.
46 */
47
48 /* external, free-format, name */
50
51#ifdef CATALOG_VARLEN /* further variable-length fields */
52#endif
54
56
57DECLARE_TOAST_WITH_MACRO(pg_replication_origin, 4181, 4182, PgReplicationOriginToastTable, PgReplicationOriginToastIndex);
58
59DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, ReplicationOriginIdentIndex, pg_replication_origin, btree(roident oid_ops));
60DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, ReplicationOriginNameIndex, pg_replication_origin, btree(roname text_ops));
61
62MAKE_SYSCACHE(REPLORIGIDENT, pg_replication_origin_roiident_index, 16);
63MAKE_SYSCACHE(REPLORIGNAME, pg_replication_origin_roname_index, 16);
64
65#endif /* PG_REPLICATION_ORIGIN_H */
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:33
#define BKI_SHARED_RELATION
Definition: genbki.h:27
MAKE_SYSCACHE(REPLORIGIDENT, pg_replication_origin_roiident_index, 16)
FormData_pg_replication_origin * Form_pg_replication_origin
FormData_pg_replication_origin
DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, ReplicationOriginIdentIndex, pg_replication_origin, btree(roident oid_ops))
DECLARE_TOAST_WITH_MACRO(pg_replication_origin, 4181, 4182, PgReplicationOriginToastTable, PgReplicationOriginToastIndex)
DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, ReplicationOriginNameIndex, pg_replication_origin, btree(roname text_ops))
CATALOG(pg_replication_origin, 6000, ReplicationOriginRelationId) BKI_SHARED_RELATION
unsigned int Oid
Definition: postgres_ext.h:32
Definition: c.h:658