Re: pg_restore - generated column - not populating

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Santosh Udupi <email(at)hitha(dot)net>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore - generated column - not populating
Date: 2021-02-23 05:23:02
Message-ID: ab320161-2511-2559-b190-f71b07b5d089@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

On 2/22/21 7:43 PM, Santosh Udupi wrote:
> If I backup using pgAdmin, I am able to restore using pg_restore but for
> some reason, pg_rsestore on the output from pg_dump does not create
> values for the generated columns
>

To troubleshoot this:

1) Stick to one dump/restore combination. The three versions you tried
before just confuse the issue. For instance:

pg_dump -Ft mydb > mydb.tar
pg_restore -Ft -d mydb mydb.backup

makes no sense. As mydb.backup came from:

pg_dump -C -Fc mydb > mydb.backup

I have not tested, but I'm pretty sure the pg_restore just ignored the
-Ft and just did -Fc.

2) Big explicit in your dump and restore commands for -h(ost), -p(ort)
and -U(ser). I suspect you may not be restoring to where you think you are.

3) Closely follow the progress of both the dump and the restore.

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2021-02-23 05:28:18 Re: BUG #16887: Group by is faster than distinct
Previous Message Santosh Udupi 2021-02-23 03:43:36 Re: pg_restore - generated column - not populating

Browse pgsql-general by date

  From Date Subject
Next Message Oleksandr Voytsekhovskyy 2021-02-23 09:30:56 Re: Simple IN vs IN values performace
Previous Message Michael Brown 2021-02-23 04:25:49 Re: fdatasync performance problem with large number of DB files