pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jerry Sievers <gsievers19@comcast.net>
To: Martín Fernández <fmartin91@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Vacuum not deleting tuples when lockless
Date: Fri, 14 Sep 2018 20:52:03 -0500
Message-ID: <8736ub5xz0.fsf@jsievers.enova.com> (raw)
In-Reply-To: <5b9c3f8aaa20125720000001@polymail.io>
References: <5b9c3f8aaa20125720000001@polymail.io>

Martín Fernández <fmartin91@gmail.com> writes:

> *
> Hello,
>
> 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.
> ```
>
> I've been investigating the reasons for vacuum not being able to do
> it's work and I found that generally the problem is caused by open
> transactions referencing the dead tuples. I also found that locking
> can be a problem as well.
>
> I did check that no long running transaction was happening and no
> locking was happening before running `vacuum` on the given table.
>
> I used this query to check the locks:
>
> ```
> SELECT query, state,locktype,mode
> FROM pg_locks
> JOIN pg_stat_activity
>   USING (pid)
> WHERE relation::regclass = 'my_table'::regclass
>   AND granted IS TRUE;
> ```
>
> I'm not sure where else to look for a potential issue that could be
> causing this problem. A few days back we had to use re_pack on the

Also check for...

* Old open prepared xacts.
* Inactive replication slots.
* Standbys confi'd with large vacuum clean up delay and feedback
  enabled.

HTH

> given table to solve our performance issues.
>
> Important thing to clarify is that we are using postgresql 9.2.24
>
> Thanks in advance!
>
> Best,
> Martín
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800




view thread (5+ messages)  latest in thread

Message-ID: <8736ub5xz0.fsf@jsievers.enova.com>
Permalink:  ../8736ub5xz0.fsf@jsievers.enova.com/
Also on:    postgresql.org/message-id/8736ub5xz0.fsf@jsievers.enova.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: gsievers19@comcast.net, fmartin91@gmail.com
  Subject: Re: Vacuum not deleting tuples when lockless
  In-Reply-To: <8736ub5xz0.fsf@jsievers.enova.com>
  References: <5b9c3f8aaa20125720000001@polymail.io> <8736ub5xz0.fsf@jsievers.enova.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