Re: Custom table AMs need to include heapam.h because ofBulkInsertState

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Custom table AMs need to include heapam.h because ofBulkInsertState
Дата
Msg-id 20190601191943.zarudpbynmac62m7@alap3.anarazel.de
обсуждение исходный текст
Ответ на Custom table AMs need to include heapam.h because of BulkInsertState  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Custom table AMs need to include heapam.h because ofBulkInsertState  (Michael Paquier <michael@paquier.xyz>)
Re: Custom table AMs need to include heapam.h because of BulkInsertState  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

On 2019-06-01 15:09:24 -0400, Michael Paquier wrote:
> I have been playing lately with the table AM API to do some stuff, and
> I got surprised that in the minimum set of headers which needs to be
> included for a table AM we have a hard dependency with heapam.h for
> BulkInsertState and vacuum.h for VacuumParams.

I've noted this before as a future todo.


> I'd like to think that the best way to deal with that and reduce the
> confusion would be to move anything related to bulk inserts into their
> own header/file, meaning the following set:
> - ReleaseBulkInsertStatePin
> - GetBulkInsertState
> - FreeBulkInsertState
> There is the argument that we could also move that part into tableam.h
> itself though as some of the rather generic table-related callbacks,
> but that seems grotty.  So I think that we could just move that stuff
> as backend/access/common/bulkinsert.c.

Yea, I think we should do that at some point. But I'm not sure this is
the right design. Bulk insert probably needs to rather be something
that's allocated inside the AM.

Greetings,

Andres Freund



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: psql completion bugs with access methods
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Table AM callbacks referring to heap in declarations (+typos)