Re: pg_restore - generated column - not populating

From: Santosh Udupi <email(at)hitha(dot)net>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore - generated column - not populating
Date: 2021-02-23 17:18:00
Message-ID: CACLRvHYQp2BdiS1w+Pt6tHsub=x19-E+L67R2hiJFNwbHY9jYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Right. pg_dump under the pgAdmin runtime folder works perfectly. pg_dump
in postgres13 (ubuntu) does not work. Exact same syntax.

When I try to restore, the backup that was taken using pgAdmin's version
restores properly but the one taken using postgres13's pg_dump, restores
the database but does not populate the generated columns. Strange!!

On Tue, Feb 23, 2021 at 7:50 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 2/23/21 7:39 AM, Santosh Udupi wrote:
> > Got it. Must be the version difference. I run pgAdmin on Windows PC but
> > direct pg_dump on Ubuntu 20.04.
>
> The OS does not really make a difference it is the pg_dump/restore
> versions and the Postgres server(s) versions that are important.
>
> >
> > On Tue, Feb 23, 2021 at 7:27 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> > <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
> >
> > On 2/23/21 6:36 AM, Santosh Udupi wrote:
> > > The pg_restore command is actually pg_restore -Ft -d mydb
> > mydb.tar (my
> > > mistake).
> > >
> > > I didn't provide the -h -p -U since I use the super user account
> to
> > > restore (I will try adding them). The restore had always worked
> > until I
> > > altered the table in the source database.
> > >
> > > After I added the column, the restore still takes place but does
> not
> > > populate the generated column. I did a backup using pgAdmin and
> the
> > > restore populated all data using the same syntax on the tar file.
> > So my
> > > suspicion is that pg_dump is not doing the dump correctly. I will
> > work
> > > on it further. Thanks for your suggestions.
> > >
> >
> > pgAdmin uses pg_dump to do backups.
> >
> >
> > --
> > 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-02-23 17:34:04 Re: pg_restore - generated column - not populating
Previous Message Adrian Klaver 2021-02-23 15:50:48 Re: pg_restore - generated column - not populating

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-02-23 17:20:34 Re: Custom base type and suboptimal query plans
Previous Message Ayo 2021-02-23 16:09:39 Re: Custom base type and suboptimal query plans