Re: Query re disk usage - Mailing list pgsql-general

From Magnus Hagander
Subject Re: Query re disk usage
Date
Msg-id 1195716527.5975.0.camel@mha-laptop.clients.sollentuna.se
Whole thread Raw
In response to Query re disk usage  (Paul Lambert <paul.lambert@reynolds.com.au>)
Responses Re: Query re disk usage
List pgsql-general
On Thu, 2007-11-22 at 15:26 +0900, Paul Lambert wrote:
> 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?

Sounds like the WAL log. It's in the pg_xlog directory - verify that
that's where the data is increasing.

The WAL log is global and not per-tablespace, so it doesn't follow your
tablespaces location.

//Magnus


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: POLL: Women-sized t-shirts for PostgreSQL
Next
From: "Scott Marlowe"
Date:
Subject: Re: POLL: Women-sized t-shirts for PostgreSQL