Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aulf0-0006j7-3U for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Apr 2016 18:55:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aulez-0005IF-ME for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Apr 2016 18:55:05 +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 1auldc-0003eJ-J4 for pgsql-hackers@postgresql.org; Mon, 25 Apr 2016 18:53:40 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auldZ-0000VQ-EX for pgsql-hackers@postgresql.org; Mon, 25 Apr 2016 18:53:40 +0000 Received: from cri.ensmp.fr (88.56.69.86.rev.sfr.net [86.69.56.88]) (authenticated bits=0) by boipeva.ensmp.fr (8.15.2/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id u3PIrQXx009605 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Apr 2016 20:53:28 +0200 Date: Mon, 25 Apr 2016 20:53:26 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Andres Freund cc: Thom Brown , Abhijit Menon-Sen , Robert Haas , Michael Paquier , Haribabu Kommi , PostgreSQL-development Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions In-Reply-To: Message-ID: References: <20160326123942.qnuwqg3yg2y7ae4p@alap3.anarazel.de> <20160411165054.r35o4fjicdg4avs7@alap3.anarazel.de> <20160411171742.n5xebjt7tcdy4sxf@alap3.anarazel.de> <20160414053929.GA29751@toroid.org> <20160422170736.bjrsusb4ubdhdtl4@alap3.anarazel.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Miltered: at boipeva.ensmp.fr with ID 571E67A6.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: 571E67A6.000 from 88.56.69.86.rev.sfr.net/88.56.69.86.rev.sfr.net/86.69.56.88/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 Andres, > Fixes it for me too. Yep, for me too. I'm not at ease with the part of the API the code is dealing with, so I do not feel like a competent reviewer. I agree with the "more comments" suggested by Robert. I have just a small naming point: /* ereport if segment not present, create in recovery */ EXTENSION_FAIL, /* return NULL if not present, create in recovery */ EXTENSION_RETURN_NULL, /* return NULL if not present */ EXTENSION_REALLY_RETURN_NULL, /* create new segments as needed */ EXTENSION_CREATE The comments seem pretty clear, but the naming of these options are more behavioral than functional somehow (or the reverse?), especially the RETURN_NULL and REALLY_RETURN_NULL names seemed pretty contrived to me. There is one context: whether it is in recovery. There are 3 possible behaviors: whether to error or ignore or create if segment does not exist. In recovery it is always create if asked for it must be made available, maybe it does not exists because of the crash... If I understand correctly, with flushes kept a long time before being processed, there is a new state which is "ignore whatever", we do not want to create a segment for flushing non existing data. So I would suggest it would be better to name the options closer to the comments above, something like: normal / in recovery: EXTENSION_ERROR_OR_IR_CREATE EXTENSION_IGNORE_OR_IR_CREATE EXTENSION_IGNORE EXTENSION_CREATE Now, maybe that is too late to try to find a better name for these options now:-) -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers