From: | Eric Ridge <e_ridge(at)tcdi(dot)com> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Change pg_cancel_*() to ignore current backend |
Date: | 2015-05-22 20:08:40 |
Message-ID: | D061FBFC-1CD7-40B7-8667-1241C9E1973A@tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On May 19, 2015, at 6:59 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>
> I find it annoying to have to specifically exclude pg_backend_pid() from pg_stat_activity if I'm trying to kill a bunch of backends at once, and I can't think of any reason why you'd ever want to call a pg_cancel_* function with your own PID.
I'm just a lurker, but regularly get bitten by this exact thing.
Rather than change the behavior of pg_cancel/terminate_backend(), why not change pg_stat_activity to exclude the current session? Seems like showing a row in pg_stat_activity for "SELECT * FROM pg_stat_activity" is kinda useless anyways.
eric
PROPRIETARY AND COMPANY CONFIDENTIAL COMMUNICATIONS
The information contained in this communication is intended only for
the use of the addressee. Any other use is strictly prohibited.
Please notify the sender if you have received this message in error.
This communication is protected by applicable legal privileges and is
company confidential.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2015-05-22 20:49:58 | Re: Change pg_cancel_*() to ignore current backend |
Previous Message | Andrew Dunstan | 2015-05-22 19:44:20 | Re: jsonb concatenate operator's semantics seem questionable |