Re: Upgrading to v12

From: Brad White <b55white(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Upgrading to v12
Date: 2022-11-12 04:59:27
Message-ID: CAA_1=91PLFenp7aoZYy8rm76pBz4LcCScMP7cTfUKqb5PYP+gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 11, 2022, 9:57 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 11/11/22 18:41, Brad White wrote:
> > > From your original post, what did "Not the half dozen restored copies"
> > mean?
> > Over time, we've restored multiple copies for testing and reproducing
> > various issues.
> >
> > I'm only trying to set up replication one one of those copies.
> >
> > > In other words define the restore process.
> >
> > Command to back up the database:
> > "C:\Program Files\PostgreSQL\9.4\bin\pg_dump.exe" --host localhost
> > --port 5432 --username "postgres" --no-password --format custom --blobs
> > --verbose --file "DB_"%datestr%"\DB_"%datestr%.backup "DB"
> >
> > Restore:
> > $pgdir\pg_restore.exe -h localhost -p 5433 -U postgres --no-password
> > --clean --if-exists --format=custom --dbname="DB_test"
> > "C:\Temp\DB_20220922_2300\DB_20220922_2300.backup"
>
> Alright I am confused. You said you had multiple copies of the database
> on one cluster.

yes. They've been deleted now, but we did.

The above though shows you restoring to different
> cluster(5433) then the cluster(5432) you dumped from.
>

Yes. The backup is from production.
V9.4 is running on 5432 on all servers.
That particular restore happens to be on the dev server. 5433 is v12.

>
> Also why
>
> "C:\Program Files\PostgreSQL\9.4\bin\pg_dump.exe
>
> vs
>
> $pgdir\pg_restore.exe
> ?
>
> Is pgdir different from "C:\Program Files\PostgreSQL\9.4\bin\ ?
>

"C:\Program Files... is from the backup script. Production is always only
on one version.

$pgdir is from the restore script.
So it might be
PostgreSQL\9.4\bin
or
PostgreSQL\12\bin
or
PostgreSQL\15\bin

Turns out that it doesn’t work well to mix the exe from one and the port
from another.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2022-11-12 05:07:15 Printf-like function
Previous Message Adrian Klaver 2022-11-12 03:57:51 Re: Upgrading to v12