How to _really_use a non-default tablespace

From: "Andras Simon" <szajmi(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to _really_use a non-default tablespace
Date: 2006-10-17 14:56:09
Message-ID: 9008cd5d0610170756n48bd5016x73ecb679fceb2bca@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It seems that PG uses the PGDATA directory even for operations
that affect databases on different tablespaces. For example, when
an index is created on a table that is in tablespace TS, the
index ends up in TS (as it should), but first a temporary
file (with size comparable to the final index) is written below
PGDATA, and is truncated only at the end of the operation.

As a more drastic example: I created a DB on a tablespace TS, and
copied a 25 MB file into one of its tables. I ended up having 60
MB of extra data in $PGDATA/pg_xlog that doesn't go away even
after dropping the database.

The docs (19.6 Tablespaces) says

"The tablespace associated with a database is used to store the
system catalogs of that database, as well as any temporary files
created by server processes using that database."

so I must be missing something.

Andras

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-10-17 14:59:34 Re: A query planner that learns
Previous Message Madison Kelly 2006-10-17 14:46:15 Re: A query planner that learns