diff options
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/brin_xlog.h | 2 | ||||
| -rw-r--r-- | src/include/access/ginxlog.h | 4 | ||||
| -rw-r--r-- | src/include/access/gistxlog.h | 2 | ||||
| -rw-r--r-- | src/include/access/heapam_xlog.h | 8 | ||||
| -rw-r--r-- | src/include/access/nbtxlog.h | 4 | ||||
| -rw-r--r-- | src/include/access/rewriteheap.h | 6 | ||||
| -rw-r--r-- | src/include/access/tableam.h | 59 | ||||
| -rw-r--r-- | src/include/access/xact.h | 26 | ||||
| -rw-r--r-- | src/include/access/xlog_internal.h | 2 | ||||
| -rw-r--r-- | src/include/access/xloginsert.h | 8 | ||||
| -rw-r--r-- | src/include/access/xlogreader.h | 6 | ||||
| -rw-r--r-- | src/include/access/xlogrecord.h | 9 | ||||
| -rw-r--r-- | src/include/access/xlogutils.h | 8 |
13 files changed, 73 insertions, 71 deletions
diff --git a/src/include/access/brin_xlog.h b/src/include/access/brin_xlog.h index 95bfc7e857..012a9afdf4 100644 --- a/src/include/access/brin_xlog.h +++ b/src/include/access/brin_xlog.h @@ -18,7 +18,7 @@ #include "lib/stringinfo.h" #include "storage/bufpage.h" #include "storage/itemptr.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" #include "utils/relcache.h" diff --git a/src/include/access/ginxlog.h b/src/include/access/ginxlog.h index 21de389d79..7f985039bb 100644 --- a/src/include/access/ginxlog.h +++ b/src/include/access/ginxlog.h @@ -110,7 +110,7 @@ typedef struct typedef struct ginxlogSplit { - RelFileNode node; + RelFileLocator locator; BlockNumber rrlink; /* right link, or root's blocknumber if root * split */ BlockNumber leftChildBlkno; /* valid on a non-leaf split */ @@ -167,7 +167,7 @@ typedef struct ginxlogDeletePage */ typedef struct ginxlogUpdateMeta { - RelFileNode node; + RelFileLocator locator; GinMetaPageData metadata; BlockNumber prevTail; BlockNumber newRightlink; diff --git a/src/include/access/gistxlog.h b/src/include/access/gistxlog.h index 4537e67eba..9bbe4c2622 100644 --- a/src/include/access/gistxlog.h +++ b/src/include/access/gistxlog.h @@ -97,7 +97,7 @@ typedef struct gistxlogPageDelete */ typedef struct gistxlogPageReuse { - RelFileNode node; + RelFileLocator locator; BlockNumber block; FullTransactionId latestRemovedFullXid; } gistxlogPageReuse; diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h index 2d8a7f6270..1705e736be 100644 --- a/src/include/access/heapam_xlog.h +++ b/src/include/access/heapam_xlog.h @@ -19,7 +19,7 @@ #include "lib/stringinfo.h" #include "storage/buf.h" #include "storage/bufpage.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" #include "utils/relcache.h" @@ -370,9 +370,9 @@ typedef struct xl_heap_new_cid CommandId combocid; /* just for debugging */ /* - * Store the relfilenode/ctid pair to facilitate lookups. + * Store the relfilelocator/ctid pair to facilitate lookups. */ - RelFileNode target_node; + RelFileLocator target_locator; ItemPointerData target_tid; } xl_heap_new_cid; @@ -415,7 +415,7 @@ extern bool heap_prepare_freeze_tuple(HeapTupleHeader tuple, MultiXactId *relminmxid_out); extern void heap_execute_freeze_tuple(HeapTupleHeader tuple, xl_heap_freeze_tuple *xlrec_tp); -extern XLogRecPtr log_heap_visible(RelFileNode rnode, Buffer heap_buffer, +extern XLogRecPtr log_heap_visible(RelFileLocator rlocator, Buffer heap_buffer, Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags); #endif /* HEAPAM_XLOG_H */ diff --git a/src/include/access/nbtxlog.h b/src/include/access/nbtxlog.h index de362d3cb9..d79489efe4 100644 --- a/src/include/access/nbtxlog.h +++ b/src/include/access/nbtxlog.h @@ -180,12 +180,12 @@ typedef struct xl_btree_dedup * This is what we need to know about page reuse within btree. This record * only exists to generate a conflict point for Hot Standby. * - * Note that we must include a RelFileNode in the record because we don't + * Note that we must include a RelFileLocator in the record because we don't * actually register the buffer with the record. */ typedef struct xl_btree_reuse_page { - RelFileNode node; + RelFileLocator locator; BlockNumber block; FullTransactionId latestRemovedFullXid; } xl_btree_reuse_page; diff --git a/src/include/access/rewriteheap.h b/src/include/access/rewriteheap.h index 3e27790b3f..353cbb2924 100644 --- a/src/include/access/rewriteheap.h +++ b/src/include/access/rewriteheap.h @@ -15,7 +15,7 @@ #include "access/htup.h" #include "storage/itemptr.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" #include "utils/relcache.h" /* struct definition is private to rewriteheap.c */ @@ -34,8 +34,8 @@ extern bool rewrite_heap_dead_tuple(RewriteState state, HeapTuple oldTuple); */ typedef struct LogicalRewriteMappingData { - RelFileNode old_node; - RelFileNode new_node; + RelFileLocator old_locator; + RelFileLocator new_locator; ItemPointerData old_tid; ItemPointerData new_tid; } LogicalRewriteMappingData; diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h index fe869c6c18..9df4e7cb0a 100644 --- a/src/include/access/tableam.h +++ b/src/include/access/tableam.h @@ -560,32 +560,32 @@ typedef struct TableAmRoutine */ /* - * This callback needs to create a new relation filenode for `rel`, with + * This callback needs to create new relation storage for `rel`, with * appropriate durability behaviour for `persistence`. * * Note that only the subset of the relcache filled by * RelationBuildLocalRelation() can be relied upon and that the relation's * catalog entries will either not yet exist (new relation), or will still - * reference the old relfilenode. + * reference the old relfilelocator. * * As output *freezeXid, *minmulti must be set to the values appropriate * for pg_class.{relfrozenxid, relminmxid}. For AMs that don't need those * fields to be filled they can be set to InvalidTransactionId and * InvalidMultiXactId, respectively. * - * See also table_relation_set_new_filenode(). + * See also table_relation_set_new_filelocator(). */ - void (*relation_set_new_filenode) (Relation rel, - const RelFileNode *newrnode, - char persistence, - TransactionId *freezeXid, - MultiXactId *minmulti); + void (*relation_set_new_filelocator) (Relation rel, + const RelFileLocator *newrlocator, + char persistence, + TransactionId *freezeXid, + MultiXactId *minmulti); /* * This callback needs to remove all contents from `rel`'s current - * relfilenode. No provisions for transactional behaviour need to be made. - * Often this can be implemented by truncating the underlying storage to - * its minimal size. + * relfilelocator. No provisions for transactional behaviour need to be + * made. Often this can be implemented by truncating the underlying + * storage to its minimal size. * * See also table_relation_nontransactional_truncate(). */ @@ -598,7 +598,7 @@ typedef struct TableAmRoutine * storage, unless it contains references to the tablespace internally. */ void (*relation_copy_data) (Relation rel, - const RelFileNode *newrnode); + const RelFileLocator *newrlocator); /* See table_relation_copy_for_cluster() */ void (*relation_copy_for_cluster) (Relation NewTable, @@ -1348,7 +1348,7 @@ table_index_delete_tuples(Relation rel, TM_IndexDeleteOp *delstate) * RelationGetBufferForTuple. See that method for more information. * * TABLE_INSERT_FROZEN should only be specified for inserts into - * relfilenodes created during the current subtransaction and when + * relation storage created during the current subtransaction and when * there are no prior snapshots or pre-existing portals open. * This causes rows to be frozen, which is an MVCC violation and * requires explicit options chosen by user. @@ -1577,33 +1577,34 @@ table_finish_bulk_insert(Relation rel, int options) */ /* - * Create storage for `rel` in `newrnode`, with persistence set to + * Create storage for `rel` in `newrlocator`, with persistence set to * `persistence`. * * This is used both during relation creation and various DDL operations to - * create a new relfilenode that can be filled from scratch. When creating - * new storage for an existing relfilenode, this should be called before the + * create new rel storage that can be filled from scratch. When creating + * new storage for an existing relfilelocator, this should be called before the * relcache entry has been updated. * * *freezeXid, *minmulti are set to the xid / multixact horizon for the table * that pg_class.{relfrozenxid, relminmxid} have to be set to. */ static inline void -table_relation_set_new_filenode(Relation rel, - const RelFileNode *newrnode, - char persistence, - TransactionId *freezeXid, - MultiXactId *minmulti) +table_relation_set_new_filelocator(Relation rel, + const RelFileLocator *newrlocator, + char persistence, + TransactionId *freezeXid, + MultiXactId *minmulti) { - rel->rd_tableam->relation_set_new_filenode(rel, newrnode, persistence, - freezeXid, minmulti); + rel->rd_tableam->relation_set_new_filelocator(rel, newrlocator, + persistence, freezeXid, + minmulti); } /* * Remove all table contents from `rel`, in a non-transactional manner. * Non-transactional meaning that there's no need to support rollbacks. This - * commonly only is used to perform truncations for relfilenodes created in the - * current transaction. + * commonly only is used to perform truncations for relation storage created in + * the current transaction. */ static inline void table_relation_nontransactional_truncate(Relation rel) @@ -1612,15 +1613,15 @@ table_relation_nontransactional_truncate(Relation rel) } /* - * Copy data from `rel` into the new relfilenode `newrnode`. The new - * relfilenode may not have storage associated before this function is + * Copy data from `rel` into the new relfilelocator `newrlocator`. The new + * relfilelocator may not have storage associated before this function is * called. This is only supposed to be used for low level operations like * changing a relation's tablespace. */ static inline void -table_relation_copy_data(Relation rel, const RelFileNode *newrnode) +table_relation_copy_data(Relation rel, const RelFileLocator *newrlocator) { - rel->rd_tableam->relation_copy_data(rel, newrnode); + rel->rd_tableam->relation_copy_data(rel, newrlocator); } /* diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 4794941df3..7d2b35213d 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -19,7 +19,7 @@ #include "datatype/timestamp.h" #include "lib/stringinfo.h" #include "nodes/pg_list.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" #include "storage/sinval.h" /* @@ -174,7 +174,7 @@ typedef struct SavedTransactionCharacteristics */ #define XACT_XINFO_HAS_DBINFO (1U << 0) #define XACT_XINFO_HAS_SUBXACTS (1U << 1) -#define XACT_XINFO_HAS_RELFILENODES (1U << 2) +#define XACT_XINFO_HAS_RELFILELOCATORS (1U << 2) #define XACT_XINFO_HAS_INVALS (1U << 3) #define XACT_XINFO_HAS_TWOPHASE (1U << 4) #define XACT_XINFO_HAS_ORIGIN (1U << 5) @@ -252,12 +252,12 @@ typedef struct xl_xact_subxacts } xl_xact_subxacts; #define MinSizeOfXactSubxacts offsetof(xl_xact_subxacts, subxacts) -typedef struct xl_xact_relfilenodes +typedef struct xl_xact_relfilelocators { int nrels; /* number of relations */ - RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER]; -} xl_xact_relfilenodes; -#define MinSizeOfXactRelfilenodes offsetof(xl_xact_relfilenodes, xnodes) + RelFileLocator xlocators[FLEXIBLE_ARRAY_MEMBER]; +} xl_xact_relfilelocators; +#define MinSizeOfXactRelfileLocators offsetof(xl_xact_relfilelocators, xlocators) /* * A transactionally dropped statistics entry. @@ -305,7 +305,7 @@ typedef struct xl_xact_commit /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */ /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */ /* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */ - /* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */ + /* xl_xact_relfilelocators follows if XINFO_HAS_RELFILELOCATORS */ /* xl_xact_stats_items follows if XINFO_HAS_DROPPED_STATS */ /* xl_xact_invals follows if XINFO_HAS_INVALS */ /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */ @@ -321,7 +321,7 @@ typedef struct xl_xact_abort /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */ /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */ /* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */ - /* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */ + /* xl_xact_relfilelocators follows if XINFO_HAS_RELFILELOCATORS */ /* xl_xact_stats_items follows if XINFO_HAS_DROPPED_STATS */ /* No invalidation messages needed. */ /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */ @@ -367,7 +367,7 @@ typedef struct xl_xact_parsed_commit TransactionId *subxacts; int nrels; - RelFileNode *xnodes; + RelFileLocator *xlocators; int nstats; xl_xact_stats_item *stats; @@ -378,7 +378,7 @@ typedef struct xl_xact_parsed_commit TransactionId twophase_xid; /* only for 2PC */ char twophase_gid[GIDSIZE]; /* only for 2PC */ int nabortrels; /* only for 2PC */ - RelFileNode *abortnodes; /* only for 2PC */ + RelFileLocator *abortlocators; /* only for 2PC */ int nabortstats; /* only for 2PC */ xl_xact_stats_item *abortstats; /* only for 2PC */ @@ -400,7 +400,7 @@ typedef struct xl_xact_parsed_abort TransactionId *subxacts; int nrels; - RelFileNode *xnodes; + RelFileLocator *xlocators; int nstats; xl_xact_stats_item *stats; @@ -483,7 +483,7 @@ extern int xactGetCommittedChildren(TransactionId **ptr); extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time, int nsubxacts, TransactionId *subxacts, - int nrels, RelFileNode *rels, + int nrels, RelFileLocator *rels, int nstats, xl_xact_stats_item *stats, int nmsgs, SharedInvalidationMessage *msgs, @@ -494,7 +494,7 @@ extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time, extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time, int nsubxacts, TransactionId *subxacts, - int nrels, RelFileNode *rels, + int nrels, RelFileLocator *rels, int nstats, xl_xact_stats_item *stats, int xactflags, TransactionId twophase_xid, diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h index fae0bef8f5..3524c396dc 100644 --- a/src/include/access/xlog_internal.h +++ b/src/include/access/xlog_internal.h @@ -25,7 +25,7 @@ #include "lib/stringinfo.h" #include "pgtime.h" #include "storage/block.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" /* diff --git a/src/include/access/xloginsert.h b/src/include/access/xloginsert.h index 5fc340c434..c04f77b173 100644 --- a/src/include/access/xloginsert.h +++ b/src/include/access/xloginsert.h @@ -15,7 +15,7 @@ #include "access/xlogdefs.h" #include "storage/block.h" #include "storage/buf.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" #include "utils/relcache.h" /* @@ -45,16 +45,16 @@ extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info); extern void XLogEnsureRecordSpace(int max_block_id, int ndatas); extern void XLogRegisterData(char *data, int len); extern void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags); -extern void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode, +extern void XLogRegisterBlock(uint8 block_id, RelFileLocator *rlocator, ForkNumber forknum, BlockNumber blknum, char *page, uint8 flags); extern void XLogRegisterBufData(uint8 block_id, char *data, int len); extern void XLogResetInsertion(void); extern bool XLogCheckBufferNeedsBackup(Buffer buffer); -extern XLogRecPtr log_newpage(RelFileNode *rnode, ForkNumber forkNum, +extern XLogRecPtr log_newpage(RelFileLocator *rlocator, ForkNumber forkNum, BlockNumber blk, char *page, bool page_std); -extern void log_newpages(RelFileNode *rnode, ForkNumber forkNum, int num_pages, +extern void log_newpages(RelFileLocator *rlocator, ForkNumber forkNum, int num_pages, BlockNumber *blknos, char **pages, bool page_std); extern XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std); extern void log_newpage_range(Relation rel, ForkNumber forkNum, diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index e73ea4a840..5395f155aa 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -122,7 +122,7 @@ typedef struct bool in_use; /* Identify the block this refers to */ - RelFileNode rnode; + RelFileLocator rlocator; ForkNumber forknum; BlockNumber blkno; @@ -430,10 +430,10 @@ extern FullTransactionId XLogRecGetFullXid(XLogReaderState *record); extern bool RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page); extern char *XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len); extern void XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, - RelFileNode *rnode, ForkNumber *forknum, + RelFileLocator *rlocator, ForkNumber *forknum, BlockNumber *blknum); extern bool XLogRecGetBlockTagExtended(XLogReaderState *record, uint8 block_id, - RelFileNode *rnode, ForkNumber *forknum, + RelFileLocator *rlocator, ForkNumber *forknum, BlockNumber *blknum, Buffer *prefetch_buffer); diff --git a/src/include/access/xlogrecord.h b/src/include/access/xlogrecord.h index 052ac6817a..835151ec92 100644 --- a/src/include/access/xlogrecord.h +++ b/src/include/access/xlogrecord.h @@ -15,7 +15,7 @@ #include "access/xlogdefs.h" #include "port/pg_crc32c.h" #include "storage/block.h" -#include "storage/relfilenode.h" +#include "storage/relfilelocator.h" /* * The overall layout of an XLOG record is: @@ -97,7 +97,7 @@ typedef struct XLogRecordBlockHeader * image) */ /* If BKPBLOCK_HAS_IMAGE, an XLogRecordBlockImageHeader struct follows */ - /* If BKPBLOCK_SAME_REL is not set, a RelFileNode follows */ + /* If BKPBLOCK_SAME_REL is not set, a RelFileLocator follows */ /* BlockNumber follows */ } XLogRecordBlockHeader; @@ -175,7 +175,7 @@ typedef struct XLogRecordBlockCompressHeader (SizeOfXLogRecordBlockHeader + \ SizeOfXLogRecordBlockImageHeader + \ SizeOfXLogRecordBlockCompressHeader + \ - sizeof(RelFileNode) + \ + sizeof(RelFileLocator) + \ sizeof(BlockNumber)) /* @@ -187,7 +187,8 @@ typedef struct XLogRecordBlockCompressHeader #define BKPBLOCK_HAS_IMAGE 0x10 /* block data is an XLogRecordBlockImage */ #define BKPBLOCK_HAS_DATA 0x20 #define BKPBLOCK_WILL_INIT 0x40 /* redo will re-init the page */ -#define BKPBLOCK_SAME_REL 0x80 /* RelFileNode omitted, same as previous */ +#define BKPBLOCK_SAME_REL 0x80 /* RelFileLocator omitted, same as + * previous */ /* * XLogRecordDataHeaderShort/Long are used for the "main data" portion of diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index c9d0b75a01..ef182977bf 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -60,9 +60,9 @@ extern PGDLLIMPORT HotStandbyState standbyState; extern bool XLogHaveInvalidPages(void); extern void XLogCheckInvalidPages(void); -extern void XLogDropRelation(RelFileNode rnode, ForkNumber forknum); +extern void XLogDropRelation(RelFileLocator rlocator, ForkNumber forknum); extern void XLogDropDatabase(Oid dbid); -extern void XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum, +extern void XLogTruncateRelation(RelFileLocator rlocator, ForkNumber forkNum, BlockNumber nblocks); /* Result codes for XLogReadBufferForRedo[Extended] */ @@ -89,11 +89,11 @@ extern XLogRedoAction XLogReadBufferForRedoExtended(XLogReaderState *record, ReadBufferMode mode, bool get_cleanup_lock, Buffer *buf); -extern Buffer XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum, +extern Buffer XLogReadBufferExtended(RelFileLocator rlocator, ForkNumber forknum, BlockNumber blkno, ReadBufferMode mode, Buffer recent_buffer); -extern Relation CreateFakeRelcacheEntry(RelFileNode rnode); +extern Relation CreateFakeRelcacheEntry(RelFileLocator rlocator); extern void FreeFakeRelcacheEntry(Relation fakerel); extern int read_local_xlog_page(XLogReaderState *state, |
