Re: Caveats from reloption toast_tuple_target

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Caveats from reloption toast_tuple_target
Дата
Msg-id CAKJS1f_xZSAy0-vSQszywYsOnK1Wn2g3HKwFaLkkq8HKUTLaJg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Caveats from reloption toast_tuple_target  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Caveats from reloption toast_tuple_target  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On Fri, 5 Apr 2019 at 17:31, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:
> IMV it makes sense to simply cap the lower limit of toast_tuple_target to the compile time default and update docs to
reflectthat. Otherwise, we need to deal with the possibility of dynamically creating the toast table if the relation
optionis lowered after creating the table. Your proposed patch handles the case when the toast_tuple_target is
specifiedat CREATE TABLE, but we would still have problem with ALTER TABLE, no? But there might be side effects of
changingthe lower limit for pg_dump/pg_restore. So we would need to think about that too. 

I've attached a patch which increases the lower limit up to
TOAST_TUPLE_TARGET.  Unfortunately, reloptions don't have an
assign_hook like GUCs do. Unless we add those we've no way to still
accept lower values without an error.  Does anyone think that's worth
adding for this?  Without it, it's possible that pg_restore /
pg_upgrade could fail if someone happened to have toast_tuple_target
set lower than 2032 bytes.

I didn't bother capping RelationGetToastTupleTarget() to ensure it
never returns less than TOAST_TUPLE_TARGET since the code that
currently uses it can't trigger if it's lower than that value.

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Calling pgstat_report_wait_end() before ereport(ERROR)
Следующее
От: "Yuzuko Hosoya"
Дата:
Сообщение: Runtime pruning problem