Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQeq0-0005wf-1a for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:19:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQepy-0005j2-HY for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:19:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQepy-0005iX-4Z for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:19:50 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQepu-0007ww-9t for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:19:48 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id E3A1299385 for ; Tue, 14 May 2019 14:19:44 -0700 (PDT) Date: Tue, 14 May 2019 14:19:44 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Table update: restore or replace? In-Reply-To: Message-ID: References: <5fb66fe3-0aa0-3d6d-db53-172a6c3f1a30@aklaver.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 14 May 2019, Adrian Klaver wrote: > Does the table you overwrote the data change much? Adrian, Yes. It's in my business tracking database so it's updated almost every day. > If not it might be safer to just fetch it from the April 20th dump and > then apply the changes since then. The column I FUBAR'd holds e-mail addresses. What I'll do is set all to NULL and find the e-mail addresses I have external to the database and enter them in a large UPDATE TABLE. And I think I'll set up a cron job to do a database dump each day with the date appended to the file name in the bash shell script. Thanks, Rich