Re: Vote needed: revert beta2 changes or not? - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Vote needed: revert beta2 changes or not?
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE92E70A@algol.sollentuna.se
Whole thread Raw
In response to Vote needed: revert beta2 changes or not?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Vote needed: revert beta2 changes or not?
List pgsql-hackers
> > > No, because you can't overload based purely on return type. I
> > > suppose they could write it to take an int8 pid or
> something, but that's a hack.
> >
> > Well, how many people want to vote for Andreas' suggestion
> of having
> > both
> >
> >     int pg_cancel_backend(int)
> >     bool pg_backend_cancel(int)
> >
> > with the former deprecated but still there for backward
> compatibility?
>
> I could vote for:
>
>         bool pg_query_cancel(int)
>
> backend_cancel or cancel_backend sounds like it should
> terminate the entire backend like kill -TERM would do.

IIRC, the original discussion had a possible pg_query_cancel(int)
functoin that would cancel a query based on XID or something like that,
and we wanted to differentiate from that. (No such function was ever
created, but it was the reason, IIRC)

Note that at this time there was also a pg_backend_terminate(int) that
would terminate the backend (in fact, IIRC it's still in the code, but
commented out). When both exist, the difference is clear...

//Magnus


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Vote needed: revert beta2 changes or not?
Next
From: Tom Lane
Date:
Subject: Re: GRANT/roles problem: grant is shown as from login role