pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Andres Freund <andres@anarazel.de>
Cc: Thom Brown <thom@linux.com>
Cc: Abhijit Menon-Sen <ams@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
Date: Mon, 25 Apr 2016 20:53:26 +0200 (CEST)
Message-ID: <alpine.DEB.2.10.1604252026040.32250@sto> (raw)
In-Reply-To: <CAA-aLv7bTh14kM7qC9waiE8WY-bc33QwvXyRCxq5H0A70SvOAg@mail.gmail.com>
References: <CA+TgmoZiF3_hG8-M6hq_Z-O=VoyNd9FtbmVTw+YcM+Fn-m_rfw@mail.gmail.com>
	<CAB7nPqSBFmh5cQjpRbFBp9Rkv1nF=Nh2o1FxKkJ6yvOBtvYDBA@mail.gmail.com>
	<CA+TgmobDyysoEX0GQVaPwYHk-joMJWyUkpiuyc6w656ewB_Hig@mail.gmail.com>
	<20160326123942.qnuwqg3yg2y7ae4p@alap3.anarazel.de>
	<CA+TgmoYEku8CGaQ7me5+T0Q82jKMrQHPcpOApogag0K2KbiAkQ@mail.gmail.com>
	<20160411165054.r35o4fjicdg4avs7@alap3.anarazel.de>
	<CA+TgmoaX35ui4DVN_74YyxS_gtfMXPo4pkru-AAkBoSCh9FLuA@mail.gmail.com>
	<20160411171742.n5xebjt7tcdy4sxf@alap3.anarazel.de>
	<CA+TgmobNCZ_uZhO-mo4ArKWNGyoe8bY+Gvy7egHVSzHMqoiL5Q@mail.gmail.com>
	<20160414053929.GA29751@toroid.org>
	<20160422170736.bjrsusb4ubdhdtl4@alap3.anarazel.de>
	<CAA-aLv7bTh14kM7qC9waiE8WY-bc33QwvXyRCxq5H0A70SvOAg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


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



view thread (64+ messages)  latest in thread

Message-ID: <alpine.DEB.2.10.1604252026040.32250@sto>
Permalink:  ../alpine.DEB.2.10.1604252026040.32250@sto/
Also on:    postgresql.org/message-id/alpine.DEB.2.10.1604252026040.32250@sto

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: coelho@cri.ensmp.fr, andres@anarazel.de, thom@linux.com, ams@2ndquadrant.com, robertmhaas@gmail.com, michael.paquier@gmail.com, kommi.haribabu@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
  In-Reply-To: <alpine.DEB.2.10.1604252026040.32250@sto>
  References: <CA+TgmoZiF3_hG8-M6hq_Z-O=VoyNd9FtbmVTw+YcM+Fn-m_rfw@mail.gmail.com> <CAB7nPqSBFmh5cQjpRbFBp9Rkv1nF=Nh2o1FxKkJ6yvOBtvYDBA@mail.gmail.com> <CA+TgmobDyysoEX0GQVaPwYHk-joMJWyUkpiuyc6w656ewB_Hig@mail.gmail.com> <20160326123942.qnuwqg3yg2y7ae4p@alap3.anarazel.de> <CA+TgmoYEku8CGaQ7me5+T0Q82jKMrQHPcpOApogag0K2KbiAkQ@mail.gmail.com> <20160411165054.r35o4fjicdg4avs7@alap3.anarazel.de> <CA+TgmoaX35ui4DVN_74YyxS_gtfMXPo4pkru-AAkBoSCh9FLuA@mail.gmail.com> <20160411171742.n5xebjt7tcdy4sxf@alap3.anarazel.de> <CA+TgmobNCZ_uZhO-mo4ArKWNGyoe8bY+Gvy7egHVSzHMqoiL5Q@mail.gmail.com> <20160414053929.GA29751@toroid.org> <20160422170736.bjrsusb4ubdhdtl4@alap3.anarazel.de> <CAA-aLv7bTh14kM7qC9waiE8WY-bc33QwvXyRCxq5H0A70SvOAg@mail.gmail.com> <alpine.DEB.2.10.1604252026040.32250@sto>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox