From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Lockhart <thomas(at)fourpalms(dot)org> |
Cc: | PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_control contents |
Date: | 2002-03-25 18:35:34 |
Message-ID: | 23147.1017081334@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <thomas(at)fourpalms(dot)org> writes:
> If LOCALE_NAME_BUFLEN changes size between writing and reading the
> control file, the CRC *could* still be calculated correctly.
There might be some value to storing sizeof(ControlFileData) explicitly,
so that that CRC calculation could be made. But I still see none in
storing LOCALE_NAME_BUFLEN explicitly. There is *no* difference between
"I changed LOCALE_NAME_BUFLEN at random" and "I added or reordered
fields in the struct at random". In either case the file has to be
treated as completely useless, because we don't really know what's in
there at what offset. And making either sort of change without bumping
PG_CONTROL_VERSION is simply a mistake that we cannot afford to make.
There are plenty of places in PG where ill-considered hacking will have
undesirable consequences; pg_control is just one more.
The value of storing sizeof(ControlFileData) explicitly would not be
that we could hope to extract data safely, but only that we could
distinguish "corrupt data" from "good data in an incompatible format"
with marginally more reliability than now. But both of these are and
must be failure cases, so it's really not that interesting to
distinguish between them.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-03-25 20:55:28 | Re: views on temp tables |
Previous Message | Thomas Lockhart | 2002-03-25 18:10:08 | Re: pg_control contents |