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 1hQes2-00064e-1A for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:21:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQes0-0001g2-CQ for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:21:56 +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 1hQerz-0001fv-VK for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:21:56 +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 1hQerx-00083N-EU for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:21:54 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 5A3CC99385 for ; Tue, 14 May 2019 14:21:52 -0700 (PDT) Date: Tue, 14 May 2019 14:21:52 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Table update: restore or replace? In-Reply-To: <28923.1557868239@sss.pgh.pa.us> Message-ID: References: <5fb66fe3-0aa0-3d6d-db53-172a6c3f1a30@aklaver.com> <28923.1557868239@sss.pgh.pa.us> 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, Tom Lane wrote: > Yeah. You can't just selectively copy files, because the data files are > dependent on the contents of the pg_xact transaction log; it's all or > nothing. Tom, That's why I thought of copying the entire data/ directory. > Also, I don't know what method you've been using to make file-level > backups, but they're really pretty worthless unless you (a) stop the > server or (b) use a filesystem snapshot. Otherwise you're very likely to > have inconsistent data. I run dirvish which runs each night starting at 00:30 am when there's no activity (by me, at least) on the database. Regards, Rich