Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axGuP-0007A3-9h for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2016 16:41:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1axGuO-0004Ps-Ne for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2016 16:41:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axGuN-0004Ot-K0 for pgsql-hackers@postgresql.org; Mon, 02 May 2016 16:41:19 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axGuH-0006Zs-Qn for pgsql-hackers@postgresql.org; Mon, 02 May 2016 16:41:18 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id ADA0B20D06 for ; Mon, 2 May 2016 12:41:12 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 02 May 2016 12:41:12 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=oo0C8Sph4g4tP7AtEeuCgL7zeEo=; b=oiuMp IUr1kgB8j/z7y+SXwfLdbmRKh8+c3Krfalq4yC5dZsQ0aG4Hm8AGgZb3TX5L7u2P toPJS3xIPb6/p7Iymns1vEd7M+wYtTVn/TXB1dnR3VZ749j6zGmQ+ifpXBnEMwQE +sVXK9MEf3I5FGHE1tEMfajjOQb1IrxvivYrHQ= X-Sasl-enc: g6/a+LmyNbHkioJfVV6fztyPOeRkzvDbSn9JN+NbuRB7 1462207272 Received: from intern.anarazel.de (unknown [192.77.237.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CEB6C00017; Mon, 2 May 2016 12:41:12 -0400 (EDT) Date: Mon, 2 May 2016 09:41:11 -0700 From: Andres Freund To: Robert Haas Cc: Thom Brown , Abhijit Menon-Sen , Michael Paquier , Haribabu Kommi , Fabien COELHO , "pgsql-hackers@postgresql.org" Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions Message-ID: <20160502164111.cpupbbkab6ik7wwd@alap3.anarazel.de> References: <20160425155627.e4yk72bm2naisesz@alap3.anarazel.de> <20160425180521.2g6o4tgpkc3jneyj@alap3.anarazel.de> <20160425205720.i2ldnkwj6a2ldz7g@alap3.anarazel.de> <20160426213207.j3xi2amneejm3ed6@alap3.anarazel.de> <20160429235837.b63wkjw4dduf56wt@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) 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 2016-05-02 12:29:45 -0400, Robert Haas wrote: > On Fri, Apr 29, 2016 at 7:58 PM, Andres Freund wrote: > > Basically the reason for the problem is that mdsync() needs to access > > "formally non-existant segments" (as in ones where previous segments are > > < RELSEG_SIZE), because we queue (and the might be preexistant) fsync > > requests via register_dirty_segment() in mdtruncate(). > > Shouldn't we just throw those flush requests away? Well, we explicity make them for truncations (register_dirty_segment() calls in mdtruncate()). There's no comment as to why - I suspect the idea is that you want to make sure the truncation sticks in case of crash? FWIW, falling back to _mdfd_openseg() fixes the issue. Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers