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