> Obviously you need to do the same sort of arithmetic as you do with > work_mem to decide on a reasonable limit to cope with multiple users > creating temp files. Conservative dbas might want to set it to (free > disk)/max_connections etc. Obviously for ad-hoc systems it is a bit more > challenging - but having a per-backend limit is way better than having > what we have now, which is ... errr... nothing.
Agreed. > To answer the other question, what happens when the limit is exceeded is > modeled on statement timeout, i.e query is canceled and a message says > why (exceeded temp files size). When does this happen? When you try to allocate the file, or when it does the original tape sort estimate? The disadvantage of the former is that the user waited for minutes in order to have their query cancelled. The disadvantage of the latter is that the estimate isn't remotely accurate. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers