gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 line
1.3KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * logicalrelation.h
  4. * Relation definitions for logical replication relation mapping.
  5. *
  6. * Portions Copyright (c) 2016-2019, PostgreSQL Global Development Group
  7. *
  8. * src/include/replication/logicalrelation.h
  9. *
  10. *-------------------------------------------------------------------------
  11. */
  12. #ifndef LOGICALRELATION_H
  13. #define LOGICALRELATION_H
  14. #include "replication/logicalproto.h"
  15. typedef struct LogicalRepRelMapEntry
  16. {
  17. LogicalRepRelation remoterel; /* key is remoterel.remoteid */
  18. /* Mapping to local relation, filled as needed. */
  19. Oid localreloid; /* local relation id */
  20. Relation localrel; /* relcache entry */
  21. AttrNumber *attrmap; /* map of local attributes to remote ones */
  22. bool updatable; /* Can apply updates/deletes? */
  23. /* Sync state. */
  24. char state;
  25. XLogRecPtr statelsn;
  26. } LogicalRepRelMapEntry;
  27. extern void logicalrep_relmap_update(LogicalRepRelation *remoterel);
  28. extern LogicalRepRelMapEntry *logicalrep_rel_open(LogicalRepRelId remoteid,
  29. LOCKMODE lockmode);
  30. extern void logicalrep_rel_close(LogicalRepRelMapEntry *rel,
  31. LOCKMODE lockmode);
  32. extern void logicalrep_typmap_update(LogicalRepTyp *remotetyp);
  33. extern char *logicalrep_typmap_gettypname(Oid remoteid);
  34. #endif /* LOGICALRELATION_H */
上海开阖软件有限公司 沪ICP备12045867号-1