Re: pg_control is missing a field for LOBLKSIZE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_control is missing a field for LOBLKSIZE
Дата
Msg-id 31562.1401902506@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_control is missing a field for LOBLKSIZE  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: pg_control is missing a field for LOBLKSIZE
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I've not heard one either, but there was just somebody asking in
>> pgsql-general about changing LOBLKSIZE, so he's going to be at risk.
>> That's not a big enough sample size to make me panic about getting a
>> hasty fix into 9.4, but I do think we should fix this going forward.

> Agreed.

BTW, just comparing the handling of TOAST_MAX_CHUNK_SIZE and LOBLKSIZE,
I noticed that the tuptoaster.c functions are reasonably paranoid about
checking that toast chunks are the expected size, but the large object
functions are not: the latter have either no check at all, or just an
Assert that the size is not more than expected.  So we could provide at
least a partial guard against a wrong LOBLKSIZE configuration by making
all the large-object functions throw elog(ERROR) if the length of a LO
chunk is more than LOBLKSIZE.  Unfortunately, length *less* than LOBLKSIZE
is an expected case, so this would only help in one direction.  Still,
it'd be an easy and back-patchable change that would provide at least some
defense, so I'm thinking of doing it.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: backup_label revisited
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pg_control is missing a field for LOBLKSIZE