Re: Prevent conflicting SET options from being set - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Prevent conflicting SET options from being set
Date
Msg-id 19769.1111418970@sss.pgh.pa.us
Whole thread Raw
In response to Prevent conflicting SET options from being set  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> In this design, our ability to check the conflicting SET or give suggestions
> is contributed by SQL's functionality. This is good I think.

This is out of the question, because we have to be able to execute SET
in environments where we don't have database access nor the ability to
run transactions (eg, postmaster startup).  Nor is it obvious that SQL
is the most useful language to make such checks in anyway.  For instance
a SQL command wouldn't have access to internal backend state, which it
might need to decide if a setting is valid.

We already have the ability to issue custom messages in assign_hooks,
and I think that's sufficient in practice.

A bigger problem with making cross-variable validity checks is that you
can't really do it per-variable without falling foul of ordering
considerations.  For instance, the existing checks in
assign_stage_log_stats and assign_log_stats are ill-considered because
they may reject a postgresql.conf file that turns one variable on before
turning the other off.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Prevent conflicting SET options from being set
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Very strange query difference between 7.3.6 and 7.4.6