On Wed, Nov 18, 2015 at 11:29 PM, Peter Geoghegan <p...@heroku.com> wrote: > Other systems expose this explicitly, and, as I said, say in an > unqualified way that a multi-pass merge should be avoided. Maybe the > warning isn't the right way of communicating that message to the DBA > in detail, but I am confident that it ought to be communicated to the > DBA fairly clearly.
I'm pretty convinced warnings from DML are a categorically bad idea. In any OLTP load they're effectively fatal errors since they'll fill up log files or client output or cause other havoc. Or they'll cause no problem because nothing is reading them. Neither behaviour is useful. Perhaps the right thing to do is report a statistic to pg_stats so DBAs can see how often sorts are in memory, how often they're on disk, and how often the on disk sort requires n passes. That would put them in the same category as "sequential scans" for DBAs that expect the application to only run index-based OLTP queries for example. The problem with this is that sorts are not tied to a particular relation and without something to group on the stat will be pretty hard to act on. -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers