contrib/pg_freespacemap first check input argument, then relation_open.

Поиск
Список
Период
Сортировка
От jian he
Тема contrib/pg_freespacemap first check input argument, then relation_open.
Дата
Msg-id CACJufxGYSniL_j1RVq4xv_ay0d5a0ZAhq2GkfXqeJ8L1SZqu7Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: contrib/pg_freespacemap first check input argument, then relation_open.  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers

Hi.

In: https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c

rel = relation_open(relid, AccessShareLock);

if (blkno < 0 || blkno > MaxBlockNumber)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid block number")));

--------------------
should it first check input arguments, then relation_open? 
Does ereport automatically unlock the relation? 

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Add index scan progress to pg_stat_progress_vacuum
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Add index scan progress to pg_stat_progress_vacuum