summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2006-04-04 22:39:59 +0000
committerTom Lane2006-04-04 22:39:59 +0000
commite6140d90520eca4505d65557ea40369dcf0dec89 (patch)
tree3c8fb405d95fdff151e8e20a4d4ba8b409dbdcc2 /src/include
parent147d4bf3e5e3da2ee0f0cc132718ab1c4912a877 (diff)
Don't use BLCKSZ for the physical length of the pg_control file, but
instead a dedicated symbol. This probably makes no functional difference for likely values of BLCKSZ, but it makes the intent clearer. Simon Riggs, minor editorialization by Tom Lane.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_control.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index ba54fdc8e6f..02c51dd9f35 100644
--- a/src/include/catalog/pg_control.h
+++ b/src/include/catalog/pg_control.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.28 2006/04/03 23:35:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.29 2006/04/04 22:39:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -147,4 +147,13 @@ typedef struct ControlFileData
pg_crc32 crc;
} ControlFileData;
+/*
+ * Physical size of the pg_control file. Note that this is considerably
+ * bigger than the actually used size (ie, sizeof(ControlFileData)).
+ * The idea is to keep the physical size constant independent of format
+ * changes, so that ReadControlFile will deliver a suitable wrong-version
+ * message instead of a read error if it's looking at an incompatible file.
+ */
+#define PG_CONTROL_SIZE 8192
+
#endif /* PG_CONTROL_H */