diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-03 00:28:43 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-03 00:28:43 +0000 |
| commit | 64eea6c21d5ad64753f3564862572951f80d5c92 (patch) | |
| tree | 88785cda0f8c110af9a8067ff1dc6141e8eb4f89 /src/include/catalog | |
| parent | aa731ed8433914641e42f32fec0fcf27f01aab7e (diff) | |
| download | postgresql-64eea6c21d5ad64753f3564862572951f80d5c92.tar.gz | |
Expand pg_control information so that we can verify that the database
was created on a machine with alignment rules and floating-point format
similar to the current machine. Per recent discussion, this seems like
a good idea with the increasing prevalence of 32/64 bit environments.
Diffstat (limited to 'src/include/catalog')
| -rw-r--r-- | src/include/catalog/pg_control.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index 73f32b55ad..158a4ee92b 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.23 2005/06/08 15:50:28 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.24 2005/10/03 00:28:43 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ /* Version identifier for this pg_control format */ -#define PG_CONTROL_VERSION 811 +#define PG_CONTROL_VERSION 812 /* * Body of CheckPoint XLOG records. This is declared here because we keep @@ -108,6 +108,22 @@ typedef struct ControlFileData CheckPoint checkPointCopy; /* copy of last check point record */ /* + * This data is used to check for hardware-architecture compatibility + * of the database and the backend executable. We need not check + * endianness explicitly, since the pg_control version will surely + * look wrong to a machine of different endianness, but we do need + * to worry about MAXALIGN and floating-point format. (Note: storage + * layout nominally also depends on SHORTALIGN and INTALIGN, but in + * practice these are the same on all architectures of interest.) + * + * Testing just one double value is not a very bulletproof test for + * floating-point compatibility, but it will catch most cases. + */ + uint32 maxAlign; /* alignment requirement for tuples */ + double floatFormat; /* constant 1234567.0 */ +#define FLOATFORMAT_VALUE 1234567.0 + + /* * This data is used to make sure that configuration of this database * is compatible with the backend executable. */ |
