public inbox for [email protected]
help / color / mirror / Atom feedRe: psql help
2+ messages / 2 participants
[nested] [flat]
* Re: psql help
@ 2024-07-05 05:19 David G. Johnston <[email protected]>
2024-07-05 05:31 ` Re: psql help Tom Lane <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: David G. Johnston @ 2024-07-05 05:19 UTC (permalink / raw)
To: Murthy Nunna <[email protected]>; +Cc: [email protected] <[email protected]>
The convention here is to in-line replies, or bottom-post. Top-posting
makes the archives more difficult to read.
On Thursday, July 4, 2024, Murthy Nunna <[email protected]> wrote:
> pg_terminate_backend(pid) will not work as it expects only one pid at a
> time.
>
>
> Interesting…I wouldn’t expect the function calls to interact that
way…maybe try putting the select query into a plpgsql DO command loop and
then call pg_terminate_backend once per loop iteration.
> So, the question is how to rewrite this psql so it loops through all pids
> one pid at a time?
>
> I can’t tell if you really mean the psql program or are misusing the term
to mean something different…the code you wrote doesn’t seem like it would
execute in psql.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: psql help
2024-07-05 05:19 Re: psql help David G. Johnston <[email protected]>
@ 2024-07-05 05:31 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2024-07-05 05:31 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: Murthy Nunna <[email protected]>; [email protected] <[email protected]>
"David G. Johnston" <[email protected]> writes:
> On Thursday, July 4, 2024, Murthy Nunna <[email protected]> wrote:
>> pg_terminate_backend(pid) will not work as it expects only one pid at a
>> time.
> Interesting…I wouldn’t expect the function calls to interact that
> way
TBH, my reaction to that was that the OP doesn't understand SQL
semantics. As you previously said, simply removing the LIMIT clause
should work fine. (The ORDER BY looks kinda pointless, too, unless
there are operational constraints we weren't told about.)
There is a question of exactly what "$a'${TIMEOUT_MINS}'$a"
is supposed to mean, but that's independent of the LIMIT issue.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-07-05 05:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05 05:19 Re: psql help David G. Johnston <[email protected]>
2024-07-05 05:31 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox