Thread: Postgres 8.4 on OpenIndiana would not shutdown

Postgres 8.4 on OpenIndiana would not shutdown

From
Boris Epstein
Date:
Hello listmates,

When I run the following:

postgres@zeus:~$ export PGDATA=/var/postgres/8.4/data_64/                      
postgres@zeus:~$ /usr/postgres/8.4/bin/amd64/pg_ctl stop                        
waiting for server to shut down............................................................... failed 
pg_ctl: server does not shut down
postgres@zeus:~$ /usr/postgres/8.4/bin/amd64/pg_ctl stop                        
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down
postgres@zeus:~$       

The Postgres 8.4 would simply not shutdown for me. Don't know why:

Here's a snippet of /var/postgres/8.4/data_64/server.log seemingly corresponding to these shutdown attempts:

LOG:  database system was shut down at 2012-10-25 13:49:14 EDT
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2012-10-26 12:14:21 EDT
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2012-10-26 12:22:00 EDT
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

Would anybody know what's wrong with this picture? And how to fix it?

Thanks.

Boris.

Re: Postgres 8.4 on OpenIndiana would not shutdown

From
Tom Lane
Date:
Boris Epstein <borepstein@gmail.com> writes:
> The Postgres 8.4 would simply not shutdown for me. Don't know why:

> Here's a snippet of /var/postgres/8.4/data_64/server.log seemingly
> corresponding to these shutdown attempts:

> LOG:  database system was shut down at 2012-10-25 13:49:14 EDT
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started
> LOG:  received smart shutdown request
> LOG:  autovacuum launcher shutting down
> LOG:  shutting down
> LOG:  database system is shut down
> LOG:  database system was shut down at 2012-10-26 12:14:21 EDT
> LOG:  autovacuum launcher started
> LOG:  database system is ready to accept connections
> LOG:  received smart shutdown request
> LOG:  autovacuum launcher shutting down
> LOG:  shutting down
> LOG:  database system is shut down
> LOG:  database system was shut down at 2012-10-26 12:22:00 EDT
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started

Looks to me like it *is* shutting down, and then something is starting
it right back up again.  Don't know how you have it installed, but if
it's running as an auto-started service you may need to be using some
higher-level command to stop the service.

            regards, tom lane


Re: Postgres 8.4 on OpenIndiana would not shutdown

From
Boris Epstein
Date:


On Fri, Oct 26, 2012 at 12:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Boris Epstein <borepstein@gmail.com> writes:
> The Postgres 8.4 would simply not shutdown for me. Don't know why:

> Here's a snippet of /var/postgres/8.4/data_64/server.log seemingly
> corresponding to these shutdown attempts:

> LOG:  database system was shut down at 2012-10-25 13:49:14 EDT
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started
> LOG:  received smart shutdown request
> LOG:  autovacuum launcher shutting down
> LOG:  shutting down
> LOG:  database system is shut down
> LOG:  database system was shut down at 2012-10-26 12:14:21 EDT
> LOG:  autovacuum launcher started
> LOG:  database system is ready to accept connections
> LOG:  received smart shutdown request
> LOG:  autovacuum launcher shutting down
> LOG:  shutting down
> LOG:  database system is shut down
> LOG:  database system was shut down at 2012-10-26 12:22:00 EDT
> LOG:  database system is ready to accept connections
> LOG:  autovacuum launcher started

Looks to me like it *is* shutting down, and then something is starting
it right back up again.  Don't know how you have it installed, but if
it's running as an auto-started service you may need to be using some
higher-level command to stop the service.

                        regards, tom lane

Tom, thanks!

Yes, that's exactly what it was, it turns out.

OpenIndiana uses SMF (svcadm) and it was what was restarting the server:)

Boris.