Re: pg_control contents - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_control contents
Date
Msg-id 1713.1016811773@sss.pgh.pa.us
Whole thread Raw
In response to pg_control contents  (Thomas Lockhart <thomas@fourpalms.org>)
List pgsql-hackers
Thomas Lockhart <thomas@fourpalms.org> writes:
> I notice that the compile-time locale settings are registered in that
> same structure. And that they depend on NAMEDATALEN,

They do?  That would be fairly broken if so; sizeof(ControlFileData)
has to be independent of configurable settings, else you'll not get as
far as inspecting any of its contents (because the CRC check will fail
if computed over the wrong number of bytes).  But it looks to me like
LOCALE_NAME_BUFLEN is hardwired at 128.

> which is *not* in
> that structure. istm that it should be, and I'll go ahead and add it
> barring objections. Comments?

Putting NAMEDATALEN into the struct does seem like a good idea, and
perhaps FUNC_MAX_ARGS as well, since the system catalogs will be
unreadable if these numbers are wrong.  I think it's just an oversight
that we didn't put these values in pg_control to start with.

Don't forget to bump PG_CONTROL_VERSION.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: pg_control contents
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Help with SET NULL/SET NOT NULL