pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Igor Polishchuk <ora4dba@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to create logical replication slot with NOEXPORT_SNAPSHOT in jdbc
Date: Tue, 17 Jul 2018 13:29:50 +0200
Message-ID: <2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com> (raw)
In-Reply-To: <CAEcs1Y6EWC7AAULU5nHYsfkHUsXppMDrTszp1ho60f9WDnopcQ@mail.gmail.com>
References: <CAEcs1Y6EWC7AAULU5nHYsfkHUsXppMDrTszp1ho60f9WDnopcQ@mail.gmail.com>

On 17.07.18 03:41, Igor Polishchuk wrote:
> We are trying to use logical decoding for detecting database changes.
> However, when we create a replication slot, the data processing pauses
> if there are still transactions running from before the slot creation.
> If I understand correctly, the slot is waiting for creating a consistent
> snapshot and is blocked by the long transactions.
> In our application, we don't need it, as we only want to see if some
> tables were modified. Is it possible to create a  logical replication
> slot with  NOEXPORT_SNAPSHOT option using jdbc?

That doesn't do what you want.  You still need to wait for the snapshot
to be created; there is no way around that.  The NOEXPORT_SNAPSHOT
option just means that the snapshot, once created, won't be exported for
use by other sessions.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (2+ messages)

Message-ID: <2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com>
Permalink:  ../2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com/
Also on:    postgresql.org/message-id/2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, ora4dba@gmail.com
  Subject: Re: How to create logical replication slot with NOEXPORT_SNAPSHOT in jdbc
  In-Reply-To: <2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com>
  References: <CAEcs1Y6EWC7AAULU5nHYsfkHUsXppMDrTszp1ho60f9WDnopcQ@mail.gmail.com> <2e397db3-823f-7608-ec98-dc235ccdd105@2ndquadrant.com>

* 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