On Thu, Feb 12, 2015 at 5:44 PM, Naoya Anzai <anzai-na...@mxu.nes.nec.co.jp> wrote:
> Hi, Michael-san > > > An updated patch is attached, > > I'm sorry for confusing you. > > I think you don't have to implement this code to disable this > feature with using value "-2".Because this use case is a rare case, > and there is a practical workaround using huge value like "2e9". > (You suggested "2e9" to me, didn't you? :) ) So, please remove this code. > I will clean up the code. > > Well, I see your point but this is not completely true: we could as > > well rely entirely on this parameter instead of VACOPT_VERBOSE to > > determine if autovacuum, a vacuum or an analyze are in verbose mode, > > and remove VACOPT_VERBOSE, but I can imagine people complaining if > > VACOPT_VERBOSE is removed. So let's set it up unconditionally to -1 in > > gram.y for now. However if people think that it is fine to remove > > VACOPT_VERBOSE, we could use exclusively this parameter in VacuumStmt. > > Or even add sanity checks at the top of vacuum() to ensure that > > VACOPT_VERBOSE is set only when log_min_duration is positive. > > Additional opinions on this matter are welcome. > > I understand your point at last. :) > > You mean that ... > Log_autovacuum_min_duration assumes a role of VACOPT_VERBOSE. > Even if this parameter never use currently for manual vacuum, > log_autovacuum_min_duration should be set zero(anytime output) > when we executes "VACUUM(or ANALYZE) VERBOSE". > Is my understanding correct? If so,it sounds logical. > Yup, that's my opinion. Now I don't know if people would mind to remove VACOPT_VERBOSE and replace the control it does by log_min_duration in VacuumStmt. At least both things are overlapping, and log_min_duration offers more options than the plain VACOPT_VERBOSE. > If we can abolish VERBOSE option, > I think it's ideal that we will prepare a new parameter like > a log_min_duration_vacuum(and log_min_duration_analyze) which > integrating "VERBOSE feature" and "log_autovacuum_min_duration". > What I think you are proposing here is a VERBOSE option that hypothetically gets activated if a manual VACUUM takes more than a certain amount specified by those parameters. I doubt this would be useful. In any case this is unrelated to this patch. -- Michael