Re: Question regarding logical replication

From: Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com>
To: Weiping Qu <qu(at)informatik(dot)uni-kl(dot)de>
Cc: PostgreSql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question regarding logical replication
Date: 2017-10-26 19:42:29
Message-ID: 1797512837.293967.1509046949681.JavaMail.zimbra@opensysperu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. I've had experience with both BDR & pglogical. For each replication slot, postgres saves a LSN which points to the last xlog entry read by the client. When a client does not reads xlog, for example, if it cannot connect to the server, then the distance between such LSN(pg_replication_slots.restart_lsn) and the current xlog location(pg_current_xlog_insert_location()) will enlarge over the time. Not sure about the following, but postgres will not clear old xlog entries which are still pending to be read on any replication slot. Such situation may also happen, in lower degree, if the client cannot read WAL as fast as it's produced. Anyhow, what will happen is xlog will grow more and more. However, that will probably not impact performance, as xlog is written anyway. But if you don't have enough free space, you could get your partition full of xlog.

Regards,

Alvaro Aguayo
Operations Manager
Open Comb Systems E.I.R.L.

Office: (+51-1) 3377813 | Mobile: (+51) 995540103 | (+51) 954183248
Web: www.ocs.pe

----- Original Message -----
From: "Weiping Qu" <qu(at)informatik(dot)uni-kl(dot)de>
To: "PostgreSql-general" <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, 26 October, 2017 14:07:54
Subject: [GENERAL] Question regarding logical replication

Dear postgresql community,

I have a question regarding understanding the implementation logic
behind logical replication.

Assume a replication slot created on the master node, will more and more
data get piled up in the slot and the size of replication slot
continuously increase if there is no slave reading/dequeuing data out of
this slot or very slowly, thus incurring high I/Os and slow down the
transaction throughput?

Looking forward to your explanation.

Kindly review and please share your comments on this matter.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-10-26 20:10:59 Re: [GENERAL] Postgres 10 manual breaks links with anchors
Previous Message Peter Eisentraut 2017-10-26 19:22:52 Re: [GENERAL] Postgres 10 manual breaks links with anchors