Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YxMOP-0002VX-IH for pgsql-admin@arkaria.postgresql.org; Tue, 26 May 2015 21:28:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YxMOO-0003B3-Q3 for pgsql-admin@arkaria.postgresql.org; Tue, 26 May 2015 21:28:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YxMON-0003Aw-Nx for pgsql-admin@postgresql.org; Tue, 26 May 2015 21:28:07 +0000 Received: from mout.web.de ([212.227.17.11]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1YxMOK-0008JL-Qd for pgsql-admin@postgresql.org; Tue, 26 May 2015 21:28:06 +0000 Received: from vm-mailsrv.lan.net ([87.155.118.40]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0M09hY-1ZFrD03Rtc-00uMuw; Tue, 26 May 2015 23:27:59 +0200 Received: from localhost (localhost [127.0.0.1]) by vm-mailsrv.lan.net (Postfix) with ESMTP id 76068F12E; Tue, 26 May 2015 23:27:58 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -2.896 X-Spam-Level: X-Spam-Status: No, score=-2.896 tagged_above=-99.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from vm-mailsrv.lan.net ([127.0.0.1]) by localhost (vm-mailsrv.lan.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7YXj0_YIs510; Tue, 26 May 2015 23:27:54 +0200 (CEST) Received: from [10.94.76.50] (ipad.lan.net [10.94.76.50]) by vm-mailsrv.lan.net (Postfix) with ESMTP id 43635F12B; Tue, 26 May 2015 23:27:54 +0200 (CEST) Content-Type: multipart/alternative; boundary=Apple-Mail-22014826-CFB1-40D6-A6DB-BC8132E8D6A8 Mime-Version: 1.0 (1.0) Subject: Re: refreshing a database with pg_dump and psql From: Jan Lentfer X-Mailer: iPad Mail (12D508) In-Reply-To: Date: Tue, 26 May 2015 23:27:51 +0200 Cc: "pgsql-admin@postgresql.org" Content-Transfer-Encoding: 7bit Message-Id: References: To: "Rossi, Maria" X-Provags-ID: V03:K0:9DPE1WenUaK5wvul1pcyBjAodkRa6OwptSMbhGh6zeBpMzLLOfZ 73L4xbBjEJLKC4JVu87NmQB//lH61WRGIIO4c6jIKYYIhPqs5nSrTB3JHY8IFZaC+qoVmS3 OMpwFC/TDxVF4HDaOlpngyRhaTBrB199yeadkjWBpyqzX3dFL/N3+vYvnYcS5fAeAqFetTp Y49sl6C5tB1U5BlAIdz4A== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail-22014826-CFB1-40D6-A6DB-BC8132E8D6A8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Am 26.05.2015 um 23:09 schrieb Rossi, Maria : >=20 > Hi, > =20 > I have a database that was created from a =E2=80=98pg_dump =E2=80=93C=E2=80= =99. No problems there. Then I ran the pg_dump again, this time without t= he =E2=80=93C. and tried to load it. But got a bunch of =E2=80=98object a= lready exist=E2=80=99. =20 > Can=E2=80=99t I refresh an existing database from a plain pg_dump? Is th= ere an option that I have to use? > Thanks. > =20 Check the pg_restore manual. There is a "clean" option when using the custom= format. I think this is what you are looking for. Regards Jan= --Apple-Mail-22014826-CFB1-40D6-A6DB-BC8132E8D6A8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable




Am 26.05.20= 15 um 23:09 schrieb Rossi, Maria <maria.rossi@us.pgds.com>:

= =

Hi,

 

I have a database that was created from a =E2=80=98pg= _dump =E2=80=93C=E2=80=99.  No problems there.  Then  I ran t= he pg_dump  again, this time without the =E2=80=93C. and tried to load i= t.   But   got a bunch of =E2=80=98object already exist=E2= =80=99.   

Can=E2=80=99t I refresh an existing database from a p= lain pg_dump?  Is  there an option that I have to use?<= /p>

Thanks.

 

Check the pg_restore manual. There is a "clean" option when usi= ng the custom format. I think this is what you are looking for.

Regards

Jan
= --Apple-Mail-22014826-CFB1-40D6-A6DB-BC8132E8D6A8--