Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 082F664FCE1 for ; Sun, 7 Sep 2008 18:04:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70576-02 for ; Sun, 7 Sep 2008 18:04:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by postgresql.org (Postfix) with ESMTP id 91AA464FCCA for ; Sun, 7 Sep 2008 18:04:05 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.13.8/8.13.8) with ESMTP id m87L43jb061114 for ; Sun, 7 Sep 2008 21:04:03 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.13.8/8.13.8/Submit) id m87L43IA061113; Sun, 7 Sep 2008 21:04:03 GMT (envelope-from www) Date: Sun, 7 Sep 2008 21:04:03 GMT Message-Id: <200809072104.m87L43IA061113@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #4410: Indexes not seen right away From: "Greg Sabino Mullane" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200809/61 X-Sequence-Number: 21351 The following bug has been logged online: Bug reference: 4410 Logged by: Greg Sabino Mullane Email address: greg@endpoint.com PostgreSQL version: 8.3.3 Operating system: Linux Description: Indexes not seen right away Details: I cannot reproduce, as this was on a production system and not seen again, but I created a simple index on a TEXT field, which was not chosen by the planner, even when seqscan was turned off. I analyzed the table, checked all the settings, etc. pg_index looked as it should. Eventually (~ 10 minutes later) the index as chosen - I don't know what might have triggered it to start appearing. Creating a second table based on the first worked as it should during the 'noindex' time period: CREATE TABLE foo AS SELECT * FROM bar; CREATE INDEX foo_idx1 ON foo(textcol); EXPLAIN SELECT 1 FROM foo WHERE textcol1 = 'baz';