pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martín Fernández <fmartin91@gmail.com>
To: Jerry Sievers <gsievers19@comcast.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Vacuum not deleting tuples when lockless
Date: Sat, 15 Sep 2018 14:33:49 -0700
Message-ID: <5b9d792caa20125720000002@polymail.io> (raw)
In-Reply-To: <87y3c34hnr.fsf@jsievers.enova.com>
References: <87y3c34hnr.fsf@jsievers.enova.com>

Tom & Jerry,

Thanks a lot for information!

On Monday (weekends don't have the same load patterns compared to business days) I will take a look at ` pg_prepared_xacts` that seems to expose Jerry's suggestion on xacts. Replication slots don't apply to 9.2.X from what I could investigate so I will discard that suggestion. 

Feedback setting (hot_standby_feedback) is turned off in all our replicas, this shouldn't be an issue from what I understood. 

Delay setting (vacuum_defer_cleanup_age ) in our master is configured to 0, , this shouldn't be an issue from what I understood. 

Thanks a lot!

Best,
Martín

On Fri, Sep 14th, 2018 at 11:29 PM, Jerry Sievers <gsievers19@comcast.net> wrote:

> 
> 
> 
> Tom Lane < tgl@sss.pgh.pa.us > writes:
> 
> > =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?= < fmartin91@gmail.com > writes:
> >
> >> We are experiencing some `vacuum` issues with a given table
> >> (potentially more). When a manual vacuum runs on the given table it
> >> seems that the `vacuum` process is not doing the expected cleanup.
> >
> >> DETAIL:  113257 dead row versions cannot be removed yet.
> >
> > Locks don't really have anything to do with that: what does matter is
> > how old is the oldest open transaction, because that determines the
> > "event horizon" that dead row versions have to fall below before they
> > can be removed. That oldest transaction might not be holding any locks
> > at the moment, but it doesn't matter, because in principle it could ask
> > to read this table later --- and it should see the table's contents as
> > of its snapshot.
> >
> > Serializable transactions are worse than repeatable-read transactions
> > for this purpose, because the former will keep a snapshot as of their
> > start time.
> >
> > As Jerry mentioned, replication slots can also act like open
> transactions
> > for this purpose, though I don't recall how much of that behavior is
> > present in 9.2.x.
> 
> Oops, didn't notice OP was on 9.2! Presume none, since I don't think we
> got rep slots till 9.4 :-)
> 
> >
> > regards, tom lane
> >
> >
> 
> --
> Jerry Sievers
> Postgres DBA/Development Consulting
> e: postgres.consulting@comcast.net
> p: 312.241.7800
> 
> 
> 
>

view thread (5+ messages)

Message-ID: <5b9d792caa20125720000002@polymail.io>
Permalink:  ../5b9d792caa20125720000002@polymail.io/
Also on:    postgresql.org/message-id/5b9d792caa20125720000002@polymail.io

 · 

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: fmartin91@gmail.com, gsievers19@comcast.net, tgl@sss.pgh.pa.us
  Subject: Re: Vacuum not deleting tuples when lockless
  In-Reply-To: <5b9d792caa20125720000002@polymail.io>
  References: <87y3c34hnr.fsf@jsievers.enova.com> <5b9d792caa20125720000002@polymail.io>

* 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