mirror of
https://github.com/postgres/postgres.git
synced 2026-02-11 14:53:31 -05:00
Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.
Notably, it seems some people didn't absorb the style rules of
commit c9d297751, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
45 lines
1.5 KiB
C
45 lines
1.5 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* logicalrelation.h
|
|
* Relation definitions for logical replication relation mapping.
|
|
*
|
|
* Portions Copyright (c) 2016-2020, PostgreSQL Global Development Group
|
|
*
|
|
* src/include/replication/logicalrelation.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef LOGICALRELATION_H
|
|
#define LOGICALRELATION_H
|
|
|
|
#include "access/attmap.h"
|
|
#include "replication/logicalproto.h"
|
|
|
|
typedef struct LogicalRepRelMapEntry
|
|
{
|
|
LogicalRepRelation remoterel; /* key is remoterel.remoteid */
|
|
|
|
/* Mapping to local relation, filled as needed. */
|
|
Oid localreloid; /* local relation id */
|
|
Relation localrel; /* relcache entry */
|
|
AttrMap *attrmap; /* map of local attributes to remote ones */
|
|
bool updatable; /* Can apply updates/deletes? */
|
|
|
|
/* Sync state. */
|
|
char state;
|
|
XLogRecPtr statelsn;
|
|
} LogicalRepRelMapEntry;
|
|
|
|
extern void logicalrep_relmap_update(LogicalRepRelation *remoterel);
|
|
|
|
extern LogicalRepRelMapEntry *logicalrep_rel_open(LogicalRepRelId remoteid,
|
|
LOCKMODE lockmode);
|
|
extern LogicalRepRelMapEntry *logicalrep_partition_open(LogicalRepRelMapEntry *root,
|
|
Relation partrel, AttrMap *map);
|
|
extern void logicalrep_rel_close(LogicalRepRelMapEntry *rel,
|
|
LOCKMODE lockmode);
|
|
|
|
extern void logicalrep_typmap_update(LogicalRepTyp *remotetyp);
|
|
extern char *logicalrep_typmap_gettypname(Oid remoteid);
|
|
|
|
#endif /* LOGICALRELATION_H */
|