Re: Why do I have holes in my pages?

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Victor Yegorov <vyegorov(at)gmail(dot)com>, Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why do I have holes in my pages?
Date: 2012-09-22 00:47:54
Message-ID: CAL_0b1vitYZ2a9m=zJaNj9K0yyABtoHC4F3HHo+Szqp5Y0davw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 21, 2012 at 11:30 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> At that point the ctid can be re-used, but only if someone actually
> wants a "new" ctid on that page. An ordinary vacuum will not close up
> the gaps on un-used ctids. Only a vaccum full will do that.

There are a couple of ways to do that except the vacuum full that
locks the table exclusively.

1. pg_reorg can re-organize tables on a postgres database without
locks. However it requires twice the space of the table size and might
lead to IO spikes.
2. pgcompactor a tables and indexes bloat reducing tool, without
locking also. It is slower than pg_reorg but does its job more gently.

>
> The space used by these ctid gaps is not large, and as the OP
> discovered, his wasted space was in fact happening outside of the
> database itself.
>
> Cheers,
>
> Jeff
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
Sergey Konoplev

a database and software architect
http://www.linkedin.com/in/grayhemp

Jabber: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp Phone: +14158679984

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2012-09-22 02:43:40 Curosity question regarding "LOCK" NOWAIT
Previous Message Walter Hurry 2012-09-21 22:25:49 Re: Windows Services and Postgresql 9.1.3