Re: pg_upgrade fails with in-place tablespace

Поиск
Список
Период
Сортировка
От Rui Zhao
Тема Re: pg_upgrade fails with in-place tablespace
Дата
Msg-id 11bd25e8-a16a-411d-bc24-47d117a39efa.xiyuan.zr@alibaba-inc.com
обсуждение исходный текст
Ответ на Re: pg_upgrade fails with in-place tablespace  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_upgrade fails with in-place tablespace  ("Rui Zhao" <xiyuan.zr@alibaba-inc.com>)
Re: pg_upgrade fails with in-place tablespace[  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Sat, Aug 19, 2023 at 12:45 PM +0800, Michael Paquier wrote:
> I am not sure to follow the meaning of this logic.  There could be
> in-place tablespaces that got created with the GUC enabled during a
> session, while the GUC has disabled the GUC.  Shouldn't this stuff be
> more restrictive and not require a lookup at the GUC, only looking at
> the paths returned by pg_tablespace_location()?
  
There are two cases when we check in-place tablespaces:
1. The GUC allow_in_place_tablespaces is turned on in the old node.
In this case, we assume that the caller is aware of what he is doing
and allow the check to pass.
2. The GUC allow_in_place_tablespaces is turned off in the old node.
In this case, we will fail the check if we find any in-place tablespaces.
However, we provide an option to pass the check by adding
--old-options="-c allow_in_place_tablespaces=on" in pg_upgrade.
This option will turn on allow_in_place_tablespaces like GUC does.
So I lookup at the GUC and check if it is turned on.
  
We add this check of in-place tablespaces, to deal with the situation
where one would want to be warned if these are in-place tablespaces
when doing upgrades. I think we can take it a step further by providing
an option that allows the check to pass if the caller explicitly adds
--old-options="-c allow_in_place_tablespaces=on".
  
Please refer to the TAP test I have included for a better understanding
of my suggestion.
  
--
Best regards,
Rui Zhao

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

Предыдущее
От: Zhang Mingli
Дата:
Сообщение: Re: Fix typo in src/interfaces/libpq/po/zh_CN.po
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: WIP: new system catalog pg_wait_event