From: | Joel Jacobson <joel(at)trustly(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Marko Tiikkaja <marko(at)trustly(dot)com> |
Subject: | Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity. |
Date: | 2016-03-11 03:49:27 |
Message-ID: | CAASwCXdQQ9-1yj0wUXeuo131AdVFHtf=w2SaecCsgMHrLTKaiQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Fri, Mar 11, 2016 at 9:36 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Well, this was discussed. If we keep the Boolean "waiting" column, then either:
Oh, sorry for missing out on that discussion.
> 1. We make it true only for heavyweight lock waits, and false for
> other kinds of waits. That's pretty strange.
> 2. We make it true for all kinds of waits that we now know how to
> report. That still breaks compatibility.
Why not 3: We make it true for exactly the same type of situations as
in previous versions. Or is it not possible to do so for some reason?
> I do understand that changing this is backward-incompatible and a lot
> of people are going to have to update their monitoring tools. But I
> think that's the best alternative. If we choose option #1, we're
> going to be saddled with a weird backward-compatibility column
> forever, and ten years from now we'll be explaining that even if
> waiting = false you might still be waiting depending on the value of
> some other column. If we choose option #2, it won't be
> backward-compatible and some people's queries will still break, just
> less obviously. Neither of those things seems very appealing.
I understand it's necessary to break backward-compatibility if the
it's not possible to return the same boolean value for the "waiting"
column in exactly the same situations.
Actually, even if it would be possible, I agree with you it's better
to force people to learn how to improve their tools by using the new
features.
Off topic, but related to the backward-compatibility subject:
Is there any written policy/wiki/thread/document on the topic "When
breaking backward-compatibility is acceptable"?
It would be helpful to get a better understand of this, as some ideas
on how to improve things can quickly be ruled out or ruled in
depending on what is acceptable or not.
For instance, there are some minor but annoying flaws in PL/pgSQL that
I would love to get fixed,
but the main arguments against doing so have been that it might break
some users' code somewhere,
even though doing so would probably be a good thing as the user could
have a bug in the code.
See: https://wiki.postgresql.org/wiki/Improving_PL/PgSQL_(September_2014)
I think one general rule should be "Breaking backward-compatibility is
acceptable if the new major pg-version throws an error in a situation
where the old major pg-version would conceal a bug or allow misuse of
a feature".
Trying to select the now removed "waiting" column throws an error.
Good! That lead me as a user here to figure out why I can't and
shouldn't use it. :)
Trying to e.g. select a different number of columns into a different
number of variables in a PL/pgSQL function doesn't throw an error.
Bad. :(
Here I would argue it's better to throw an error, just like when
trying to select from "waiting". It will hopefully save the day for
some users out there who can't find the bug in their complicated
PL/pgSQL application with millions of lines of code.
Sorry if this was completely off-topic, maybe I should start a new
thread or read some old thread in the archives on
backward-compatibility instead.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2016-03-11 04:02:21 | Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity. |
Previous Message | Michael Paquier | 2016-03-11 03:46:31 | Re: pgsql: Checkpoint sorting and balancing. |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-03-11 03:50:45 | Re: GinPageIs* don't actually return a boolean |
Previous Message | Masahiko Sawada | 2016-03-11 03:47:01 | Re: Freeze avoidance of very large table. |