Re: [GENERAL] Manage slot in logical/pglogical replication

2017-07-31 Thread Scott Marlowe
On Mon, Jul 17, 2017 at 7:08 AM, dpat  wrote:
> yes i have estimated pg_xlog but server, some time, writes a lot of WAL file.
> there are some robust alternative to replicate partial database in
> Postgresql over WAN?
> or, what's the best way to realign pglogical replica? pg_dump/restore?.
> i have to find the best way to replicate only some table over internet to
> remote database.

That's been a job for slony in the past. Now pg_logical seems to be
getting ready / is ready to replace it.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Manage slot in logical/pglogical replication

2017-07-19 Thread dpat
yes i have estimated pg_xlog but server, some time, writes a lot of WAL file.
there are some robust alternative to replicate partial database in
Postgresql over WAN?
or, what's the best way to realign pglogical replica? pg_dump/restore?.
i have to find the best way to replicate only some table over internet to
remote database.
thanks



--
View this message in context: 
http://www.postgresql-archive.org/Manage-slot-in-logical-pglogical-replication-tp5970961p5971578.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Manage slot in logical/pglogical replication

2017-07-13 Thread Alvaro Herrera
--- Begin Message ---



Hi List,
  I'm m extremely please to  see the logical replication aka: 
transaction replication feature been implemented in Pg 10,  very nice 
work done by the contrib of this module/feature!
  Since  here is mentioned the "replication slots" are located on 
master replication host, if the master goes offline unexpected what 
will  be state of slave server :

-will accept  transactions( writes connection)  ?
 will rollback the uncommitted transactions? and move to read-write 
state/promote as new  master? ( re cgf slots)
-should the DBA consider cfg replication slots on different  host than 
master ( or at least mirror to a 3 side) ?



Thank you
Isabella
-
On 07/13/2017 09:11 AM, pgsql-general-ow...@postgresql.org wrote:

Message Digest
Volume 1 : Issue 15352 : "text" Format

Messages in this Issue:
   Re: Systemd support (was:Re: Please say it isn't so)
   Re: Systemd support (was:Re: Please say it isn't so)
   Re: Manage slot in logical/pglogical replication
   I can't cancel/terminate query.
   Re: Get table OID
   Re: BDR node removal and rejoin
   Re: I can't cancel/terminate query.

--

Date: Thu, 13 Jul 2017 10:49:01 -0400
From: Vick Khera 
To: pgsql-general@postgresql.org
Subject: Re: Systemd support (was:Re: Please say it isn't so)
Message-ID: 

What exactly does the configure flag to enable systemd support do? It seems
to me that building software to the systemd platform is just the same as
building it for windows vs unix or any other platform. One can only hope it
doesn't cause the others to wither away.

On Wed, Jul 12, 2017 at 3:20 AM, Mark Morgan Lloyd <
markmll.pgsql-gene...@telemetry.co.uk> wrote:


On 12/07/17 05:00, Steve Litt wrote:


Hi all,

Please tell me this is a mistake:

https://wiki.postgresql.org/wiki/Systemd

Why a database system should care about how processes get started is
beyond me. Systemd is an entangled mess that every year subsumes more
and more of the operating system, in a very non-cooperative way.

There are almost ten init systems. In every one of those init systems,
one can run a process supervisor, such as runit or s6 or
daemontools-encore, completely capable of starting the postgres server.

Every year, systemd further hinders interoperability, further erodes
interchangeability of parts, and continues to address problems with
WONTFIX. In the long run, you do your users no favor by including
init-system specific code in Postgres or its makefiles. If systemd
can't correctly start Postgres, I guarantee you that s6 or runit,
running on top of systemd, can.

Postgres doesn't care which language makes a query to it. Why
should Postgres care which init system started it? I hope you can free
Postgres of init-specific code, and if for some reason you can't do
that, at least don't recommend init-specific code.


OTOH since systemd is what's being supported by a significant number of
distributions it makes sense to at least try to work robustly with it.

While my preference would have been to have made such a change at a major
version transition, the reality is that database systems are competitive,
and not keeping up with the underlying platform would have been very much
to PostgreSQL's disadvantage,

OP: Please note that you do yourself no favours at all by posting a
subject line which could very easily be misinterpreted as spam.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Attachment of type text/html removed.]

--

Date: Thu, 13 Jul 2017 11:24:10 -0400
From: Tom Lane 
To: Vick Khera 
Cc: pgsql-general@postgresql.org
Subject: Re: Systemd support (was:Re: Please say it isn't so)
Message-ID: <17764.1499959...@sss.pgh.pa.us>

Vick Khera  writes:

What exactly does the configure flag to enable systemd support do?

Not a lot.  A quick grep for USE_SYSTEMD says it does nothing except
add code in the postmaster to report ready/not-ready state transitions
by calling sd_notify().  We have significantly more lines of
documentation concerning systemd than we do code.

 regards, tom lane


--

Date: Thu, 13 Jul 2017 11:55:31 -0400
From: Alvaro Herrera 
To: dpat 
Cc: pgsql-general@postgresql.org
ubject: Re: Manage slot in logicaS
l/pglogical replication
Message-ID: <20170713155531.hfzfxdvibw46bn6x@alvherre.pgsql>

dpat wrote:


i have configure a master-replica replication with new pglogical 2.0.
I have to replicate data over MPLS/VPN, so there is a possibility that the
link 

Re: [GENERAL] Manage slot in logical/pglogical replication

2017-07-13 Thread Alvaro Herrera
dpat wrote:

> i have configure a master-replica replication with new pglogical 2.0.
> I have to replicate data over MPLS/VPN, so there is a possibility that the
> link temporarily interrupts.
> I know that you have to be accurately estimated pg_xlog folder.
> How can I handle the prolonged interruption of the link?
> Can I just extend the folder? Or drop the slot?

Yeah, data accumulates in the origin side ("master"), so you need to
make sure you have sufficient room in pg_xlog to hold all the data
generated during the network interruption.

Dropping the slot would of course release the disk space, but it would
mean that you'd have to re-create the replica afterwards.  I suppose you
could have pg_xlog large enough to hold as much data as possible for a
mid-sized network interruption, and drop the slot as a last resource if
a connection interrupts for long enough that you risk causing
reliability problems in the origin.

> I can create a consumer who temporarily saves the data in an external file?

I don't think so.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Manage slot in logical/pglogical replication

2017-07-12 Thread dpat
Hi,
i have configure a master-replica replication with new pglogical 2.0.
I have to replicate data over MPLS/VPN, so there is a possibility that the
link temporarily interrupts.
I know that you have to be accurately estimated pg_xlog folder.
How can I handle the prolonged interruption of the link?
Can I just extend the folder? Or drop the slot?
I can create a consumer who temporarily saves the data in an external file?
thank you so much
Denis




--
View this message in context: 
http://www.postgresql-archive.org/Manage-slot-in-logical-pglogical-replication-tp5970961.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general