Re: How sync settings or extensions in streaming replication

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: 苏士涛 <tinnnysu(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: How sync settings or extensions in streaming replication
Date: 2016-07-06 02:46:31
Message-ID: CAB7nPqT0z=eMrc4scQxes97KW+ftvc87R4OF10jqbvy+E-VRgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jul 6, 2016 at 11:37 AM, 苏士涛 <tinnnysu(at)gmail(dot)com> wrote:
> I am new to PostgreSQL, and i have a question about streaming
> replication. If i enable some extension on master with or without
> native code(in c), do I need to enable this extension on slave? Or
> PostgreSQL sync this automatic. Same to settings in postgresql.conf.

You don't need to enable it on the slave. The command CREATE EXTENSION
generates some WAL, so it would get replayed on the standby node as
well. If you are using synchronous_standby_names, you are sure as well
that the WAL of this CREATE EXTENSION command has been flushed to disk
on the standby, so it would not be lost in case of a master crash.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2016-07-06 03:02:07 Re: Is it possible to use an EVENT TRIGGER to validate a TRIGGER?
Previous Message 苏士涛 2016-07-06 02:37:40 How sync settings or extensions in streaming replication