Query re disk usage - Mailing list pgsql-general

From Paul Lambert
Subject Query re disk usage
Date
Msg-id 4745212B.6050408@reynolds.com.au
Whole thread Raw
Responses Re: Query re disk usage  (Paul Lambert <paul.lambert@reynolds.com.au>)
Re: Query re disk usage  (Magnus Hagander <magnus@hagander.net>)
List 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


pgsql-general by date:

Previous
From: Paul Lambert
Date:
Subject: Re: POLL: Women-sized t-shirts for PostgreSQL
Next
From: Paul Lambert
Date:
Subject: Re: Query re disk usage