Removing second slave server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing second slave server

Yambu
Hello

I want to reinstall my second slave server and I have to stop replication.

May i know if it's enough to just run the command below on the second slave

touch /tmp/postgresql.trigger.5432

Trigger file in recovery.conf is 

trigger_file = '/tmp/postgresql.trigger.5432'   

Do i need to do anything on the master server so that wal files do not build up since the second slave is no longer active?

Im using PG v10,streaming replication

regards


 
Reply | Threaded
Open this post in threaded view
|

Re: Removing second slave server

Jerry Sievers-3
Yambu <[hidden email]> writes:

> Hello
>
> I want to reinstall my second slave server and I have to stop
> replication.
>
> May i know if it's enough to just run the command below on the second
> slave
>
> touch /tmp/postgresql.trigger.5432
You don't even have to do that if you're going to decom and put the
server up again.

>
> Trigger file in recovery.conf is 
>
> trigger_file = '/tmp/postgresql.trigger.5432'   
>
> Do i need to do anything on the master server so that wal files do
> not build up since the second slave is no longer active?

Perhaps, if you are using a replication slot which is typical on $recent
releases such as Pg10.

After the standby is down, drop the related replication slot on your
primary else you'll retain WAL files unnecessarily and could fill the
disk.

HTH

>
> Im using PG v10,streaming replication
>
> regards
>
>
>  
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Removing second slave server

franklin ferreira de lima
Fundação de apoio à escola técnica 

franklin ferreira de lima

Em Qui, 14 de jan de 2021 12:51, Jerry Sievers <[hidden email]> escreveu:
Yambu <[hidden email]> writes:

> Hello
>
> I want to reinstall my second slave server and I have to stop
> replication.
>
> May i know if it's enough to just run the command below on the second
> slave
>
> touch /tmp/postgresql.trigger.5432
You don't even have to do that if you're going to decom and put the
server up again.

>
> Trigger file in recovery.conf is 
>
> trigger_file = '/tmp/postgresql.trigger.5432'   
>
> Do i need to do anything on the master server so that wal files do
> not build up since the second slave is no longer active?

Perhaps, if you are using a replication slot which is typical on $recent
releases such as Pg10.

After the standby is down, drop the related replication slot on your
primary else you'll retain WAL files unnecessarily and could fill the
disk.

HTH

>
> Im using PG v10,streaming replication
>
> regards
>
>
>  
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Removing second slave server

Yambu
Im not using replication slot

On Thu, Jan 14, 2021 at 6:02 PM franklin ferreira de lima <[hidden email]> wrote:
Fundação de apoio à escola técnica 

franklin ferreira de lima

Em Qui, 14 de jan de 2021 12:51, Jerry Sievers <[hidden email]> escreveu:
Yambu <[hidden email]> writes:

> Hello
>
> I want to reinstall my second slave server and I have to stop
> replication.
>
> May i know if it's enough to just run the command below on the second
> slave
>
> touch /tmp/postgresql.trigger.5432
You don't even have to do that if you're going to decom and put the
server up again.

>
> Trigger file in recovery.conf is 
>
> trigger_file = '/tmp/postgresql.trigger.5432'   
>
> Do i need to do anything on the master server so that wal files do
> not build up since the second slave is no longer active?

Perhaps, if you are using a replication slot which is typical on $recent
releases such as Pg10.

After the standby is down, drop the related replication slot on your
primary else you'll retain WAL files unnecessarily and could fill the
disk.

HTH

>
> Im using PG v10,streaming replication
>
> regards
>
>
>  
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: [hidden email]