Re: Replication questions - read-only and temporary read/write slaves

2018-01-04 Thread Michael Paquier
On Fri, Jan 5, 2018 at 3:58 AM, Tiffany Thang wrote: > Thanks for your input. What I meant to say was rolling back all the changes. > I was hoping for a way to temporary open the read-only standby in r/w for > testing purpose and then rollback all the changes made during the test > without having

Re: Replication questions - read-only and temporary read/write slaves

2018-01-04 Thread Tiffany Thang
Michael, Thanks for your input. What I meant to say was rolling back all the changes. I was hoping for a way to temporary open the read-only standby in r/w for testing purpose and then rollback all the changes made during the test without having to re-create the standby from scratch. Thanks. Tiff

Re: Replication questions - read-only and temporary read/write slaves

2018-01-03 Thread Michael Paquier
On Fri, Dec 15, 2017 at 12:03:08PM -0500, Tiffany Thang wrote: > 1. set up a read-only slave database? The closest solution I could find is > Hot Standby but the slave would not be accessible until after a > failover. That's what the parameter hot_standby is for in recovery.conf. When a server is

RE: Replication questions - read-only and temporary read/write slaves

2018-01-03 Thread Jonathan Ruiz
Hi happy year, please remove my contact from the list, thank you very much. Ing. Jonathan Ruiz De: Stefano Enviado: viernes, 15 de diciembre de 2017 19:56 Para: pgsql-gene...@postgresql.org Asunto: Re: Replication questions - read-only and temporary read/write

Re: Replication questions - read-only and temporary read/write slaves

2017-12-15 Thread Tiffany Thang
Thanks! On Fri, Dec 15, 2017 at 1:56 PM, Stefano wrote: > For n.2, you can promote the standby to became a standalone (r/w) server. > This may be done via "pg_ctl -D $PGDATA promote" or, if in the > recovery.conf a "triggerfile" definition has been set, touch-ing the > triggerfile. > see https:/

Re: Replication questions - read-only and temporary read/write slaves

2017-12-15 Thread Stefano
For n.2, you can promote the standby to became a standalone (r/w) server. This may be done via "pg_ctl -D $PGDATA promote" or, if in the recovery.conf a "triggerfile" definition has been set, touch-ing the triggerfile. see https://www.postgresql.org/docs/current/static/standby-settings.html https:/

Re: Replication questions - read-only and temporary read/write slaves

2017-12-15 Thread Tiffany Thang
Thanks Magnus. I did not realize I could use the Hot Standby in read-only mode. For #2, would it be possible to open the Hot Standby in read/write after breaking the replication and taking a snapshot or can Hot Standby only be open in read/write after a failover? I hoping I can use the same Hot St

Re: Replication questions - read-only and temporary read/write slaves

2017-12-15 Thread Magnus Hagander
On Fri, Dec 15, 2017 at 6:03 PM, Tiffany Thang wrote: > Hi, > In PostgreSQL, would it be possible to > > 1. set up a read-only slave database? The closest solution I could find is > Hot Standby but the slave would not be accessible until after a failover. > Hot Standby will give you a standby da

Replication questions - read-only and temporary read/write slaves

2017-12-15 Thread Tiffany Thang
Hi, In PostgreSQL, would it be possible to 1. set up a read-only slave database? The closest solution I could find is Hot Standby but the slave would not be accessible until after a failover. 2. temporary convert a read-only slave in read-write mode for testing read/write workloads? Currently in