On 5/20/15 11:15 AM, Jon Nelson wrote:
On Wed, May 20, 2015 at 9:09 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:

I think backwards compatibility probably trumps that argument.  I have
no objection to providing a different call that behaves this way, but
changing the behavior of existing applications will face a *much*
higher barrier to acceptance.  Especially since a real use-case for
the current behavior was shown upthread, which means you can't argue
that it's simply a bug.

                         regards, tom lane


Agree.
It breaks backwards compatibility. I use this function a fair bit to
terminate the current backend all the time.

Could you elaborate on your use case for doing that?

Echoing David's comment elsewhere, I suspect non-developers won't have a use for self-termination. I don't see how self-cancel even makes sense, and generally if you want to terminate the connection there's easier ways to do that then "SELECT pg_terminate_backend(pg_backend_pid())".

I certainly don't want to cause pain for developers, but is this really that common?

BTW, if someone had an awesome idea for a new function name then we could just go that route. I can't think of anything better than pg_*_session. Though, I guess we could do pg_terminate_session and pg_cancel_query, which wouldn't be horrid.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to