Maintenance commands on standby servers

Started by Sylvain Rabotabout 15 years ago3 messagesgeneral
Jump to latest
#1Sylvain Rabot
sylvain@abstraction.fr

Hi,

Is it possible to run maintenance commands like ANALYZE, VACUUM, CLUSTER
on a standby server ?

The documentations says that those operations can not be done in
recovery mode, but that "some of these commands are actually allowed
during "read only" mode transactions on the primary" [1]http://www.postgresql.org/docs/9.0/static/hot-standby.html#HOT-STANDBY-ADMIN.

[1]: http://www.postgresql.org/docs/9.0/static/hot-standby.html#HOT-STANDBY-ADMIN
http://www.postgresql.org/docs/9.0/static/hot-standby.html#HOT-STANDBY-ADMIN

Regards.

--
Sylvain Rabot <sylvain@abstraction.fr>

#2Fujii Masao
masao.fujii@gmail.com
In reply to: Sylvain Rabot (#1)
Re: Maintenance commands on standby servers

On Tue, Feb 8, 2011 at 4:04 AM, Sylvain Rabot <sylvain@abstraction.fr> wrote:

Is it possible to run maintenance commands like ANALYZE, VACUUM, CLUSTER
on a standby server ?

No.

Since the effect of the maintenance command on the primary server
is also replicated, you don't need to do that on the standby.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

#3Sylvain Rabot
sylvain@abstraction.fr
In reply to: Fujii Masao (#2)
Re: Maintenance commands on standby servers

On Tue, 2011-02-08 at 21:05 +0900, Fujii Masao wrote:

On Tue, Feb 8, 2011 at 4:04 AM, Sylvain Rabot <sylvain@abstraction.fr> wrote:

Is it possible to run maintenance commands like ANALYZE, VACUUM, CLUSTER
on a standby server ?

No.

Since the effect of the maintenance command on the primary server
is also replicated, you don't need to do that on the standby.

Regards,

Thank you for your explanation.

--
Sylvain Rabot <sylvain@abstraction.fr>