pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Upgrade to 12.2 using same data directory
11+ messages / 6 participants
[nested] [flat]

* Upgrade to 12.2 using same data directory
@ 2020-02-25 11:58 Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 14:35 ` Re: Upgrade to 12.2 using same data directory Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 2 replies; 11+ messages in thread

From: Mihalidesová Jana @ 2020-02-25 11:58 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi,

Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of "new" cluster. Then pg_upgrade check fail.


./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c


Thx,
Jana


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 12:04 ` Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:22   ` Re: Upgrade to 12.2 using same data directory Sushant Pawar <sushant.pawar@ashnik.com>
  2020-02-25 12:52   ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  1 sibling, 2 replies; 11+ messages in thread

From: Josef Šimánek @ 2020-02-25 12:04 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

I think that's not possible. What's the reason to reuse old directory?

út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <
jana.mihalidesova@cetin.cz> napsal:

> Hi,
>
>
>
> Is there possibility to upgrade from 10.6 to 12.2 using exact same data
> directory? First problem is with initialing of “new” cluster. Then
> pg_upgrade check fail.
>
>
>
>
>
> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c
>
>
>
>
>
> Thx,
>
> Jana
>
>
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na
> uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či
> jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v
> podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN
> a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány
> oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí
> jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s
> uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje
> k jednání o smlouvě a jakými se řídí, jsou dostupné zde
> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>
> The content of this message is intended for communication purposes only.
> It does neither represent any contract proposal, nor its amendment or
> acceptance of any potential contract proposal. CETIN a.s. concludes
> contracts or amendments thereto in a written form or in the form and the
> procedure in accordance with relevant general terms and conditions of CETIN
> a.s., if all requirements are agreed. Contracts are concluded by an
> authorized person entitled on the basis of a written authorization.
> Contracts on a future contract are concluded solely in a written form,
> self-signed or signed by means of an advanced electronic signature. The
> conditions under which CETIN a.s. negotiates contracts and under which it
> proceeds are available here
> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
@ 2020-02-25 12:22   ` Sushant Pawar <sushant.pawar@ashnik.com>
  2020-02-25 12:55     ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  1 sibling, 1 reply; 11+ messages in thread

From: Sushant Pawar @ 2020-02-25 12:22 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi Mihalidesová,

It should work with -k option. Can you share the error that you have
received? You can execute pg_upgrade with -c option to identify any
possible manual change required.


Best Regards,

*Sushant Pawar | Database Solution Consultant*

*ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.*

Skype: sush_531 | T: +91 9769559995 <%2B65%206438%203504> | www.ashnik.com



On Tue, Feb 25, 2020 at 5:35 PM Josef Šimánek <josef.simanek@gmail.com>
wrote:

> I think that's not possible. What's the reason to reuse old directory?
>
> út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <
> jana.mihalidesova@cetin.cz> napsal:
>
>> Hi,
>>
>>
>>
>> Is there possibility to upgrade from 10.6 to 12.2 using exact same data
>> directory? First problem is with initialing of “new” cluster. Then
>> pg_upgrade check fail.
>>
>>
>>
>>
>>
>> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c
>>
>>
>>
>>
>>
>> Thx,
>>
>> Jana
>>
>>
>> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh
>> na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy
>> či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo
>> v podobě a postupem podle příslušných všeobecných podmínek společnosti
>> CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou
>> uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o
>> smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně
>> podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN
>> a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde
>> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>>
>> The content of this message is intended for communication purposes only.
>> It does neither represent any contract proposal, nor its amendment or
>> acceptance of any potential contract proposal. CETIN a.s. concludes
>> contracts or amendments thereto in a written form or in the form and the
>> procedure in accordance with relevant general terms and conditions of CETIN
>> a.s., if all requirements are agreed. Contracts are concluded by an
>> authorized person entitled on the basis of a written authorization.
>> Contracts on a future contract are concluded solely in a written form,
>> self-signed or signed by means of an advanced electronic signature. The
>> conditions under which CETIN a.s. negotiates contracts and under which it
>> proceeds are available here
>> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>>
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* RE: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:22   ` Re: Upgrade to 12.2 using same data directory Sushant Pawar <sushant.pawar@ashnik.com>
@ 2020-02-25 12:55     ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 13:13       ` Re: Upgrade to 12.2 using same data directory Sushant Pawar <sushant.pawar@ashnik.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Mihalidesová Jana @ 2020-02-25 12:55 UTC (permalink / raw)
  To: Sushant Pawar <sushant.pawar@ashnik.com>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi,

The -k option doesn’t work. First is the problem to initialize new cluster to the same directory.


