Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly
Дата
Msg-id 20191127040507.GK5435@paquier.xyz
обсуждение исходный текст
Ответ на Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Nov 27, 2019 at 12:54:16PM +0900, Michael Paquier wrote:
> +       /* Skip all mapped relations if TABLESPACE is specified */
> +       if (OidIsValid(tableSpaceOid) &&
> +           classtuple->relfilenode == 0)
> +       {
> +           if (!system_warning)
> +               ereport(WARNING,
> +                       (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> +                        errmsg("cannot move indexes of system relations, skipping all")));
> +           system_warning = true;
>             continue;
> It seems to me that you need to use RelationIsMapped() here, and we
> have no tests for it.  On top of that, we should warn about *both*
> for catalogs reindexes and mapped relation whose tablespaces are being
> changed once each.

Ditto.  This has been sent too quickly.  You cannot use
RelationIsMapped() here because there is no Relation at hand, but I
would suggest to use OidIsValid, and mention that this is the same
check as RelationIsMapped().
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Remove page-read callback from XLogReaderState.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Remove page-read callback from XLogReaderState.