Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axM8A-0001x2-9K for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2016 22:15:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1axM89-0006or-Mc for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2016 22:15:53 +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 1axM6n-0005Ew-Rp for pgsql-hackers@postgresql.org; Mon, 02 May 2016 22:14:29 +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 1axM6g-0005B9-JF for pgsql-hackers@postgresql.org; Mon, 02 May 2016 22:14:29 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BC13820329 for ; Mon, 2 May 2016 18:14:20 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 02 May 2016 18:14:20 -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=OVsLJVOY3JhVgnfYJ/90V5xiu7k=; b=n7Lcz OgjeM05iIDNqzs3seO62FZ3KfnmAuQmV6EtJbNnPpCJ7nuTkUgzJ2uaAB2T3gdUJ Tb81ST0i7VNPKZBJ7i7oO+NCLIG1W2Hw1o0+ZlmXMt3OMqabp/cNkc/AV4fFjp9s 7ussUN6PM1xlcbUh7iW0KIUDLi3T2L9Zhj3Ir0= X-Sasl-enc: /FlXJGMD1huCdJEIb9nlZs9+oB/jCnbNxm/Us42aCPZ5 1462227260 Received: from intern.anarazel.de (unknown [162.217.75.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 7470D6800BE; Mon, 2 May 2016 18:14:20 -0400 (EDT) Date: Mon, 2 May 2016 15:14:19 -0700 From: Andres Freund To: Fabien COELHO Cc: Robert Haas , Thom Brown , Abhijit Menon-Sen , Michael Paquier , Haribabu Kommi , "pgsql-hackers@postgresql.org" Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions Message-ID: <20160502221419.shvm4vuhi4jh5hoe@alap3.anarazel.de> References: <20160426213207.j3xi2amneejm3ed6@alap3.anarazel.de> <20160429235837.b63wkjw4dduf56wt@alap3.anarazel.de> <20160502164111.cpupbbkab6ik7wwd@alap3.anarazel.de> <20160502165438.yu6inlsyv4babyie@alap3.anarazel.de> <20160502203634.hmjgdumfgqrldo6n@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 Hi, On 2016-05-03 00:05:35 +0200, Fabien COELHO wrote: > Maybe consider checking for the exclusivity explicitely? I thought about it, and decided it's not worth it. Requiring one of those to be specified seems stringent enough. > I'm unsure about switching enum to #define, could be an enum still with > explicit values set, something like: > > enum { > EXTENSION_RETURN_NULL = (1 << 0), > ... > } extension_behavior; An enum doesn't have a benefit for a bitmask imo - you can't "legally" use it as a type for functions accepting the bitmask. > I'm fuzzy about the _OPEN_DELETED part because it is an oxymoron. Is it > RECREATE really? No. The relevant explanation is at the top of the file: * On disk, a relation must consist of consecutively numbered segment * files in the pattern * -- Zero or more full segments of exactly RELSEG_SIZE blocks each * -- Exactly one partial segment of size 0 <= size < RELSEG_SIZE blocks * -- Optionally, any number of inactive segments of size 0 blocks. * The full and partial segments are collectively the "active" segments. * Inactive segments are those that once contained data but are currently * not needed because of an mdtruncate() operation. The reason for leaving * them present at size zero, rather than unlinking them, is that other * backends and/or the checkpointer might be holding open file references to * such segments. If the relation expands again after mdtruncate(), such * that a deactivated segment becomes active again, it is important that * such file references still be valid --- else data might get written * out to an unlinked old copy of a segment file that will eventually * disappear. - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers