diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 1c8202c257ce9cc8225a4cfc0291c3a2014ebad6..9c53e4288cca861a4748529b5cdc54f5ee9fea59 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -17655,11 +17655,6 @@ SELECT collation for ('foo' COLLATE "de_DE"); <entry><type>integer</type></entry> </row> - <row> - <entry><literal>bigint_timestamps</literal></entry> - <entry><type>boolean</type></entry> - </row> - <row> <entry><literal>float4_pass_by_value</literal></entry> <entry><type>boolean</type></entry> diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f23e1086280c0e23392117be85e0872ca4494c23..ebae9da0f851dbcd0d667b77f8faa3f77702a63f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -4379,11 +4379,6 @@ WriteControlFile(void) ControlFile->toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE; ControlFile->loblksize = LOBLKSIZE; -#ifdef HAVE_INT64_TIMESTAMP - ControlFile->enableIntTimes = true; -#else - ControlFile->enableIntTimes = false; -#endif ControlFile->float4ByVal = FLOAT4PASSBYVAL; ControlFile->float8ByVal = FLOAT8PASSBYVAL; @@ -4579,22 +4574,6 @@ ReadControlFile(void) ControlFile->loblksize, (int) LOBLKSIZE), errhint("It looks like you need to recompile or initdb."))); -#ifdef HAVE_INT64_TIMESTAMP - if (ControlFile->enableIntTimes != true) - ereport(FATAL, - (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized without HAVE_INT64_TIMESTAMP" - " but the server was compiled with HAVE_INT64_TIMESTAMP."), - errhint("It looks like you need to recompile or initdb."))); -#else - if (ControlFile->enableIntTimes != false) - ereport(FATAL, - (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with HAVE_INT64_TIMESTAMP" - " but the server was compiled without HAVE_INT64_TIMESTAMP."), - errhint("It looks like you need to recompile or initdb."))); -#endif - #ifdef USE_FLOAT4_BYVAL if (ControlFile->float4ByVal != true) ereport(FATAL, diff --git a/src/backend/utils/misc/pg_controldata.c b/src/backend/utils/misc/pg_controldata.c index 93a3d38b1d05711a5a6fddd40a750fecd2821d79..d8454111a89c5dbf462c82b0b633dd8ac4cc642e 100644 --- a/src/backend/utils/misc/pg_controldata.c +++ b/src/backend/utils/misc/pg_controldata.c @@ -266,8 +266,8 @@ pg_control_recovery(PG_FUNCTION_ARGS) Datum pg_control_init(PG_FUNCTION_ARGS) { - Datum values[13]; - bool nulls[13]; + Datum values[12]; + bool nulls[12]; TupleDesc tupdesc; HeapTuple htup; ControlFileData *ControlFile; @@ -277,7 +277,7 @@ pg_control_init(PG_FUNCTION_ARGS) * Construct a tuple descriptor for the result row. This must match this * function's pg_proc entry! */ - tupdesc = CreateTemplateTupleDesc(13, false); + tupdesc = CreateTemplateTupleDesc(12, false); TupleDescInitEntry(tupdesc, (AttrNumber) 1, "max_data_alignment", INT4OID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 2, "database_block_size", @@ -296,13 +296,11 @@ pg_control_init(PG_FUNCTION_ARGS) INT4OID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 9, "large_object_chunk_size", INT4OID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 10, "bigint_timestamps", + TupleDescInitEntry(tupdesc, (AttrNumber) 10, "float4_pass_by_value", BOOLOID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 11, "float4_pass_by_value", + TupleDescInitEntry(tupdesc, (AttrNumber) 11, "float8_pass_by_value", BOOLOID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 12, "float8_pass_by_value", - BOOLOID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 13, "data_page_checksum_version", + TupleDescInitEntry(tupdesc, (AttrNumber) 12, "data_page_checksum_version", INT4OID, -1, 0); tupdesc = BlessTupleDesc(tupdesc); @@ -339,18 +337,15 @@ pg_control_init(PG_FUNCTION_ARGS) values[8] = Int32GetDatum(ControlFile->loblksize); nulls[8] = false; - values[9] = BoolGetDatum(ControlFile->enableIntTimes); + values[9] = BoolGetDatum(ControlFile->float4ByVal); nulls[9] = false; - values[10] = BoolGetDatum(ControlFile->float4ByVal); + values[10] = BoolGetDatum(ControlFile->float8ByVal); nulls[10] = false; - values[11] = BoolGetDatum(ControlFile->float8ByVal); + values[11] = Int32GetDatum(ControlFile->data_checksum_version); nulls[11] = false; - values[12] = Int32GetDatum(ControlFile->data_checksum_version); - nulls[12] = false; - htup = heap_form_tuple(tupdesc, values, nulls); PG_RETURN_DATUM(HeapTupleGetDatum(htup)); diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index 20077a663974544c0d385b32a244ea87be406312..f47171d29d9c722e627e1df8205fa68b7cb79595 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -293,8 +293,9 @@ main(int argc, char *argv[]) ControlFile->toast_max_chunk_size); printf(_("Size of a large-object chunk: %u\n"), ControlFile->loblksize); + /* This is no longer configurable, but users may still expect to see it: */ printf(_("Date/time type storage: %s\n"), - (ControlFile->enableIntTimes ? _("64-bit integers") : _("floating-point numbers"))); + _("64-bit integers")); printf(_("Float4 argument passing: %s\n"), (ControlFile->float4ByVal ? _("by value") : _("by reference"))); printf(_("Float8 argument passing: %s\n"), diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 96b7097f8b75edffdba465023bd02e768a99464a..502ea5b290048cb5a5d7ff076269c05a8060f31d 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -598,11 +598,6 @@ GuessControlValues(void) ControlFile.indexMaxKeys = INDEX_MAX_KEYS; ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE; ControlFile.loblksize = LOBLKSIZE; -#ifdef HAVE_INT64_TIMESTAMP - ControlFile.enableIntTimes = true; -#else - ControlFile.enableIntTimes = false; -#endif ControlFile.float4ByVal = FLOAT4PASSBYVAL; ControlFile.float8ByVal = FLOAT8PASSBYVAL; @@ -688,8 +683,9 @@ PrintControlValues(bool guessed) ControlFile.toast_max_chunk_size); printf(_("Size of a large-object chunk: %u\n"), ControlFile.loblksize); + /* This is no longer configurable, but users may still expect to see it: */ printf(_("Date/time type storage: %s\n"), - (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers"))); + _("64-bit integers")); printf(_("Float4 argument passing: %s\n"), (ControlFile.float4ByVal ? _("by value") : _("by reference"))); printf(_("Float8 argument passing: %s\n"), diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 5f42bde136dec11c25f1dc2b1a333e8595779eff..9e8c1c2a027c83d31c0e32c6238b2668a8be368b 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 201702101 +#define CATALOG_VERSION_NO 201702231 #endif diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index 23731e98a44418adcd4f619631e4e8e8a192241a..e4194b9de1f739612400b0255f009ae74e3ecab3 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -21,7 +21,7 @@ /* Version identifier for this pg_control format */ -#define PG_CONTROL_VERSION 960 +#define PG_CONTROL_VERSION 1001 /* * Body of CheckPoint XLOG records. This is declared here because we keep @@ -215,9 +215,6 @@ typedef struct ControlFileData uint32 toast_max_chunk_size; /* chunk size in TOAST tables */ uint32 loblksize; /* chunk size in pg_largeobject */ - /* flag indicating internal format of timestamp, interval, time */ - bool enableIntTimes; /* int64 storage enabled? */ - /* flags indicating pass-by-value status of various types */ bool float4ByVal; /* float4 pass-by-value? */ bool float8ByVal; /* float8, int8, etc pass-by-value? */ diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index bb7053a94226414acbcf5ad120f5517ed061c4ee..a4cc86d3221396eb83f699c8ea7c36076dce6a6d 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -5355,7 +5355,7 @@ DESCR("pg_controldata checkpoint state information as a function"); DATA(insert OID = 3443 ( pg_control_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{3220,23,3220,3220,16}" "{o,o,o,o,o}" "{min_recovery_end_location,min_recovery_end_timeline,backup_start_location,backup_end_location,end_of_backup_record_required}" _null_ _null_ pg_control_recovery _null_ _null_ _null_ )); DESCR("pg_controldata recovery state information as a function"); -DATA(insert OID = 3444 ( pg_control_init PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{23,23,23,23,23,23,23,23,23,16,16,16,23}" "{o,o,o,o,o,o,o,o,o,o,o,o,o}" "{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,bigint_timestamps,float4_pass_by_value,float8_pass_by_value,data_page_checksum_version}" _null_ _null_ pg_control_init _null_ _null_ _null_ )); +DATA(insert OID = 3444 ( pg_control_init PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{23,23,23,23,23,23,23,23,23,16,16,23}" "{o,o,o,o,o,o,o,o,o,o,o,o}" "{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,float4_pass_by_value,float8_pass_by_value,data_page_checksum_version}" _null_ _null_ pg_control_init _null_ _null_ _null_ )); DESCR("pg_controldata init state information as a function"); DATA(insert OID = 3445 ( pg_import_system_collations PGNSP PGUID 12 100 0 0 0 f f f f t f v r 2 0 2278 "16 4089" _null_ _null_ "{if_not_exists,schema}" _null_ _null_ pg_import_system_collations _null_ _null_ _null_ ));