pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Santosh Udupi <email@hitha.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_restore - generated column - not populating
Date: Tue, 23 Feb 2021 16:42:23 -0800
Message-ID: <b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com> (raw)
In-Reply-To: <CACLRvHZ-jt43DeZLwUkUB7zOwy5TfUFCYWy0H436xc=Yn+gLDg@mail.gmail.com>
References: <CACLRvHZ4a-+SM_159+tcrHdEqxFrG=W4gwTRnwf7Oj0UNj5R2A@mail.gmail.com>
	<CACLRvHYzbfhkg6Z2=HdrKv6YhcipXgnyMhEz0xx1dSALDcn_hQ@mail.gmail.com>
	<ab320161-2511-2559-b190-f71b07b5d089@aklaver.com>
	<CACLRvHaB_mLCygA6AQnc5jh+cBme2A-=Su9oDyO4O20k5ZSKSw@mail.gmail.com>
	<89a62c70-4386-a3ef-f2ea-5e0f448cef11@aklaver.com>
	<CACLRvHaK2tCmXPKSrjKAiQdVV0+zMQ_Gy3onpkFXD4VLnm46Ng@mail.gmail.com>
	<0275a27c-2447-f8e5-489b-d7e419997299@aklaver.com>
	<CACLRvHYQp2BdiS1w+Pt6tHsub=x19-E+L67R2hiJFNwbHY9jYw@mail.gmail.com>
	<3874667.1614101644@sss.pgh.pa.us>
	<CACLRvHaX_6fU_uoEJv=DPNYc4bcYOrmzn+e=dWhW4-com5K9zQ@mail.gmail.com>
	<3877970.1614105611@sss.pgh.pa.us>
	<CACLRvHZHqzVddKL8_v0-cMTezuXnyMAmpYErvJC2gghreVh72g@mail.gmail.com>
	<72424ae7-0c66-5377-7db9-48425b853dd9@aklaver.com>
	<CACLRvHb_uHK9gH7wyv5yXeZT_J_UG-Y5Zi78wkhMZdSurK=B=A@mail.gmail.com>
	<344c6530-cabf-12df-6814-401a7eb8a800@aklaver.com>
	<CACLRvHZ-jt43DeZLwUkUB7zOwy5TfUFCYWy0H436xc=Yn+gLDg@mail.gmail.com>

On 2/23/21 4:25 PM, Santosh Udupi wrote:
> Yes,  this is what we have been doing now:- Backup using pg_dump, create 
> the new database at the destination, manually create the tables which 
> give problems, and then do the pg_restore. Another solution for us is to 

Well that introduces another error, where the restore trips on the 
existing table(s). By the way this is the first time you mentioned 
multiple tables. Do they share similar structure? In any case you should 
not have to do this and in the spirit of identifying the problem and 
fixing it, what happens if you do:

1) Dump locally

2) Restore locally, without creating the tables ahead.

3) Examine and report back here the table(s) schema(and sample data) 
after the fresh restore.

4) Drop the table(s) and create from script and populate. Report on 
whether they work.

> backup using pg_dump that comes with pgAdmin (Windows), rsync it to the 
> destination server and then do the pg_restore on the server.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (26+ messages)  latest in thread

Message-ID: <b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com>
Permalink:  ../b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com/
Also on:    postgresql.org/message-id/b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: adrian.klaver@aklaver.com, email@hitha.net, tgl@sss.pgh.pa.us, pgsql-general@lists.postgresql.org
  Subject: Re: pg_restore - generated column - not populating
  In-Reply-To: <b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com>
  References: <CACLRvHZ4a-+SM_159+tcrHdEqxFrG=W4gwTRnwf7Oj0UNj5R2A@mail.gmail.com> <ab320161-2511-2559-b190-f71b07b5d089@aklaver.com> <CACLRvHaB_mLCygA6AQnc5jh+cBme2A-=Su9oDyO4O20k5ZSKSw@mail.gmail.com> <89a62c70-4386-a3ef-f2ea-5e0f448cef11@aklaver.com> <CACLRvHaK2tCmXPKSrjKAiQdVV0+zMQ_Gy3onpkFXD4VLnm46Ng@mail.gmail.com> <0275a27c-2447-f8e5-489b-d7e419997299@aklaver.com> <CACLRvHYQp2BdiS1w+Pt6tHsub=x19-E+L67R2hiJFNwbHY9jYw@mail.gmail.com> <3874667.1614101644@sss.pgh.pa.us> <CACLRvHaX_6fU_uoEJv=DPNYc4bcYOrmzn+e=dWhW4-com5K9zQ@mail.gmail.com> <3877970.1614105611@sss.pgh.pa.us> <CACLRvHZHqzVddKL8_v0-cMTezuXnyMAmpYErvJC2gghreVh72g@mail.gmail.com> <72424ae7-0c66-5377-7db9-48425b853dd9@aklaver.com> <CACLRvHb_uHK9gH7wyv5yXeZT_J_UG-Y5Zi78wkhMZdSurK=B=A@mail.gmail.com> <344c6530-cabf-12df-6814-401a7eb8a800@aklaver.com> <CACLRvHZ-jt43DeZLwUkUB7zOwy5TfUFCYWy0H436xc=Yn+gLDg@mail.gmail.com> <b8a560b8-8397-0a74-9f73-56d8770504c1@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox