Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.
Дата
Msg-id 20201119014043.mpf6g467hu55w7fc@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

On 2020-11-18 20:17:55 -0500, Tom Lane wrote:
> I'm not really on board with creating an actual sequence object for each
> toast table.  I don't think they are efficient enough.

I'm not convinced that's true. Sure, nextval() could stand to be cheaper
- but on the other hand, this would allow us to entirely avoid doing
ahead-of-time uniqueness probes. Needing one extra WAL record every
SEQ_LOG_VALS/32 toast insertions seems likely to be win over doing
at least SEQ_LOG_VALS-1 additional uniqueness index probes.

It's not like the oid counter is free of contention - one benefit of
what I suggest would be that the potential contention point would move
from system wide to table wide.

I think reducing the rate of oid counter advancement is a significant
benefit, moving the point of where we have to care about efficiency
problems around system oid assignment costs quite a bit further into the
future.

I think there's also some small potential benefits around indexing in
having densely allocated toast chunk ids for each toast table, over the
sparser allocation we have right now.

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #16726: Invalid input syntax is not a useful error message