]> granicus.if.org Git - postgresql/blobdiff - src/include/catalog/pg_control.h
Phase 2 of pgindent updates.
[postgresql] / src / include / catalog / pg_control.h
index 05c5b748cb9a780d2f938cc1ca1d8ae4d7df1bbb..84327c9da6b0fe224125480d84fa90521287e277 100644 (file)
@@ -5,7 +5,7 @@
  *       However, we define it here so that the format is documented.
  *
  *
- * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * src/include/catalog/pg_control.h
 
 #include "access/xlogdefs.h"
 #include "pgtime.h"                            /* for pg_time_t */
-#include "utils/pg_crc.h"
+#include "port/pg_crc32c.h"
 
 
+#define MOCK_AUTH_NONCE_LEN            32
+
 /* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION     937
+#define PG_CONTROL_VERSION     1002
 
 /*
  * Body of CheckPoint XLOG records.  This is declared here because we keep
@@ -46,12 +48,16 @@ typedef struct CheckPoint
        MultiXactId oldestMulti;        /* cluster-wide minimum datminmxid */
        Oid                     oldestMultiDB;  /* database with minimum datminmxid */
        pg_time_t       time;                   /* time stamp of checkpoint */
+       TransactionId oldestCommitTsXid;        /* oldest Xid with valid commit
+                                                                                * timestamp */
+       TransactionId newestCommitTsXid;        /* newest Xid with valid commit
+                                                                                * timestamp */
 
        /*
         * Oldest XID still running. This is only needed to initialize hot standby
         * mode from an online checkpoint, so we only bother calculating this for
-        * online checkpoints and only when wal_level is hot_standby. Otherwise
-        * it's set to InvalidTransactionId.
+        * online checkpoints and only when wal_level is replica. Otherwise it's
+        * set to InvalidTransactionId.
         */
        TransactionId oldestActiveXid;
 } CheckPoint;
@@ -67,7 +73,8 @@ typedef struct CheckPoint
 #define XLOG_RESTORE_POINT                             0x70
 #define XLOG_FPW_CHANGE                                        0x80
 #define XLOG_END_OF_RECOVERY                   0x90
-#define XLOG_FPI                                               0xA0
+#define XLOG_FPI_FOR_HINT                              0xA0
+#define XLOG_FPI                                               0xB0
 
 
 /*
@@ -114,8 +121,8 @@ typedef struct ControlFileData
         * example, WAL logs contain per-page magic numbers that can serve as
         * version cues for the WAL log.
         */
-       uint32          pg_control_version;             /* PG_CONTROL_VERSION */
-       uint32          catalog_version_no;             /* see catversion.h */
+       uint32          pg_control_version; /* PG_CONTROL_VERSION */
+       uint32          catalog_version_no; /* see catversion.h */
 
        /*
         * System status data
@@ -176,6 +183,7 @@ typedef struct ControlFileData
        int                     max_worker_processes;
        int                     max_prepared_xacts;
        int                     max_locks_per_xact;
+       bool            track_commit_timestamp;
 
        /*
         * This data is used to check for hardware-architecture compatibility of
@@ -207,9 +215,7 @@ typedef struct ControlFileData
        uint32          indexMaxKeys;   /* max number of columns in an index */
 
        uint32          toast_max_chunk_size;   /* chunk size in TOAST tables */
-
-       /* flag indicating internal format of timestamp, interval, time */
-       bool            enableIntTimes; /* int64 storage enabled? */
+       uint32          loblksize;              /* chunk size in pg_largeobject */
 
        /* flags indicating pass-by-value status of various types */
        bool            float4ByVal;    /* float4 pass-by-value? */
@@ -218,8 +224,15 @@ typedef struct ControlFileData
        /* Are data pages protected by checksums? Zero if no checksum version */
        uint32          data_checksum_version;
 
+       /*
+        * Random nonce, used in authentication requests that need to proceed
+        * based on values that are cluster-unique, like a SASL exchange that
+        * failed at an early stage.
+        */
+       char            mock_authentication_nonce[MOCK_AUTH_NONCE_LEN];
+
        /* CRC of all above ... MUST BE LAST! */
-       pg_crc32        crc;
+       pg_crc32c       crc;
 } ControlFileData;
 
 /*
@@ -231,4 +244,4 @@ typedef struct ControlFileData
  */
 #define PG_CONTROL_SIZE                8192
 
-#endif   /* PG_CONTROL_H */
+#endif                                                 /* PG_CONTROL_H */