From: | Jerry Sievers <gsievers19(at)comcast(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Martín Fernández <fmartin91(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Vacuum not deleting tuples when lockless |
Date: | 2018-09-15 02:29:44 |
Message-ID: | 87y3c34hnr.fsf@jsievers.enova.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?= <fmartin91(at)gmail(dot)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(dot)consulting(at)comcast(dot)net
p: 312.241.7800
From | Date | Subject | |
---|---|---|---|
Next Message | James Keener | 2018-09-15 02:47:04 | Re: Code of Conduct plan |
Previous Message | Sebastian P. Luque | 2018-09-15 02:23:44 | Re: column information from view |