check for interrupts in set_rtable_names - Mailing list pgsql-hackers

From Jeff Janes
Subject check for interrupts in set_rtable_names
Date
Msg-id CAMkU=1zq5a74E9JSftTDuyonqnSnSOxja8961qW+qq7Ua74u5w@mail.gmail.com
Whole thread Raw
Responses Re: check for interrupts in set_rtable_names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Someone sent my server a deranged query, it tripped my
auto_explain.log_min_duration setting, that hit some kind of
pathological case while assigning aliases, and now it sits
uninterruptibly in set_rtable_names for hours.

Is there any reason we can't check for interrupts in set_rtable_names,
like the attached?

I've tried it on a deranged query and it seems to do the job.

A deranged query:

perl -le 'print "explain"; print "select * from pgbench_accounts where
aid=5 union" foreach 1..5000; print "select * from pgbench_accounts
where aid=5 ;"'|psql

Cheers,

Jeff

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [DESIGN] ParallelAppend
Next
From: Tom Lane
Date:
Subject: Re: Inaccurate results from numeric ln(), log(), exp() and pow()