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