Обсуждение: reuse tablespace from crashed PSQL instance

Поиск
Список
Период
Сортировка

reuse tablespace from crashed PSQL instance

От
Artem Tomyuk
Дата:
Hi. 

Is it possible to reconnect tablespace from old setup to the new one with the same version of PGSQL?

Thanks.

Re: reuse tablespace from crashed PSQL instance

От
Alex Ignatov
Дата:
There is nothing in relation data files that prevent you to do it (no headers etc in files) except xmin and xmax info from tuple %). 
So the short answer is yes you can do it but may be you will not see any data from it if for example current txid is less than xmin's from data files.
PS There is no transportable tablespaces as they are in Oracle. So you can only try it  at home ;)

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




On Tue, Jun 21, 2016 at 11:26 AM +0300, "Artem Tomyuk" <admin@leboutique.com> wrote:

Hi. 

Is it possible to reconnect tablespace from old setup to the new one with the same version of PGSQL?

Thanks.

Re: reuse tablespace from crashed PSQL instance

От
Artem Tomyuk
Дата:
So what are my steps to reconnect it? 

I should run create tablespace command again or just add path and name to the postgresql.conf?

2016-06-21 11:38 GMT+03:00 Alex Ignatov <a.ignatov@postgrespro.ru>:
There is nothing in relation data files that prevent you to do it (no headers etc in files) except xmin and xmax info from tuple %). 
So the short answer is yes you can do it but may be you will not see any data from it if for example current txid is less than xmin's from data files.
PS There is no transportable tablespaces as they are in Oracle. So you can only try it  at home ;)

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




On Tue, Jun 21, 2016 at 11:26 AM +0300, "Artem Tomyuk" <admin@leboutique.com> wrote:

Hi. 

Is it possible to reconnect tablespace from old setup to the new one with the same version of PGSQL?

Thanks.

Re: reuse tablespace from crashed PSQL instance

От
Alex Ignatov
Дата:
Please describe more  your problem. Say A happend and I need B
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

On 21.06.2016 11:40, Artem Tomyuk wrote:
So what are my steps to reconnect it? 

I should run create tablespace command again or just add path and name to the postgresql.conf?

2016-06-21 11:38 GMT+03:00 Alex Ignatov <a.ignatov@postgrespro.ru>:
There is nothing in relation data files that prevent you to do it (no headers etc in files) except xmin and xmax info from tuple %). 
So the short answer is yes you can do it but may be you will not see any data from it if for example current txid is less than xmin's from data files.
PS There is no transportable tablespaces as they are in Oracle. So you can only try it  at home ;)

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




On Tue, Jun 21, 2016 at 11:26 AM +0300, "Artem Tomyuk" <admin@leboutique.com> wrote:

Hi. 

Is it possible to reconnect tablespace from old setup to the new one with the same version of PGSQL?

Thanks.