pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logical Replication and table bloat
3+ messages / 3 participants
[nested] [flat]

* Logical Replication and table bloat
@ 2020-06-05 19:53  Martín Fernández <fmartin91@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Martín Fernández @ 2020-06-05 19:53 UTC (permalink / raw)
  To: pgsql-general

Hello,

Yesterday we stumbled upon a performance issue that we were not expecting. We are replicating our database using AWS DMS which uses logical replication to capture changes. We have some hot tables that get updated very regularly and with the DMS turned on we started noticing that in those table, table bloat increased considerably ~15 times more free_tuples than the average. 

When doing logical replication, the subscriber will hold the tuples that could be flagged for reuse until they are sent ? Just trying to understand a little bit better how the logical replication is affecting the vacuuming.

Thanks before hand!

Best,
Martín




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

* Re: Logical Replication and table bloat
@ 2020-06-05 19:59  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Martín Fernández <fmartin91@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2020-06-05 19:59 UTC (permalink / raw)
  To: Martín Fernández <fmartin91@gmail.com>; pgsql-general

On 6/5/20 12:53 PM, Martín Fernández wrote:
> Hello,
> 
> Yesterday we stumbled upon a performance issue that we were not expecting. We are replicating our database using AWS DMS which uses logical replication to capture changes. We have some hot tables that get updated very regularly and with the DMS turned on we started noticing that in those table, table bloat increased considerably ~15 times more free_tuples than the average.
> 
> When doing logical replication, the subscriber will hold the tuples that could be flagged for reuse until they are sent ? Just trying to understand a little bit better how the logical replication is affecting the vacuuming.

A question for the AWS folks:

https://forums.aws.amazon.com/forum.jspa?forumID=60

> 
> Thanks before hand!
> 
> Best,
> Martín
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: Logical Replication and table bloat
@ 2020-06-05 20:54  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Martín Fernández <fmartin91@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2020-06-05 20:54 UTC (permalink / raw)
  To: Martín Fernández <fmartin91@gmail.com>; pgsql-general

On 2020-06-05 21:53, Martín Fernández wrote:
> Yesterday we stumbled upon a performance issue that we were not expecting. We are replicating our database using AWS DMS which uses logical replication to capture changes. We have some hot tables that get updated very regularly and with the DMS turned on we started noticing that in those table, table bloat increased considerably ~15 times more free_tuples than the average.
> 
> When doing logical replication, the subscriber will hold the tuples that could be flagged for reuse until they are sent ? Just trying to understand a little bit better how the logical replication is affecting the vacuuming.

As far as vacuum is concerned, it is very similar to a normal client 
session: It may insert tuples, update tuples, delete tuples; update and 
delete create bloat, autovacuum should come along to clean up.  There 
isn't normally any separate vacuum tuning necessary for this, but if you 
are experiencing issues, first treat it like a normal vacuum 
configuration problem.

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





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


end of thread, other threads:[~2020-06-05 20:54 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 19:53 Logical Replication and table bloat Martín Fernández <fmartin91@gmail.com>
2020-06-05 19:59 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-06-05 20:54 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.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