initdb: directory "$PATH" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "$PATH" or run initdb
with an argument other than "$PATH".


And if I try to check upgrade from to same data directory


postgres@celpgsqld401.server.cetin:/pgsql/bin/12.2_nipjd/bin> ./pg_upgrade -b $OLD/bin -B $NEW/bin -d $PG_DATA -D $PG_DATA -k -c
Performing Consistency Checks
-----------------------------
Checking cluster versions
This utility can only upgrade to PostgreSQL version 12.
Failure, exiting


Jana

From: Sushant Pawar <sushant.pawar@ashnik.com>
Sent: Tuesday, February 25, 2020 1:23 PM
To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>
Cc: Josef Šimánek <josef.simanek@gmail.com>; pgsql-general@lists.postgresql.org
Subject: Re: Upgrade to 12.2 using same data directory

Hi Mihalidesová,

It should work with -k option. Can you share the error that you have received? You can execute pg_upgrade with -c option to identify any possible manual change required.



Best Regards,

Sushant Pawar | Database Solution Consultant

ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.

Skype: sush_531 | T: +91 9769559995<tel:%2B65%206438%203504> | www.ashnik.com<http://www.ashnik.com/;



On Tue, Feb 25, 2020 at 5:35 PM Josef Šimánek <josef.simanek@gmail.com<mailto:josef.simanek@gmail.com>> wrote:
I think that's not possible. What's the reason to reuse old directory?

út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <jana.mihalidesova@cetin.cz<mailto:jana.mihalidesova@cetin.cz>> napsal:
Hi,

Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of “new” cluster. Then pg_upgrade check fail.


./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c


Thx,
Jana


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:22   ` Re: Upgrade to 12.2 using same data directory Sushant Pawar <sushant.pawar@ashnik.com>
  2020-02-25 12:55     ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 13:13       ` Sushant Pawar <sushant.pawar@ashnik.com>
  0 siblings, 0 replies; 11+ messages in thread

From: Sushant Pawar @ 2020-02-25 13:13 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Yes, Initdb will not work if there are existing cluster data files.

You will have to initialize the  Postgres 12 cluster to a new data
directory path and later you can use either pg_upgrade normal command or
along with an in-place upgrade option. Just a note, make sure you have a
valid backup of the existing cluster before you start with the upgrade.

initialize the new cluster
initdb -D *$PGDATA12*

and then

./pg_upgrade -b $OLD/bin -B $NEW/bin -d $PG_DATA -D *$PGDATA12* -k -c


Best Regards,

*Sushant Pawar | Database Solution Consultant*

*ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.*

Skype: sush_531 | T: +91 9769559995 <%2B65%206438%203504> | www.ashnik.com



On Tue, Feb 25, 2020 at 6:25 PM Mihalidesová Jana <
jana.mihalidesova@cetin.cz> wrote:

> Hi,
>
>
>
> The -k option doesn’t work. First is the problem to initialize new cluster
> to the same directory.
>
>
>
>
>
> initdb: directory "$PATH" exists but is not empty
>
> If you want to create a new database system, either remove or empty
>
> the directory "$PATH" or run initdb
>
> with an argument other than "$PATH".
>
>
>
>
>
> And if I try to check upgrade from to same data directory
>
>
>
>
>
> postgres@celpgsqld401.server.cetin:/pgsql/bin/12.2_nipjd/bin>
> ./pg_upgrade -b $OLD/bin -B $NEW/bin -d $PG_DATA -D $PG_DATA -k -c
>
> Performing Consistency Checks
>
> -----------------------------
>
> Checking cluster versions
>
> This utility can only upgrade to PostgreSQL version 12.
>
> Failure, exiting
>
>
>
>
>
> Jana
>
>
>
> *From:* Sushant Pawar <sushant.pawar@ashnik.com>
> *Sent:* Tuesday, February 25, 2020 1:23 PM
> *To:* Mihalidesová Jana <jana.mihalidesova@cetin.cz>
> *Cc:* Josef Šimánek <josef.simanek@gmail.com>;
> pgsql-general@lists.postgresql.org
> *Subject:* Re: Upgrade to 12.2 using same data directory
>
>
>
> Hi Mihalidesová,
>
>
>
> It should work with -k option. Can you share the error that you have
> received? You can execute pg_upgrade with -c option to identify any
> possible manual change required.
>
>
>
>
> Best Regards,
>
> *Sushant Pawar | Database Solution Consultant*
>
> *ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.*
>
> Skype: sush_531 | T: +91 9769559995 <%2B65%206438%203504> | www.ashnik.com
>
>
>
>
>
>
>
> On Tue, Feb 25, 2020 at 5:35 PM Josef Šimánek <josef.simanek@gmail.com>
> wrote:
>
> I think that's not possible. What's the reason to reuse old directory?
>
>
>
> út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <
> jana.mihalidesova@cetin.cz> napsal:
>
> Hi,
>
>
>
> Is there possibility to upgrade from 10.6 to 12.2 using exact same data
> directory? First problem is with initialing of “new” cluster. Then
> pg_upgrade check fail.
>
>
>
>
>
> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c
>
>
>
>
>
> Thx,
>
> Jana
>
>
>
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na
> uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či
> jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v
> podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN
> a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány
> oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí
> jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s
> uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje
> k jednání o smlouvě a jakými se řídí, jsou dostupné zde
> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>
> The content of this message is intended for communication purposes only.
> It does neither represent any contract proposal, nor its amendment or
> acceptance of any potential contract proposal. CETIN a.s. concludes
> contracts or amendments thereto in a written form or in the form and the
> procedure in accordance with relevant general terms and conditions of CETIN
> a.s., if all requirements are agreed. Contracts are concluded by an
> authorized person entitled on the basis of a written authorization.
> Contracts on a future contract are concluded solely in a written form,
> self-signed or signed by means of an advanced electronic signature. The
> conditions under which CETIN a.s. negotiates contracts and under which it
> proceeds are available here
> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>
>
>
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na
> uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či
> jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v
> podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN
> a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány
> oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí
> jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s
> uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje
> k jednání o smlouvě a jakými se řídí, jsou dostupné zde
> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>
> The content of this message is intended for communication purposes only.
> It does neither represent any contract proposal, nor its amendment or
> acceptance of any potential contract proposal. CETIN a.s. concludes
> contracts or amendments thereto in a written form or in the form and the
> procedure in accordance with relevant general terms and conditions of CETIN
> a.s., if all requirements are agreed. Contracts are concluded by an
> authorized person entitled on the basis of a written authorization.
> Contracts on a future contract are concluded solely in a written form,
> self-signed or signed by means of an advanced electronic signature. The
> conditions under which CETIN a.s. negotiates contracts and under which it
> proceeds are available here
> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* RE: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
@ 2020-02-25 12:52   ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:54     ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:54     ` Re: Upgrade to 12.2 using same data directory Ray O'Donnell <ray@rodonnell.ie>
  2020-02-25 13:38     ` Re: Upgrade to 12.2 using same data directory Paul Förster <paul.foerster@gmail.com>
  1 sibling, 3 replies; 11+ messages in thread

From: Mihalidesová Jana @ 2020-02-25 12:52 UTC (permalink / raw)
  To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

I think it’s strange to change the data directory $PATH every time I upgrade the software, when the data are the same. I have a specific naming convention not using a db version.

/alias/data/<db_name>

J

From: Josef Šimánek <josef.simanek@gmail.com>
Sent: Tuesday, February 25, 2020 1:05 PM
To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Upgrade to 12.2 using same data directory

I think that's not possible. What's the reason to reuse old directory?

út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <jana.mihalidesova@cetin.cz<mailto:jana.mihalidesova@cetin.cz>> napsal:
Hi,

Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of “new” cluster. Then pg_upgrade check fail.


./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c


