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: pgsql-general(at)postgresql(dot)org
Subject: postgres table have a large number of relpages and occupied a big memory size
Date: 2011-08-05 07:00:36
Message-ID: CANE+4N_-yHRtRWTtrFUyQ04xsM65+oVf8UUbgqs-Hw3qc4dBSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a cluster database with a master and slave ,
the size of master database is very high reltive to slave
while both have approximatly same data.

On master

# select pg_size_pretty(pg_database_size('table_name'));

pg_size_pretty
----------------
15 GB
(1 row)

relname | reltuples | MB
--------------------------------------+-------------+------
Table1 | 876 | 4395
Table2 | 1.69135e+06 | 1919
Table3 | 1.69137e+06 | 1298
Table4 | 289 | 1062
Table5 | 2007 | 1031
Table6 | 1.69136e+06 | 1019
Table7 | 1809 | 673
Table8 | 1.69137e+06 | 476

On Slave

# select pg_size_pretty(pg_database_size('table_name'));

pg_size_pretty
----------------
1411 MB
(1 row)

all of the table having same number of tuples on slave while having
very low space relative to master .

Please give the reason and appropriate solution of this problem.................

--
Thanks

VIVEK KUMAR PANDEY

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2011-08-05 07:17:59 Re: postgres table have a large number of relpages and occupied a big memory size
Previous Message senthilnathan 2011-08-05 05:05:40 Overhead on while doing pg_start_backup