Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDVw0-0000cV-Cf for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2015 10:53:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZDVvz-0004ZE-Tf for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2015 10:53:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZDVtO-0001fB-JA for pgsql-hackers@postgresql.org; Fri, 10 Jul 2015 10:50:54 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZDVtL-0000Fo-Po for pgsql-hackers@postgresql.org; Fri, 10 Jul 2015 10:50:53 +0000 Received: from intern.anarazel.de (unknown [37.84.160.201]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 56114860002; Fri, 10 Jul 2015 12:50:49 +0200 (CEST) Date: Fri, 10 Jul 2015 12:44:25 +0200 From: Andres Freund To: Heikki Linnakangas Cc: Tom Lane , Fujii Masao , Martijn van Oosterhout , PostgreSQL-development Subject: Re: WAL logging problem in 9.4.3? Message-ID: <20150710104425.GC26521@alap3.anarazel.de> References: <20150703172605.GM3291@awork2.anarazel.de> <27532.1436195680@sss.pgh.pa.us> <20150706152123.GK8902@alap3.anarazel.de> <28415.1436197794@sss.pgh.pa.us> <20150709182315.GG10242@alap3.anarazel.de> <29916.1436483171@sss.pgh.pa.us> <559F8759.2090401@iki.fi> <20150710091420.GK340@alap3.anarazel.de> <559FA0BA.3080808@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559FA0BA.3080808@iki.fi> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-07-10 13:38:50 +0300, Heikki Linnakangas wrote: > In the long-term, I'd like to refactor this whole thing so that we never > WAL-log any operations on a relation that's created in the same transaction > (when wal_level=minimal). Instead, at COMMIT, we'd fsync() the relation, or > if it's smaller than some threshold, WAL-log the contents of the whole file > at that point. That would move all that > more-difficult-than-it-seems-at-first-glance logic from COPY and indexam's > to a central location, and it would allow the same optimization for all > operations, not just COPY. But that probably isn't feasible to backpatch. I don't think that's really realistic until we have a buffer manager that lets you efficiently scan for all pages of a relation :( -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers