New pg_upgrade data directory inside old one?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема New pg_upgrade data directory inside old one?
Дата
Msg-id 20160215172926.GA31273@momjian.us
обсуждение исходный текст
Ответы Re: New pg_upgrade data directory inside old one?  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Someone on IRC reported that if they had run the pg_upgrade-created
delete_old_cluster.sh shell script it would have deleted their old _and_
new data directories.  (Fortunately they didn't run it.)

I was confused how this could have happened, and the user explained that
their old cluster was in /u/pgsql/data, and that they wanted to switch to
a per-major-version directory naming schema, so they put the new data
directory in /u/pgsql/data/9.5.  (They could have just moved the
directory while the server was down, but didn't.)

Unfortunately, there is no check for having the new cluster data
directory inside the old data directory, only a check for tablespace
directories in the old cluster.  (I never anticipated someone would do
this.)

The attached patch adds the proper check.  This should be backpatched to
all supported Postgres versions.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Roman grave inscription                             +

Вложения

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

Предыдущее
От: Martin Liška
Дата:
Сообщение: [PATCH] Code refactoring related to -fsanitize=use-after-scope
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: New pg_upgrade data directory inside old one?