Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version
Дата
Msg-id 694458.1603243042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> I wonder if pg_upgrade should try to rmdir() the tablespace dirs before
> restoring global objects, allowing it to succeed, rather than just "failing
> early".

I'm a little confused about that.  If the directories aren't empty,
that will fail, but if they are, shouldn't the upgrade just work?
initdb is not normally unhappy about the target directory existing
if it's empty.

The reason why rmdir-and-recreate is not a great substitute for
"it just works" is that (a) you may lose the intended ownership or
permissions of those dirs, (b) you may lack write permission on their
parent dirs.  So cases where the DBA has pre-created the directories
are important to support.

            regards, tom lane



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

Предыдущее
От: "Shinoda, Noriyoshi (PN Japan A&PS Delivery)"
Дата:
Сообщение: RE: Resetting spilled txn statistics in pg_stat_replication
Следующее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: [Patch] Optimize dropping of relation buffers using dlist