pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[HELP] Reset postgres server
5+ messages / 2 participants
[nested] [flat]

* [HELP] Reset postgres server
@ 2020-06-10 12:33  Praveen Kumar K S <praveenssit@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Praveen Kumar K S @ 2020-06-10 12:33 UTC (permalink / raw)
  To: pgsql-general

Hello,

I have a master and slave setup running and sometimes we have to do a
complete refresh on dev environments. How can I reset postgres server so
that it wipes out everything including WAL ? So that I configure
master/slave streaming replication again from scratch ? TIA.

-- 


*Regards,*


*K S Praveen Kumar*

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [HELP] Reset postgres server
@ 2020-06-10 12:39  Praveen Kumar K S <praveenssit@gmail.com>
  parent: Praveen Kumar K S <praveenssit@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Praveen Kumar K S @ 2020-06-10 12:39 UTC (permalink / raw)
  To: pgsql-general

Providing more details.
OS is Ubuntu 16.04 and postgres is installed from APT.
logical and physical replication slots configured on master.
No WAL archiving configured.
Streaming replication is enabled on master.
Slave is hot-standby

On Wed, Jun 10, 2020 at 6:03 PM Praveen Kumar K S <praveenssit@gmail.com>
wrote:

> Hello,
>
> I have a master and slave setup running and sometimes we have to do a
> complete refresh on dev environments. How can I reset postgres server so
> that it wipes out everything including WAL ? So that I configure
> master/slave streaming replication again from scratch ? TIA.
>
> --
>
>
> *Regards,*
>
>
> *K S Praveen Kumar*
>


-- 


*Regards,*


*K S Praveen Kumar*

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [HELP] Reset postgres server
@ 2020-06-10 14:20  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Praveen Kumar K S <praveenssit@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Adrian Klaver @ 2020-06-10 14:20 UTC (permalink / raw)
  To: Praveen Kumar K S <praveenssit@gmail.com>; pgsql-general

On 6/10/20 5:33 AM, Praveen Kumar K S wrote:
> Hello,
> 
> I have a master and slave setup running and sometimes we have to do a 
> complete refresh on dev environments. How can I reset postgres server so 
> that it wipes out everything including WAL ? So that I configure 
> master/slave streaming replication again from scratch ? TIA.

Are both servers part of the dev setup?

If so would deleting the content of $PGDATA and then doing an initdb on 
it work?
To make above easier I would keep a copies of the *.conf files where you 
could copy them back into $PGDATA after the initdb.

> 
> -- 
> *Regards,
> 
> *
> *K S Praveen Kumar
> 
> *


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [HELP] Reset postgres server
@ 2020-06-10 16:31  Praveen Kumar K S <praveenssit@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Praveen Kumar K S @ 2020-06-10 16:31 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

Hello,

Yes, both are part of dev. Should I clean the data directory on both
servers or only on master ?

On Wed, Jun 10, 2020 at 7:50 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 6/10/20 5:33 AM, Praveen Kumar K S wrote:
> > Hello,
> >
> > I have a master and slave setup running and sometimes we have to do a
> > complete refresh on dev environments. How can I reset postgres server so
> > that it wipes out everything including WAL ? So that I configure
> > master/slave streaming replication again from scratch ? TIA.
>
> Are both servers part of the dev setup?
>
> If so would deleting the content of $PGDATA and then doing an initdb on
> it work?
> To make above easier I would keep a copies of the *.conf files where you
> could copy them back into $PGDATA after the initdb.
>
> >
> > --
> > *Regards,
> >
> > *
> > *K S Praveen Kumar
> >
> > *
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>


-- 


*Regards,*


*K S Praveen Kumar*

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [HELP] Reset postgres server
@ 2020-06-10 16:33  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Praveen Kumar K S <praveenssit@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Adrian Klaver @ 2020-06-10 16:33 UTC (permalink / raw)
  To: Praveen Kumar K S <praveenssit@gmail.com>; +Cc: pgsql-general

On 6/10/20 9:31 AM, Praveen Kumar K S wrote:
> Hello,
> 
> Yes, both are part of dev. Should I clean the data directory on both 
> servers or only on master ?

Both otherwise the standby will be working with out of date data and 
will not sync.

> 
> On Wed, Jun 10, 2020 at 7:50 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 6/10/20 5:33 AM, Praveen Kumar K S wrote:
>      > Hello,
>      >
>      > I have a master and slave setup running and sometimes we have to
>     do a
>      > complete refresh on dev environments. How can I reset postgres
>     server so
>      > that it wipes out everything including WAL ? So that I configure
>      > master/slave streaming replication again from scratch ? TIA.
> 
>     Are both servers part of the dev setup?
> 
>     If so would deleting the content of $PGDATA and then doing an initdb on
>     it work?
>     To make above easier I would keep a copies of the *.conf files where
>     you
>     could copy them back into $PGDATA after the initdb.
> 
>      >
>      > --
>      > *Regards,
>      >
>      > *
>      > *K S Praveen Kumar
>      >
>      > *
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
> 
> 
> -- 
> *Regards,
> 
> *
> *K S Praveen Kumar
> 
> *


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2020-06-10 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 12:33 [HELP] Reset postgres server Praveen Kumar K S <praveenssit@gmail.com>
2020-06-10 12:39 ` Praveen Kumar K S <praveenssit@gmail.com>
2020-06-10 14:20 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-06-10 16:31   ` Praveen Kumar K S <praveenssit@gmail.com>
2020-06-10 16:33     ` Adrian Klaver <adrian.klaver@aklaver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox