Re: standby shutdown

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

 



On Sat, May 02, 2009 at 12:13:42AM -0400, Robert Treat wrote:
> 
> First tip, dont use -i, it isn't needed. I'd try withought any flag and work 
> up if needed. Be patient unless you can't afford to be. 



thanks, Robert, I assume you mean don't use -m i, I don't see a -i anywhere.

So, you are saying just shutdown, but it is my experience that this might not
work and I need to script this for the operator to do the maintenance.  

Here I get:

$ pg_ctl stop -D /data/pgsql/alerts_oamp/
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down

and ps says the postmaster is still up:

ps -ef | grep 502
502      12914     1  0 08:20 pts/0    00:00:00 /usr/local/pgsql836/bin/postgres -D /data/pgsql/alerts_oamp
502      12915 12914  0 08:20 ?        00:00:00 postgres: logger process                                   
502      12916 12914  0 08:20 ?        00:00:01 postgres: startup process   waiting for 00000001000000000000000E
502      13064 12916  0 08:29 ?        00:00:00 sh -c /usr/local/pgsql/bin/pg_standby  /data/pgsql/wals/alerts_oamp 00000001000000000000000E pg_xlog/RECOVERYXLOG 00000001000000000000000C >> /home/postgresql/log/alerts_oamp/recovery.log
502      13065 13064  0 08:29 ?        00:00:00 /usr/local/pgsql/bin/pg_standby /data/pgsql/wals/alerts_oamp 00000001000000000000000E pg_xlog/RECOVERYXLOG 00000001000000000000000C


seems like I need more that patience here, but I don't know what?  The log doesn't help much:

2009-05-04 08:20:53 EDT,0, LOG:  restored log file "00000001000000000000000C" from archive
2009-05-04 08:20:53 EDT,0, LOG:  restored log file "00000001000000000000000D" from archive
2009-05-04 08:20:52 EDT,0, LOG:  received smart shutdown request

should I loop in the shutdown script on "pg_ctl stop" until the postmaster pid goes away?  



> This indicates it couldn't find the files it was looking for rather than 
> something being necessarily broken. This makes me wonder about your xlog 
> retention policy; it sounds like you might be deleting xlogs more agressivly 
> than you should be. I'd suggest you look into the %r option for pg_standby. 
> HTH. 


I'll be the first to admit I don't really know the details of this.
I'm just taking the default, %r.  If the default is too "agressive"
to allow recovery, then why is it that the default?  Shouldn't some
behavior that allows for recovery be the default?

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux