Re: OK to put temp tablespace on volatile storage or to omit it from backups? - Mailing list pgsql-general

From Christophe Pettus
Subject Re: OK to put temp tablespace on volatile storage or to omit it from backups?
Date
Msg-id 5A52C82F-78AD-4A62-8CC5-B93E38D2815C@thebuild.com
Whole thread Raw
In response to Re: OK to put temp tablespace on volatile storage or to omit it from backups?  (Yang Zhang <yanghatespam@gmail.com>)
List pgsql-general
On Apr 30, 2013, at 11:34 PM, Yang Zhang wrote:

> In other words, I guess, I'm asking because of Xof's comment on that blog post:
>
> "That’s true if you recreate the PG_ directory in the tablespace;
> otherwise, you get the error:
> reindexdb: reindexing of database "test" failed: ERROR: could not
> create directory "pg_tblspc/69944/PG_9.2_201204301/61884": No such
> file or directory
> However, that’s not a guaranteed feature of PostgreSQL, and I would
> never rely on it."

Well, here's the core situation: If the underlying storage for a tablespace disappears, you have to patch up the
databaseby recreating the directory in order for the database to be operational again.  This isn't a documented
PostgreSQLAPI; it's a disaster recovery procedure.  It works now, it probably will work in the future, but I don't
thinkthere's any guarantee that the procedure that works today will work tomorrow. 

Thus, I really don't recommend making an operational decision that the lost of a tablespace's storage is considered
somethingroutine. 

That being said, you can make it work today if it is critical that it do so.

--
-- Christophe Pettus
   xof@thebuild.com



pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: OK to put temp tablespace on volatile storage or to omit it from backups?
Next
From: Andrew Hastie
Date:
Subject: Re: zLinux Load Testing Experience