Re: postgres table have a large number of relpages and occupied a big memory size

From: Vivekkumar Pandey <vivekkumar(dot)pandey(at)globallogic(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres table have a large number of relpages and occupied a big memory size
Date: 2011-08-08 06:02:08
Message-ID: CANE+4N8GQzBdnwY56JLBLj-_0A2rZVgD+w4zmV6VTJmh9QF-RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi ,

I have version of PostgreSQL as given below:---

version
-------------------------------------------------------------------------------------
PostgreSQL 8.1.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.3.3 (SuSE Linux)

And it does't have any n_dead_tup columns in pg_stat_all_tables like this:

mydb=# \d pg_stat_all_tables
View "pg_catalog.pg_stat_all_tables"
Column | Type | Modifiers
---------------+--------+-----------
relid | oid |
schemaname | name |
relname | name |
seq_scan | bigint |
seq_tup_read | bigint |
idx_scan | bigint |
idx_tup_fetch | bigint |
n_tup_ins | bigint |
n_tup_upd | bigint |
n_tup_del | bigint |

In what situations table creates a new row instead of using deleted
marked tuples that's why size of table increases abnormally.

On Sat, Aug 6, 2011 at 12:12 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Fri, Aug 5, 2011 at 5:26 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>> On 5 Srpen 2011, 10:52, Vivekkumar Pandey wrote:
>>
>>> Also suggest the Query that can view the dead tuples in the table.
>>
>> You can't see the dead tuples with a query - that's why they're called
>> dead.
>
> you can see an estimate of how many dead tuples are looking at the
> n_dead_tup in pg_stat_all_tables
>
> --
> Jaime Casanova         www.2ndQuadrant.com
> Professional PostgreSQL: Soporte 24x7 y capacitación
>

--
Thanks

VIVEK KUMAR PANDEY

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2011-08-08 06:05:23 Re: Granting Privileges in Postgres
Previous Message John R Pierce 2011-08-08 06:00:53 Re: Russian Language Spam