Re: [PATCH] Infinite loop while acquiring new TOAST Oid

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: [PATCH] Infinite loop while acquiring new TOAST Oid
Дата
Msg-id CAJ7c6TPSvR2rKpoVX5TSXo_kMxXF+-SxLtrpPaMf907tX=nVCw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Infinite loop while acquiring new TOAST Oid  (Nikita Malakhov <hukutoc@gmail.com>)
Ответы Re: [PATCH] Infinite loop while acquiring new TOAST Oid  (Nikita Malakhov <hukutoc@gmail.com>)
Список pgsql-hackers
Hi,

> I agree that we can't simply widen varatt_external to use 8 bytes for
> the toast ID in all cases.

+1

Note that the user may have a table with multiple TOASTable
attributes. If we simply widen the TOAST pointer it may break the
existing tables in the edge case. Also this may be a reason why
certain users may prefer to continue using narrow pointers. IMO wide
TOAST pointers should be a table option. Whether the default for new
tables should be wide or narrow pointers is debatable.

In another discussion [1] we seem to agree that we also want to have
an ability to include a 32-bit dictionary_id to the TOAST pointers and
perhaps support more compression methods (ZSTD to name one). Besides
that it would be nice to have an ability to extend TOAST pointers in
the future without breaking the existing pointers. One possible
solution would be to add a varint feature bitmask to every pointer. So
we could add flags like TOAST_IS_WIDE, TOAST_HAS_DICTIONARY,
TOAST_UNKNOWN_FEATURE_FROM_2077, etc indefinitely.

I suggest we address all the current and future needs once and
completely refactor TOAST pointers rather than solving one problem at
a time. I believe this will be more beneficial for the community in
the long term.

Thoughts?

[1]: https://commitfest.postgresql.org/43/3626/

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg_stat_io for the startup process
Следующее
От: Melanie Plageman
Дата:
Сообщение: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode