Re: Really really slow select count(*)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



felix wrote:
So is it normal for postgres to report that it failed to shut down, operate for an hour and then go ahead and restart itself ?

You've already gotten a few explanations for why waiting for connections can cause this. I'll only add that it is critical to be watching the database log file when doing work like this with PostgreSQL. Go back and check it if you still have the data from when your problematic restart attempt happened, normally you'll get some warnings about it starting to shutdown. Try to look for the actual server shutdown message and then the restart one after doing this sort of thing. If you don't see them when you do this again, you'll know something unexpected is happening, and then to look into what that is.

Also, as a general downtime commentary born from years of being the receiving end of outages, I'd recommend against ever doing any server maintenance operation for the first time just before bedtime. While that may be convienent from a "less users are using the site" perspective, the downside is what you've seen here: mistakes can mean rather extended outages. Better to get up early and do this sort of thing instead, so you can watch the site afterwards for a few hours to make sure nothing is broken. For similar reasons I try to avoid ever doing major changes on a Friday.

--
Greg Smith   2ndQuadrant US    greg@xxxxxxxxxxxxxxx   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux