Re: pg_restore fails when psql succeeds

From: Cherio <cherio(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: pg_restore fails when psql succeeds
Date: 2020-12-13 19:27:59
Message-ID: CAKHqFk+rZ25dcON4MdF4wS1qb-GouMh2wrsOm4u6DL1jY=6iRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The exact command is nothing fancy really. The complete exact command is
below

export PGPASSWORD=xxxxxxxxxxxxxxxxxxx
pg_restore --verbose --no-password --clean --if-exists -h 111.111.111.111
-p 5432 -U user -d blankdbfromstandardtemplate0 /PATH/EXPORTEDDIR 2>&1 |
tee logfile

I was able to import with pg_restore eventually after I disabled huge_pages
on the OS level. Huge pages were initially configured exactly as suggested
here:
https://www.postgresql.org/docs/13/kernel-resources.html#LINUX-HUGE-PAGES.
This is a dedicated postgres DB server machine but I always verify memory
settings to leave a little wiggle room; postgresqltuner.pl report was clear.

On Sun, Dec 13, 2020 at 1:00 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 12/12/20 12:39 PM, Cherio wrote:
> > I install PostgreSQL from "apt.postgresql.org
> > <http://apt.postgresql.org>" repository:
> > $ /usr/lib/postgresql/13/bin/postgres --version
> > postgres (PostgreSQL) 13.1 (Ubuntu 13.1-1.pgdg20.04+1)
> >
> > It runs in a VM, the most recent & updated version of Ubuntu LTS 20.04
> > $ uname -a
> > Linux dbwfprod8-20 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19
> > UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
> > RAM: 48GB
> > CPU: 8
> > Storage: 800GB (plenty of free space left)
> >
> > I attached customizations to postgresql.conf and a few relevant errors
> > from the PostgreSQL server log; there were no relevant messages in
> > journalctl.
> >
> >
>
> What is the exact command you are using to do the restore?
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2020-12-13 21:03:30 Re: Is there a way to dump schema to files on disk and keep them in sync
Previous Message Adrian Klaver 2020-12-13 18:09:21 Re: Is there a way to dump schema to files on disk and keep them in sync