Query re disk usage

From: Paul Lambert <paul(dot)lambert(at)reynolds(dot)com(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Query re disk usage
Date: 2007-11-22 06:26:51
Message-ID: 4745212B.6050408@reynolds.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm running PG 8.3beta3 on a W2K3 server.

I've set up a tablespace on D drive, with PG itself on C drive and
loaded a bunch of data into a database to test. The directory I've
created the tablespace in on D drive grows to 116Mb - which would be
about right for the amount of data I've plugged in.
(pg_size_pretty(pg_database(size()) certainly corroborates that value
anyway)

I note however, that the pg_database directory on C drive also grows at
the same time to 116MB.

If I truncate the table I've added the data to, both directories shrink
down to around 7 or so Kb.

Why is PG apparently storing my data twice? Is this some sort of
redundancy thing I haven't heard about or have I got something
configured incorrectly? Or am I misinterpreting the way table-spaces are
handled?

The tablespace was set up thusly:
CREATE TABLESPACE "ts_autodrs_main"
OWNER "AutoDRS"
LOCATION 'D:/Database/AutoDRS/Data';

And the table in question defined as:
create table job_classification (
dealer_id text not null ,
date_changed timestamp null ,
time_changed time null ,
job_id text not null ,
des text ,
user_id text null,
access_reports_processed text
) WITHOUT OIDS TABLESPACE ts_autodrs_main
;

Cheers,
P.

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Lambert 2007-11-22 06:37:56 Re: Query re disk usage
Previous Message Paul Lambert 2007-11-22 05:27:08 Re: POLL: Women-sized t-shirts for PostgreSQL