Re: Can master and slave on different PG versions?

From: rammohan ganapavarapu <rammohanganap(at)gmail(dot)com>
To: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can master and slave on different PG versions?
Date: 2017-11-09 16:22:37
Message-ID: CALm_VjjvAhju11xQAyw5p5gMBxfU6NzYZUn_fq+CAh99T1VUoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Shreeyansh,

I don't have option to use slony in my environment. So i changed physical
replication to logical replication by updating "wal_level = logical" on
master and syncked slave with pg_basebackup. After that i was able to
upgrade to 9.6 but when i try to start the slave i am getting "FATAL: hot
standby is not possible because wal_level was not set to "replica" or
higher on the master server" error. Any idea how to resolve this?

Thanks,
Ram

On Wed, Nov 8, 2017 at 11:45 PM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
wrote:

>
>
> On Thu, Nov 9, 2017 at 10:32 AM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
> wrote:
>
>>
>>
>> On Wed, Nov 8, 2017 at 9:47 PM, rammohan ganapavarapu <
>> rammohanganap(at)gmail(dot)com> wrote:
>>
>>> David,
>>>
>>> So initially i have physical replication configured, so to upgrade slave
>>> to 9.6 version i did converted master slave to logical replication and then
>>> try to upgrade the slave to 9.6. I am getting this error when i try to
>>> start the slave. Any idea?
>>>
>>>
>>> 2017-11-08 05:08:49 UTC [20063]: [1-1] user= db= host= LOG: shutting
>>> down
>>> 2017-11-08 05:08:49 UTC [20063]: [2-1] user= db= host= LOG: database
>>> system is shut down
>>> 2017-11-08 05:09:45 UTC [20322]: [1-1] user= db= host= LOG: database
>>> system was shut down at 2017-11-08 05:08:55 UTC
>>> 2017-11-08 05:09:45 UTC [20322]: [2-1] user= db= host= LOG: entering
>>> standby mode
>>> 2017-11-08 05:09:45 UTC [20322]: [3-1] user= db= host= WARNING: WAL was
>>> generated with wal_level=minimal, data may be missing
>>> 2017-11-08 05:09:45 UTC [20322]: [4-1] user= db= host= HINT: This
>>> happens if you temporarily set wal_level=minimal without taking a new base
>>> backup.
>>> 2017-11-08 05:09:45 UTC [20322]: [5-1] user= db= host= FATAL: hot
>>> standby is not possible because wal_level was not set to "replica" or
>>> higher on the master server
>>> 2017-11-08 05:09:45 UTC [20322]: [6-1] user= db= host= HINT: Either set
>>> wal_level to "replica" on the master, or turn off hot_standby here.
>>> 2017-11-08 05:09:45 UTC [20312]: [3-1] user= db= host= LOG: startup
>>> process (PID 20322) exited with exit code 1
>>> 2017-11-08 05:09:45 UTC [20312]: [4-1] user= db= host= LOG: aborting
>>> startup due to startup process failure
>>> 2017-11-08 05:09:45 UTC [20312]: [5-1] user= db= host= LOG: database
>>> system is shut down
>>>
>>> Thanks,
>>> Ram
>>>
>>>
>>>
>>> On Mon, Oct 9, 2017 at 4:15 PM, David G. Johnston <
>>> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>>>
>>>> On Mon, Oct 9, 2017 at 4:06 PM, rammohan ganapavarapu <
>>>> rammohanganap(at)gmail(dot)com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Is it possible to add 9.6 version Slave to 9.4 master?
>>>>>
>>>>>
>>>> ​Physical replication, no; Logical replication, yes - if the software
>>>> you are using is compatible with both versions.
>>>>
>>>> David J.​
>>>>
>>>
>>>
>> In addition to above, Slony also an option for keeping master & slave on
>> different versions which play a key role during upgrades for reducing
>> downtime drastically.
>>
>>
>> --
>> <https://shreeyansh.com/>
>>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message rammohan ganapavarapu 2017-11-09 23:28:36 Partitions
Previous Message Tom Lane 2017-11-09 14:59:39 Re: PostgreSQL WAL file issue

Browse pgsql-general by date

  From Date Subject
Next Message Dingyuan Wang 2017-11-09 16:27:59 Index not used when using expression
Previous Message Merlin Moncure 2017-11-09 16:19:32 Re: Migrating money column from MS SQL Server to Postgres