mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Remove pg_control's enableIntTimes field.
We don't need it any more. pg_controldata continues to report that date/time type storage is "64-bit integers", but that's now a hard-wired behavior not something it sees in the data. This avoids breaking pg_upgrade, and perhaps other utilities that inspect pg_control this way. Ditto for pg_resetwal. I chose to remove the "bigint_timestamps" output column of pg_control_init(), though, as that function hasn't been around long and probably doesn't have ossified users. Discussion: https://postgr.es/m/26788.1487455319@sss.pgh.pa.us
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user