Re: Regarding(Read Replica in RDS)

From: ROHIT SACHDEVA <sachdeva(dot)rohit648(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Regarding(Read Replica in RDS)
Date: 2024-03-07 14:04:48
Message-ID: CAKDb7aG+H_Nk=rKyxysHa9ew6XP=-edry7HoUG6dyupK6Lz_WQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Its a requirement as we have taken two read replicas one for main database
and another for sharing instance.

On Thu, 7 Mar, 2024, 7:17 pm Ron Johnson, <ronljohnsonjr(at)gmail(dot)com> wrote:

> On Thu, Mar 7, 2024 at 7:43 AM ROHIT SACHDEVA <sachdeva(dot)rohit648(at)gmail(dot)com>
> wrote:
>
>> Hi Team,
>>
>> I have a setup in which there is one main database and one sharded
>> database.
>> Seeing the requirement regarding MIS, we plan to have a read replica of
>> this setup, so we launch two read replicas, one for the main database and
>> another for the sharded database.
>> Now that I want to change the hostname in Postgres fdw in a read replica,
>>
>
> But keep the Primary definition of shard_stg the same as it was?
>
>
>> I am getting this error:.
>> ALTER SERVER shard_stg OPTIONS (SET host 'hostanme', SET port '5432');
>>
>> ERROR: cannot execute ALTER SERVER in a read-only transaction
>> SQL state: 25006
>>
>> Can anyone let me know how to change the read replica to write so that I
>> can execute this query once?
>>
>
> Changing a Read Replica to writable mode means that it's not a Read
> Replica anymore.
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dan Smith 2024-03-07 14:25:47 Re: Regarding(Read Replica in RDS)
Previous Message Ron Johnson 2024-03-07 13:47:45 Re: Regarding(Read Replica in RDS)