Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-22 Thread Tomas Vondra
On 20.1.2012 19:47, Matt Dew wrote: On 01/13/2012 02:49 PM, Tomas Vondra wrote: On 13.1.2012 22:20, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: An interesting sidenote we realized. the nice system shutdown script /etc/init.d/postgres doesn't actually wait for the db to be

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-20 Thread Matt Dew
On 01/13/2012 02:49 PM, Tomas Vondra wrote: On 13.1.2012 22:20, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: An interesting sidenote we realized. the nice system shutdown script /etc/init.d/postgres doesn't actually wait for the db to be down, it just waits for pg_ctl to return.

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-13 Thread Matt Dew
On 01/12/2012 01:21 PM, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: On 01/11/2012 04:29 PM, Tom Lane wrote: What exactly is your definition of a clean shutdown? Is a reboot command considered a clean shutdown? It's a redhat box which called /etc/init.d/postgresql stop, which

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-13 Thread Matt Dew
On 01/12/2012 01:21 PM, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: On 01/11/2012 04:29 PM, Tom Lane wrote: What exactly is your definition of a clean shutdown? Is a reboot command considered a clean shutdown? It's a redhat box which called /etc/init.d/postgresql stop, which

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-13 Thread Tom Lane
Matt Dew ma...@consistentstate.com writes: An interesting sidenote we realized. the nice system shutdown script /etc/init.d/postgres doesn't actually wait for the db to be down, it just waits for pg_ctl to return. By default, pg_ctl stop does wait for the server to shut down ...

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-13 Thread Tomas Vondra
On 13.1.2012 22:20, Tom Lane wrote: Matt Dew ma...@consistentstate.com writes: An interesting sidenote we realized. the nice system shutdown script /etc/init.d/postgres doesn't actually wait for the db to be down, it just waits for pg_ctl to return. By default, pg_ctl stop does wait for

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-12 Thread Matt Dew
On 01/11/2012 04:29 PM, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: I have a database that was shut down, cleanly, during an 'reindex table' command. When the database came back up, queries against that table started doing sequential scans instead of using the indexes as

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-12 Thread Tom Lane
Matt Dew ma...@consistentstate.com writes: On 01/11/2012 04:29 PM, Tom Lane wrote: What exactly is your definition of a clean shutdown? Is a reboot command considered a clean shutdown? It's a redhat box which called /etc/init.d/postgresql stop, which does: pg_ctl stop -D '$PGDATA' -s -m

[GENERAL] indexes no longer used after shutdown during reindexing

2012-01-11 Thread Matt Dew
Hello all, I have a database that was shut down, cleanly, during an 'reindex table' command. When the database came back up, queries against that table started doing sequential scans instead of using the indexes as they had been up until that point. We tried: 1) vacuuming the table

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-11 Thread Scott Marlowe
On Wed, Jan 11, 2012 at 10:42 AM, Matt Dew ma...@consistentstate.com wrote: Hello all,   I have a database that was shut down, cleanly, during an 'reindex table'  command.  When the database came back up, queries against that table started doing sequential scans instead of using the indexes as

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-11 Thread Matt Dew
On 01/11/2012 11:07 AM, Scott Marlowe wrote: On Wed, Jan 11, 2012 at 10:42 AM, Matt Dewma...@consistentstate.com wrote: Hello all, I have a database that was shut down, cleanly, during an 'reindex table' command. When the database came back up, queries against that table started doing

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-11 Thread Tom Lane
Matt Dew ma...@consistentstate.com writes: I have a database that was shut down, cleanly, during an 'reindex table' command. When the database came back up, queries against that table started doing sequential scans instead of using the indexes as they had been up until that point.