Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axSpU-00006Q-Pd for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2016 05:25:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1axSpU-0004ON-CA for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2016 05:25:04 +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_2) (envelope-from ) id 1axSpT-0004LC-KA for pgsql-hackers@postgresql.org; Tue, 03 May 2016 05:25:03 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axSpO-0000mz-Qx for pgsql-hackers@postgresql.org; Tue, 03 May 2016 05:25:01 +0000 Received: from cri.ensmp.fr (152.200.219.88.rev.sfr.net [88.219.200.152]) (authenticated bits=0) by boipeva.ensmp.fr (8.15.2/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id u435OlYb014926 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 May 2016 07:24:49 +0200 Date: Tue, 3 May 2016 07:24:46 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Andres Freund cc: Robert Haas , Thom Brown , Abhijit Menon-Sen , Michael Paquier , Haribabu Kommi , "pgsql-hackers@postgresql.org" Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions In-Reply-To: <20160502221419.shvm4vuhi4jh5hoe@alap3.anarazel.de> Message-ID: 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> <20160502221419.shvm4vuhi4jh5hoe@alap3.anarazel.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at boipeva.ensmp.fr with ID 5728361F.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 5728361F.000 from 152.200.219.88.rev.sfr.net/152.200.219.88.rev.sfr.net/88.219.200.152/cri.ensmp.fr/ X-Pg-Spam-Score: -2.9 (--) 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 Hello, >> I'm unsure about switching enum to #define, could be an enum still with >> explicit values set, something like: > > 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 do not understand. I suggested to use enum to enumerate the bitmask constants, ISTM that it does not preclude to use it as a bitmask as you do, it is just a replacement of the #define? The type constraint on the enum does not disallow bitmasking values, I checked with both gcc & clang. >> 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: [...] > * -- Optionally, any number of inactive segments of size 0 blocks. > * 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. Ok. Then should it be _OPEN_INACTIVE[TED] or _OPEN_TRUNCATED rather than _OPEN_DELETED, which is contradictory? -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers