Re: Table not cleaning up drom dead tuples

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Антон Тарабрин <tarabanton(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Table not cleaning up drom dead tuples
Date: 2017-03-14 16:10:30
Message-ID: 103272809.9346601.1489507830062@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> We're, in general, pretty carefull with our DB, as it contains important data.
> Most rollback is issued by application (which processes all data inside transactions).
>
> p.s. Time is in UTC (GMT+0)
>
> <THIS_DB>=# select min(xact_start) from pg_stat_activity where state<>'idle';
> min
> -------------------------------
> 2017-03-14 15:36:05.432139+00
> (1 row)
>
> <THIS_DB>=# select * from pg_stat_activity where state<>'idle' order by xact_start limit 1;
> datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change | waiting | state | backend_xid | backend_xmin | query
> ---------+---------+-------+----------+---------+------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+--------+-------------+--------------+--------------------------------------------------
> 4906146 | <THIS_DB> | 37235 | 10 | pgsql | | | | | 2017-03-14 05:55:43.287128+00 | 2017-03-14 15:36:05.432139+00 | 2017-03-14 15:36:05.432139+00 | 2017-03-14 15:36:05.432141+00 | f | active | | 1621959045 | autovacuum: VACUUM public.stats_y2017_m3_d13_hk2
> (1 row)
>
>

And no prepared transactions you say?

select * from pg_prepared_xacts;

Perhaps someone else will chime in ...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Антон Тарабрин 2017-03-14 16:47:43 Re: Table not cleaning up drom dead tuples
Previous Message Durumdara 2017-03-14 16:08:47 Re: Maximum of connections in PG