Re: nonremovable row versions
От | Brad Nicholson |
---|---|
Тема | Re: nonremovable row versions |
Дата | |
Msg-id | 1244470006.29189.39.camel@bnicholson-desktop обсуждение исходный текст |
Ответ на | Re: nonremovable row versions (Scott Marlowe <scott.marlowe@gmail.com>) |
Список | pgsql-admin |
On Mon, 2009-06-08 at 01:14 -0600, Scott Marlowe wrote: > On Mon, Jun 8, 2009 at 12:28 AM, Lutz Steinborn<l.steinborn@4c-ag.de> wrote: > > Hi, > > > > can anybody tell me how to get rid of nonremovable row versions ? > > I know what those rows coming from long running transactions. But I can't see > > any long running transactions in pg_locks and all postgres processes are idle. > > How else can I check if transaction in process ? > > > > > > I don't have any idea from where those long running transaction are comming > > because we are stopping/starting our apllications every 2-3 days. And its not > > the nature of our applications to establish long running transactions. > > I think you misunderstand nonremoveable rows. A demonstration: > > postgres=# create table test (id int); > CREATE TABLE > postgres=# insert into test values (1),(2),(3); > INSERT 0 3 > postgres=# vacuum verbose test; > INFO: vacuuming "public.test" > INFO: "test": found 0 removable, 3 nonremovable row versions in 1 pages > DETAIL: 0 dead row versions cannot be removed yet. > There were 0 unused item pointers. > 1 pages contain useful free space. > 0 pages are entirely empty. > CPU 0.00s/0.00u sec elapsed 0.00 sec. > VACUUM > > It's not just old transactions, it's current data as well. I've seen cases in 8.1 where the information pg_stat_activity is incorrectly report a transaction as "<IDLE>" when it is in fact blocking the removal of dead tuples. I always chalked it up to inaccuracy of the stats collector in 8.1. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.
В списке pgsql-admin по дате отправления: