Thread: Postgresql Upgrade

Postgresql Upgrade

From
SOzcn
Date:
Hello,

There is few cluster which is using fk server and postgis. 

For the upgrade this servers, I need the drop extension and then re-create them.
Just in case if I do that with pg_dump, am i still have to re-create postgis and fk servers? 
I didin't want waste time before the do that so I need your advice.

Is there anyone have experience with this?

Have nice day.

Re: Postgresql Upgrade

From
Ron Johnson
Date:
On Tue, Aug 27, 2024 at 6:31 AM SOzcn <selahattinozcnma@gmail.com> wrote:
Hello,

There is few cluster which is using fk server and postgis. 

For the upgrade this servers, I need the drop extension and then re-create them.
Just in case if I do that with pg_dump, am i still have to re-create postgis and fk servers? 

Out of curiosity, what's "fk"?  It can't be "FOREIGN KEY", can it?
 
I didin't want waste time before the do that so I need your advice.

I doubt it, since pg_dump generates all of CREATE (and ALTER) statements required for a database, and pg_restore then runs them.

Thus, if (new) postgis and fk packages are installed on the new server, pg_restore will CREATE EXTENSION with the new version of postgis.

Of course, there might be some hard-coded extension version numbers in the dump.  Run "pg_dump --schema-only $DB >> ${DB}.sql" and then scan it for postgis references to "see what you see".  Maybe even run that no-data script on the new server, and see what postgis and fk versions you get.
 
Is there anyone have experience with this?

--
Death to America, and butter sauce.
Iraq lobster!