Re: CTTAS w/ DISTINCT ON crashes backend
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Mascari <mascarm@mascari.com>
Cc: pgsql-general@postgresql.org
Date: 2004-01-21T23:51:56Z
Lists: pgsql-hackers
Mike Mascari <mascarm@mascari.com> writes: > Could you give me a bit of direction? > [ same query works in one DB and crashes in another ] I have a feeling this is a problem with an incorrect plan --- possibly the same thing I just fixed a few days ago, http://archives.postgresql.org/pgsql-committers/2004-01/msg00134.php or perhaps another bug. Look at EXPLAIN output and see if the two databases are generating different plans for the query. If so, perhaps ANALYZE in the test database is needed? In any case, don't ANALYZE in the development DB, for fear of moving the stats enough to make the problem go away ... regards, tom lane