Thx,
Jana


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:52   ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 12:54     ` Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:59       ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2 siblings, 1 reply; 11+ messages in thread

From: Josef Šimánek @ 2020-02-25 12:54 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

I think it should be possible to rename old cluster data dir (you can use
some suffix) and reuse your current directory name for upgraded cluster.

something similar to (not tested):
mv /alias/data/<db_name> /alias/data/<db_name>.old
./pg_upgrade -b $OLD/bin -B $NEWd/bin -d /alias/data/<db_name>.old -D
/alias/data/<db_name> -k -c

út 25. 2. 2020 v 13:52 odesílatel Mihalidesová Jana <
jana.mihalidesova@cetin.cz> napsal:

> I think it’s strange to change the data directory $PATH every time I
> upgrade the software, when the data are the same. I have a specific naming
> convention not using a db version.
>
>
>
> /alias/data/<db_name>
>
>
>
> J
>
>
>
> *From:* Josef Šimánek <josef.simanek@gmail.com>
> *Sent:* Tuesday, February 25, 2020 1:05 PM
> *To:* Mihalidesová Jana <jana.mihalidesova@cetin.cz>
> *Cc:* pgsql-general@lists.postgresql.org
> *Subject:* Re: Upgrade to 12.2 using same data directory
>
>
>
> I think that's not possible. What's the reason to reuse old directory?
>
>
>
> út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <
> jana.mihalidesova@cetin.cz> napsal:
>
> Hi,
>
>
>
> Is there possibility to upgrade from 10.6 to 12.2 using exact same data
> directory? First problem is with initialing of “new” cluster. Then
> pg_upgrade check fail.
>
>
>
>
>
> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c
>
>
>
>
>
> Thx,
>
> Jana
>
>
>
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na
> uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či
> jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v
> podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN
> a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány
> oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí
> jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s
> uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje
> k jednání o smlouvě a jakými se řídí, jsou dostupné zde
> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>
> The content of this message is intended for communication purposes only.
> It does neither represent any contract proposal, nor its amendment or
> acceptance of any potential contract proposal. CETIN a.s. concludes
> contracts or amendments thereto in a written form or in the form and the
> procedure in accordance with relevant general terms and conditions of CETIN
> a.s., if all requirements are agreed. Contracts are concluded by an
> authorized person entitled on the basis of a written authorization.
> Contracts on a future contract are concluded solely in a written form,
> self-signed or signed by means of an advanced electronic signature. The
> conditions under which CETIN a.s. negotiates contracts and under which it
> proceeds are available here
> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>
>
>
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na
> uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či
> jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v
> podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN
> a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány
> oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí
> jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s
> uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje
> k jednání o smlouvě a jakými se řídí, jsou dostupné zde
> <https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.
>
> The content of this message is intended for communication purposes only.
> It does neither represent any contract proposal, nor its amendment or
> acceptance of any potential contract proposal. CETIN a.s. concludes
> contracts or amendments thereto in a written form or in the form and the
> procedure in accordance with relevant general terms and conditions of CETIN
> a.s., if all requirements are agreed. Contracts are concluded by an
> authorized person entitled on the basis of a written authorization.
> Contracts on a future contract are concluded solely in a written form,
> self-signed or signed by means of an advanced electronic signature. The
> conditions under which CETIN a.s. negotiates contracts and under which it
> proceeds are available here
> <https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* RE: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:52   ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:54     ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
@ 2020-02-25 12:59       ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  0 siblings, 0 replies; 11+ messages in thread

From: Mihalidesová Jana @ 2020-02-25 12:59 UTC (permalink / raw)
  To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Yes,  that’s what I though, but the pre-upgrade check will be done with downtime.
Ok,
Thanks.

J


From: Josef Šimánek <josef.simanek@gmail.com>
Sent: Tuesday, February 25, 2020 1:54 PM
To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Upgrade to 12.2 using same data directory

I think it should be possible to rename old cluster data dir (you can use some suffix) and reuse your current directory name for upgraded cluster.

something similar to (not tested):
mv /alias/data/<db_name> /alias/data/<db_name>.old
./pg_upgrade -b $OLD/bin -B $NEWd/bin -d /alias/data/<db_name>.old -D /alias/data/<db_name> -k -c

út 25. 2. 2020 v 13:52 odesílatel Mihalidesová Jana <jana.mihalidesova@cetin.cz<mailto:jana.mihalidesova@cetin.cz>> napsal:
I think it’s strange to change the data directory $PATH every time I upgrade the software, when the data are the same. I have a specific naming convention not using a db version.

/alias/data/<db_name>

J

From: Josef Šimánek <josef.simanek@gmail.com<mailto:josef.simanek@gmail.com>>
Sent: Tuesday, February 25, 2020 1:05 PM
To: Mihalidesová Jana <jana.mihalidesova@cetin.cz<mailto:jana.mihalidesova@cetin.cz>>
Cc: pgsql-general@lists.postgresql.org<mailto:pgsql-general@lists.postgresql.org>
Subject: Re: Upgrade to 12.2 using same data directory

I think that's not possible. What's the reason to reuse old directory?

út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <jana.mihalidesova@cetin.cz<mailto:jana.mihalidesova@cetin.cz>> napsal:
Hi,

Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of “new” cluster. Then pg_upgrade check fail.


./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c


Thx,
Jana


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve;.

The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve;.


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:52   ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 12:54     ` Ray O'Donnell <ray@rodonnell.ie>
  2 siblings, 0 replies; 11+ messages in thread

From: Ray O'Donnell @ 2020-02-25 12:54 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; Josef Šimánek <josef.simanek@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On 25/02/2020 12:52, Mihalidesová Jana wrote:
> I think it’s strange to change the data directory $PATH every time I
> upgrade the software, when the data are the same. I have a specific
> naming convention not using a db version.

