Support PG_UNICODE_FAST locale in the builtin collation provider.
[pgsql.git] / src / include / access / commit_ts.h
blobb8294e41b978eefb5fa1155d729943592b9bf68f
1 /*
2 * commit_ts.h
4 * PostgreSQL commit timestamp manager
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/access/commit_ts.h
11 #ifndef COMMIT_TS_H
12 #define COMMIT_TS_H
14 #include "access/xlog.h"
15 #include "datatype/timestamp.h"
16 #include "replication/origin.h"
17 #include "storage/sync.h"
20 extern PGDLLIMPORT bool track_commit_timestamp;
22 extern void TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
23 TransactionId *subxids, TimestampTz timestamp,
24 RepOriginId nodeid);
25 extern bool TransactionIdGetCommitTsData(TransactionId xid,
26 TimestampTz *ts, RepOriginId *nodeid);
27 extern TransactionId GetLatestCommitTsData(TimestampTz *ts,
28 RepOriginId *nodeid);
30 extern Size CommitTsShmemSize(void);
31 extern void CommitTsShmemInit(void);
32 extern void BootStrapCommitTs(void);
33 extern void StartupCommitTs(void);
34 extern void CommitTsParameterChange(bool newvalue, bool oldvalue);
35 extern void CompleteCommitTsInitialization(void);
36 extern void CheckPointCommitTs(void);
37 extern void ExtendCommitTs(TransactionId newestXact);
38 extern void TruncateCommitTs(TransactionId oldestXact);
39 extern void SetCommitTsLimit(TransactionId oldestXact,
40 TransactionId newestXact);
41 extern void AdvanceOldestCommitTsXid(TransactionId oldestXact);
43 extern int committssyncfiletag(const FileTag *ftag, char *path);
45 /* XLOG stuff */
46 #define COMMIT_TS_ZEROPAGE 0x00
47 #define COMMIT_TS_TRUNCATE 0x10
49 typedef struct xl_commit_ts_set
51 TimestampTz timestamp;
52 RepOriginId nodeid;
53 TransactionId mainxid;
54 /* subxact Xids follow */
55 } xl_commit_ts_set;
57 #define SizeOfCommitTsSet (offsetof(xl_commit_ts_set, mainxid) + \
58 sizeof(TransactionId))
60 typedef struct xl_commit_ts_truncate
62 int64 pageno;
63 TransactionId oldestXid;
64 } xl_commit_ts_truncate;
66 #define SizeOfCommitTsTruncate (offsetof(xl_commit_ts_truncate, oldestXid) + \
67 sizeof(TransactionId))
69 extern void commit_ts_redo(XLogReaderState *record);
70 extern void commit_ts_desc(StringInfo buf, XLogReaderState *record);
71 extern const char *commit_ts_identify(uint8 info);
73 #endif /* COMMIT_TS_H */