pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13426: table bloat - dead rows not removed after vacuum
4+ messages / 4 participants
[nested] [flat]

* BUG #13426: table bloat - dead rows not removed after vacuum
@ 2015-06-10 14:02  jkoceniak@mediamath.com
  0 siblings, 1 reply; 4+ messages in thread

From: jkoceniak@mediamath.com @ 2015-06-10 14:02 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13426
Logged by:          Jamie
Email address:      jkoceniak@mediamath.com
PostgreSQL version: 9.1.14
Operating system:    x86_64-unknown-linux-gnu debian
Description:        

I have a table that is growing out of control. 

After doing a vacuum, the dead rows still remain. Why can't they be
removed?

DETAIL:  214063622 dead row versions cannot be removed yet.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13426: table bloat - dead rows not removed after vacuum
@ 2015-06-10 17:13  David G. Johnston <david.g.johnston@gmail.com>
  parent: jkoceniak@mediamath.com
  0 siblings, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2015-06-10 17:13 UTC (permalink / raw)
  To: jkoceniak@mediamath.com; +Cc: pgsql-bugs

On Wed, Jun 10, 2015 at 10:02 AM, <jkoceniak@mediamath.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      13426
> Logged by:          Jamie
> Email address:      jkoceniak@mediamath.com
> PostgreSQL version: 9.1.14
> Operating system:    x86_64-unknown-linux-gnu debian
> Description:
>
> I have a table that is growing out of control.
>
> After doing a vacuum, the dead rows still remain. Why can't they be
> removed?
>
> DETAIL:  214063622 dead row versions cannot be removed yet.
>

​One possibility is that ​
you have a long-running transaction holding up cleanup.

Viewing "pg_stat_activity" will be informative.

​David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13426: table bloat - dead rows not removed after vacuum
@ 2015-06-10 21:39  Jamie Koceniak <jkoceniak@mediamath.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Jamie Koceniak @ 2015-06-10 21:39 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-bugs

Hi David,

No long running queries are in pg_stat_activity.
I was also able to take this same table and import onto another server, perform millions of deletes and inserts to recreate the problem.
The ‘Vacuum tablename‘ command is not removing dead row versions.

Thanks for the quick reply,
Jamie


From: David G. Johnston [mailto:david.g.johnston@gmail.com]
Sent: Wednesday, June 10, 2015 10:13 AM
To: Jamie Koceniak
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #13426: table bloat - dead rows not removed after vacuum

On Wed, Jun 10, 2015 at 10:02 AM, <jkoceniak@mediamath.com<mailto:jkoceniak@mediamath.com>> wrote:
The following bug has been logged on the website:

Bug reference:      13426
Logged by:          Jamie
Email address:      jkoceniak@mediamath.com<mailto:jkoceniak@mediamath.com>
PostgreSQL version: 9.1.14
Operating system:    x86_64-unknown-linux-gnu debian
Description:

I have a table that is growing out of control.

After doing a vacuum, the dead rows still remain. Why can't they be
removed?

DETAIL:  214063622 dead row versions cannot be removed yet.

​One possibility is that ​
you have a long-running transaction holding up cleanup.

Viewing "pg_stat_activity" will be informative.

​David J.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13426: table bloat - dead rows not removed after vacuum
@ 2015-06-10 22:16  Kevin Grittner <kgrittn@ymail.com>
  parent: Jamie Koceniak <jkoceniak@mediamath.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Kevin Grittner @ 2015-06-10 22:16 UTC (permalink / raw)
  To: Jamie Koceniak <jkoceniak@mediamath.com>; David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-bugs

Jamie Koceniak <jkoceniak@mediamath.com> wrote:
> David G. Johnston [mailto:david.g.johnston@gmail.com] wrote:

>> One possibility is that you have a long-running transaction
>> holding up cleanup.

> No long running queries are in pg_stat_activity.

It doesn't take a long-running *query* to cause a problem; it only
takes a long-running *transaction*.  Look for transactions which
are "idle in transaction" with an old xact_start value.  Also check
the pg_prepared_xacts view for rows with a "prepared" value that is
more than a few seconds old.  Either will prevent the cleanup of 
dead rows.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2015-06-10 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 14:02 BUG #13426: table bloat - dead rows not removed after vacuum jkoceniak@mediamath.com
2015-06-10 17:13 ` David G. Johnston <david.g.johnston@gmail.com>
2015-06-10 21:39   ` Jamie Koceniak <jkoceniak@mediamath.com>
2015-06-10 22:16     ` Kevin Grittner <kgrittn@ymail.com>

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