Change RangeVarGetRelidExtended() to take flags argument?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Change RangeVarGetRelidExtended() to take flags argument?
Дата
Msg-id 20180306005349.b65whmvj7z6hbe2y@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Change RangeVarGetRelidExtended() to take flags argument?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

https://www.postgresql.org/message-id/7327B413-1A57-477F-A6A0-6FD80CB5482D@amazon.com
adds a SKIP LOCKED option to vacuum. To avoid blocking in
expand_vacuum_rel()'s call of RangeVarGetRelid(), it open codes a
SKIP_LOCKED variant (i.e. RangeVarGetRelidExtended()'s nowait, but
doesn't error out). I don't like that much.

Therefore I wonder if we should consolidate the existing
RangeVarGetRelidExtended() arguments (missing_ok and nowait) into a
flags argument. That'll then allow to add SKIP_LOCKED behaviour.

One wrinkle in that plan is that it'd not be trivial to discern whether
a lock couldn't be acquired or whether the object vanished.  I don't
really have good idea how to tackle that yet.  We could make the return
value more complicated (and return relation oid via parameter) but that
seems like it'd be more invasive.

Greetings,

Andres Freund


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Change RangeVarGetRelidExtended() to take flags argument?