pgsql: Ensure sufficient alignment for ParallelTableScanDescData inBTS

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Ensure sufficient alignment for ParallelTableScanDescData inBTS
Дата
Msg-id E1h3SRz-0007eC-T7@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Ensure sufficient alignment for ParallelTableScanDescData in BTShared.

Previously ParallelTableScanDescData was just a member in BTShared,
but after c2fe139c2 that doesn't guarantee sufficient alignment as
specific AMs might (are likely to) need atomic variables in the
struct.

One might think that MAXALIGNing would be sufficient, but as a
comment in shm_toc_allocate() explains, that's not enough. For now,
copy the hack described there.

For parallel sequential scans no such change is needed, as its
allocations go through shm_toc_allocate().

An alternative approach would have been to allocate the parallel scan
descriptor in a separate TOC entry, but there seems little benefit in
doing so.

Per buildfarm member dromedary.

Author: Andres Freund
Discussion: https://postgr.es/m/20190311203126.ty5gbfz42gjbm6i6@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8cacea7a725103f1a037a5ee06112ebe31051c66

Modified Files
--------------
src/backend/access/nbtree/nbtsort.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: tableam: Add and use scan APIs.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Give up on testing guc.c's behavior for "infinity" inputs.