Re: Fallback table AM for relkinds without storage

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fallback table AM for relkinds without storage
Дата
Msg-id YCohAhyzYb9Wlqyx@paquier.xyz
обсуждение исходный текст
Ответ на Fallback table AM for relkinds without storage  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Tue, Feb 09, 2021 at 04:27:34PM +0900, Michael Paquier wrote:
> Putting sanity checks within all the table_* functions of tableam.h
> would not be a good idea, as nothing prevents the call of what's
> stored in rel->rd_tableam.

I have been playing with this idea, and finished with the attached,
which is not the sexiest patch around.  The table AM used as fallback
for tables without storage is called no_storage (this could be called
virtual_am?).  Reverting e786be5 or dd705a0 leads to an error coming
from no_storage instead of a crash.

One thing to note is that this simplifies a bit slot_callbacks as
views, foreign tables and partitioned tables can grab their slot type
directly from this new table AM.
--
Michael

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: a misbehavior of partition row movement (?)
Следующее
От: Greg Nancarrow
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)