From: | Rui DeSousa <rui(dot)desousa(at)icloud(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Vacuum not removing dead tuples |
Date: | 2017-11-15 16:44:20 |
Message-ID: | BC6828D2-7D68-4EDA-AAE1-AEB1FCF1BA2D@icloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks Laurenz,
A replication slot was my issue. Much appreciated for the insight.
Thanks,
Rui
> On Nov 15, 2017, at 5:06 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> Rui DeSousa wrote:
>> Is there a reason vacuum will not remove dead tuples other than the usual suspects?
>> There are no two phase transactions and even after a restoring the database
>> from binary backup with nothing connect to the restored instance;
>> vacuum still does not remove the dead tuples.
>
> There are three possibilities:
>
> 1) Active transactions:
>
> SELECT backend_xmin, xact_start, datname, pid, query
> FROM pg_stat_activity
> WHERE state <> 'idle'
> ORDER BY xact_start;
>
> 2) Prepared transactions:
>
> SELECT xid, prepared
> FROM pg_prepared_xacts;
>
> 3) Lagging replication slots:
>
> SELECT xmin, slot_name, active, active_pid
> FROM pg_replication_slots;
>
> The "xid" columns will tell you which tuples VACUUM can
> remove: Any tuple with "xmax" less than this are fair game.
>
> Yours,
> Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | kpi6288 | 2017-11-15 17:06:22 | Performance difference between servers |
Previous Message | sighup | 2017-11-15 13:22:59 | Issue with pg_ident after password change on v10.0 |