pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Mike Lissner <mlissner@michaeljaylissner.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How to shorten a chain of logically replicated servers
Date: Wed, 08 Jan 2020 10:53:50 +0100
Message-ID: <de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at> (raw)
In-Reply-To: <CAMp9=EyqDRkn8-D3h_yjcQ5HR-HNyphb+FV2jfS8JaV6Gd_Xcg@mail.gmail.com>
References: <CAMp9=EzU5cBXSwaH=Somx6QTuH_pkN=pgYjSzZdVMs_+RnAveA@mail.gmail.com>
	<a918c694e76b5214b7e82abe6dc7d70a55c22143.camel@cybertec.at>
	<CAMp9=EyqDRkn8-D3h_yjcQ5HR-HNyphb+FV2jfS8JaV6Gd_Xcg@mail.gmail.com>

On Tue, 2020-01-07 at 23:17 -0800, Mike Lissner wrote:
> > You'd have to suspend all data modification on A in that interval.
> 
> I know how to stop the DB completely, but I can't think of any obvious
> ways to make sure that it doesn't get any data modification for a
> period of time. Is there a trick here? This is feeling a bit hopeless.

The simplest solution would be to stop the applications that use PostgreSQL.

You could block client connections using a "pg_hba.conf" entry
(and kill the established connections).

Another option can be to set "default_transaction_read_only = on",
but that will only work if the clients don't override it explicitly.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (6+ messages)  latest in thread

Message-ID: <de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at>
Permalink:  ../de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at/
Also on:    postgresql.org/message-id/de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, mlissner@michaeljaylissner.com
  Subject: Re: How to shorten a chain of logically replicated servers
  In-Reply-To: <de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at>
  References: <CAMp9=EzU5cBXSwaH=Somx6QTuH_pkN=pgYjSzZdVMs_+RnAveA@mail.gmail.com> <a918c694e76b5214b7e82abe6dc7d70a55c22143.camel@cybertec.at> <CAMp9=EyqDRkn8-D3h_yjcQ5HR-HNyphb+FV2jfS8JaV6Gd_Xcg@mail.gmail.com> <de3fe6630101932c1e7796017ca2f0c63d70f4e6.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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