Re: Query re disk usage

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Paul Lambert <paul(dot)lambert(at)reynolds(dot)com(dot)au>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query re disk usage
Date: 2007-11-22 07:28:47
Message-ID: 1195716527.5975.0.camel@mha-laptop.clients.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-11-22 07:34:07 Re: POLL: Women-sized t-shirts for PostgreSQL
Previous Message Joshua D. Drake 2007-11-22 07:02:14 Re: POLL: Women-sized t-shirts for PostgreSQL