Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDYXt-0002xY-70 for pgsql-general@arkaria.postgresql.org; Wed, 02 Sep 2020 19:35:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDYXr-00072n-RB for pgsql-general@arkaria.postgresql.org; Wed, 02 Sep 2020 19:35:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDYXr-00072g-JK for pgsql-general@lists.postgresql.org; Wed, 02 Sep 2020 19:35:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDYXp-00063M-DO for pgsql-general@lists.postgresql.org; Wed, 02 Sep 2020 19:35:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 082JZfeS427490; Wed, 2 Sep 2020 15:35:41 -0400 From: Tom Lane To: Alvaro Herrera cc: Lionel Bouton , pgsql-general@lists.postgresql.org Subject: Re: Reconstructing transaction content after the fact In-reply-to: <20200902192620.GA26472@alvherre.pgsql> References: <20200902192620.GA26472@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 02 Sep 2020 15:26:20 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <427488.1599075341.1@sss.pgh.pa.us> Date: Wed, 02 Sep 2020 15:35:41 -0400 Message-ID: <427489.1599075341@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Sep-02, Tom Lane wrote: >> See VACUUM FREEZE. You couldn't hide connections immediately after >> insertion, but if the idea is to sanitize every so often, it'd help. > Starting with 9.4 which introduced the use of HEAP_XMIN_FROZEN > combination in infomask to replace rewriting the xmin value proper, the > Xids will be preserved by freezing, so that won't help. Ah, right. > One option to hide the xids might be to recreate the tables every once > in a while, with something like Hmm. Expensive, but if you were willing to make it even more expensive, you could also defeat the tuple-ordering attacks mentioned upthread: CREATE TABLE votes_copy AS SELECT * FROM votes ORDER BY random(); regards, tom lane