There's a lot to recommend keeping an untouched copy of your old data,
in case something goes wrong....

Ray.

-- 
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
  2020-02-25 12:04 ` Re: Upgrade to 12.2 using same data directory Josef Šimánek <josef.simanek@gmail.com>
  2020-02-25 12:52   ` RE: Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 13:38     ` Paul Förster <paul.foerster@gmail.com>
  2 siblings, 0 replies; 11+ messages in thread

From: Paul Förster @ 2020-02-25 13:38 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi J,

you can do the following:

mkdir /alias/data/dbname-new
initdb -D /alias/data/dbname-new
pg_upgrade \
    -b /old/bin/dir \
    -B /new/bin/dir \
    -d /alias/data/dbname \
    -D /alias/data/dbname-new \
    -k

After the successful upgrade:

rm -rf /alias/data/dbname
mv /alias/data/dbname-new /alias/data/dbname

This is how I always do it. You can't initialize a new database cluster into the same data directory as the old one(!!), which makes sense, but which is exactly what you are trying to do and why it fails on you. Doing it the way described above has the advantages, that

a) you don't need double disk space, espacially in a commercial environment, and which is ugly if pg_upgrade has to copy terabytes of data, and

b) saves time because there is no file copy, and

c) you then have the same data directory naming conventions that you are used to

Also see:

initdb --help
pg_upgrade --help

You can properly put this into a script. My last migrations (11.5 to 12.1) took about 18 seconds each. This interruption usually can be communicated to the users.

If they're used to Oracle, they're used to interruptions in the range 90-120 minutes. :-D So there should be no problems with about a minute! But that of course requires proper planning and proper scripting. :-) Practice that (including the scripting!) on an identical test database setup in advance.

Hope this helps,
Paul


> On 25. Feb, 2020, at 13:52, Mihalidesová Jana <jana.mihalidesova@cetin.cz> wrote:
> 
> I think it’s strange to change the data directory $PATH every time I upgrade the software, when the data are the same. I have a specific naming convention not using a db version.
>  
> /alias/data/<db_name>
>  
> J
>  
> From: Josef Šimánek <josef.simanek@gmail.com> 
> Sent: Tuesday, February 25, 2020 1:05 PM
> To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>
> Cc: pgsql-general@lists.postgresql.org
> Subject: Re: Upgrade to 12.2 using same data directory
>  
> I think that's not possible. What's the reason to reuse old directory?
>  
> út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana <jana.mihalidesova@cetin.cz> napsal:
> Hi,
>  
> Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of “new” cluster. Then pg_upgrade check fail.
>  
>  
> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c
>  
>  
> Thx,
> Jana
> 
> 
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde.
> 
> The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here.
> 
> 
> Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností CETIN a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti CETIN a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž CETIN a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde.
> 
> The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. CETIN a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of CETIN a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which CETIN a.s. negotiates contracts and under which it proceeds are available here.






^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Upgrade to 12.2 using same data directory
  2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
@ 2020-02-25 14:35 ` Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 0 replies; 11+ messages in thread

From: Laurenz Albe @ 2020-02-25 14:35 UTC (permalink / raw)
  To: Mihalidesová Jana <jana.mihalidesova@cetin.cz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Tue, 2020-02-25 at 11:58 +0000, Mihalidesová Jana wrote:
> Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory?
> First problem is with initialing of “new” cluster. Then pg_upgrade check fail.
> 
> ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c

No, but that is not necessary.

- Create a new cluster on the same file system as the old one.

- Run "pg_upgrade" with the -k option.

- Remove the old cluster and move the new one in the place of
  the old one.

- Start the server (with the new binaries of course).

Don't forget to ANALYZE.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2020-02-25 14:35 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 11:58 Upgrade to 12.2 using same data directory Mihalidesová Jana <jana.mihalidesova@cetin.cz>
2020-02-25 12:04 ` Josef Šimánek <josef.simanek@gmail.com>
2020-02-25 12:22   ` Sushant Pawar <sushant.pawar@ashnik.com>
2020-02-25 12:55     ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
2020-02-25 13:13       ` Sushant Pawar <sushant.pawar@ashnik.com>
2020-02-25 12:52   ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
2020-02-25 12:54     ` Josef Šimánek <josef.simanek@gmail.com>
2020-02-25 12:59       ` Mihalidesová Jana <jana.mihalidesova@cetin.cz>
2020-02-25 12:54     ` Ray O'Donnell <ray@rodonnell.ie>
2020-02-25 13:38     ` Paul Förster <paul.foerster@gmail.com>
2020-02-25 14:35 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox