Re: Safely calling index_getprocinfo() while holding an nbtreeexclusive buffer lock

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Safely calling index_getprocinfo() while holding an nbtreeexclusive buffer lock
Дата
Msg-id CAH2-WznJX63sOWRZsjWM0O2cVErPPv+shLSvmO0sw8CrLLe7qQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Safely calling index_getprocinfo() while holding an nbtree exclusive buffer lock  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jan 14, 2019 at 7:12 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think you should stop right there and ask why.  Surely that info
> can be obtained before starting the operation?

*Thinks some more*

Uh, I'm already telling the same _bt_truncate() code path that it is
being called from a CREATE INDEX, allowing it to avoid accessing the
metapage. I now think that it would be perfectly acceptable to just
pass down the insertion scan key for the tuple that caused the split,
instead of that build bool, and handle both deadlock issues
(index_getprocinfo() hazard and metapage hazard) that way instead.
Heikki expressed some concerns about the way the patch accesses the
metapage already.

I jumped the gun with this catalog index business. Clearly I'd be much
better off avoiding *all* new buffer lock protocol stuff by getting
both pieces of information up-front -- for some reason I thought that
that would be harder than it now appears.

Thanks
--
Peter Geoghegan


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Tid scan improvements
Следующее
От: Haribabu Kommi
Дата:
Сообщение: current_logfiles not following group access and instead followslog_file_mode permissions