Re: Facing issues with pgsql upgrade.

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ajay Kajla <ajaykajla(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Facing issues with pgsql upgrade.
Date: 2022-04-18 16:33:15
Message-ID: 71980918-bfe0-4dac-d941-7539f510bf8c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/17/22 22:54, Ajay Kajla wrote:
> Hi Adrian,
>
> Command \l gives the list of db available DBs in the cluster including
> template0 and template1, I can connect to other DBs and run queries as
> well.
>
> My motive is just to upgrade pgsql from 9.6 to 13 using the pg_upgrade
> command.

Do you have file level backup of the Postgres data directory from before
the deletion of template0 and template1 directories?

Why is important that you use pg_upgrade instead of using pg_dumpall as
David Johnston suggested?

In any case I would suggest doing a pg_dumpall against the 9.6 instance
just to have a backup.

>
> Regards,
> Ajay
>
> On Mon, Apr 18, 2022 at 9:48 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 4/17/22 19:11, Ajay Kajla wrote:
> > Thanks Adrian,
> >
> > 1. What if we re-create template0 and template1?
>
> First I would determine what else might be missing?
>
> In psql what happens if you do:
>
> \l
>
> to get a list of databases?
>
> And can you connect to the databases other then postgres?
>
> >
> > 2. how to restore them if we have a folder backup of the data
> directory?
>
> When was the backup done and how?
>
> Are you sure it is a complete backup?
>
> Do you have tablespaces,other then the default, in use?
>
>
> >
> > Regards,
> > Ajay
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>
>
> --
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2022-04-18 18:39:21 Re: Feedback about hybrid SAN snap and rsync'd approach for large systemcloning
Previous Message Adrian Klaver 2022-04-18 16:00:20 Re: Huge archive log generate in Postgresql-13