mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Grab the low-hanging fruit from forcing USE_FLOAT8_BYVAL to true.
Remove conditionally-compiled code for the other case. Replace uses of FLOAT8PASSBYVAL with constant "true", mainly because it was quite confusing in cases where the type we were dealing with wasn't float8. I left the associated pg_control and Pg_magic_struct fields in place. Perhaps we should get rid of them, but it would save little, so it doesn't seem worth thinking hard about the compatibility implications. I just labeled them "vestigial" in places where that seemed helpful. Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/1749799.1752797397@sss.pgh.pa.us
This commit is contained in:
@@ -4390,7 +4390,7 @@ WriteControlFile(void)
|
||||
ControlFile->toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE;
|
||||
ControlFile->loblksize = LOBLKSIZE;
|
||||
|
||||
ControlFile->float8ByVal = FLOAT8PASSBYVAL;
|
||||
ControlFile->float8ByVal = true; /* vestigial */
|
||||
|
||||
/*
|
||||
* Initialize the default 'char' signedness.
|
||||
@@ -4651,23 +4651,7 @@ ReadControlFile(void)
|
||||
"LOBLKSIZE", (int) LOBLKSIZE),
|
||||
errhint("It looks like you need to recompile or initdb.")));
|
||||
|
||||
#ifdef USE_FLOAT8_BYVAL
|
||||
if (ControlFile->float8ByVal != true)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("database files are incompatible with server"),
|
||||
errdetail("The database cluster was initialized without USE_FLOAT8_BYVAL"
|
||||
" but the server was compiled with USE_FLOAT8_BYVAL."),
|
||||
errhint("It looks like you need to recompile or initdb.")));
|
||||
#else
|
||||
if (ControlFile->float8ByVal != false)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("database files are incompatible with server"),
|
||||
errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL"
|
||||
" but the server was compiled without USE_FLOAT8_BYVAL."),
|
||||
errhint("It looks like you need to recompile or initdb.")));
|
||||
#endif
|
||||
Assert(ControlFile->float8ByVal); /* vestigial, not worth an error msg */
|
||||
|
||||
wal_segment_size = ControlFile->xlog_seg_size;
|
||||
|
||||
|
Reference in New Issue
Block a user