Обсуждение: Sensitivity to drive failure?

Поиск
Список
Период
Сортировка

Sensitivity to drive failure?

От
Israel Brewster
Дата:
How sensitive is PostgreSQL to a failure that causes it to loose a single tablespace, while the rest of the database cluster is still accessible? Will it continue running, allowing access to databases that aren't in the missing tablespace, or will it crash (or similar)?

I have one rather large database in my cluster containing non-critical statistical data. Stuff that's nice to have, but if I were to loose it, I probably won't even bother trying to restore from backup - I'd just start over collecting it again. As it takes up a lot of space, I am planning to move it off of my main (raid 10) drive, and on to an external. As this data is non-critical, I was thinking of having that external just be a simple single drive, but that leads to my question - should that one drive fail, that portion of the database will obviously disappear. Will Postgress continue to function, serving up the rest of the database that is on the RAID and simply throwing errors whenever something tries to access the missing database? Or will loosing that drive with the one database bring down the entire cluster? If the latter, then I obviously need to think about doing a RAID for that extra drive as well. Thanks.

-----------------------------------------------
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------



Вложения

Re: Sensitivity to drive failure?

От
Tom Lane
Дата:
Israel Brewster <israel@ravnalaska.net> writes:
> How sensitive is PostgreSQL to a failure that causes it to loose a single tablespace, while the rest of the database
clusteris still accessible? Will it continue running, allowing access to databases that aren't in the missing
tablespace,or will it crash (or similar)? 

If the tablespace just disappears mid-run, things will not be good; any
dirty buffers for those tables that are hanging around in shared buffers
cannot be written out, so checkpoints cannot complete, so WAL will
accumulate indefinitely (meaning that crash recovery time will grow,
among other bad effects).  It's not going to be any better than losing
some random subset of files that aren't separated by tablespace.

I don't recall the details for sure, but I think you could manually
recover from such a scenario by dropping all the affected tables.  But
the tablespace mechanism, per se, doesn't help you in this.  It's not
designed to be a robustness aid.

            regards, tom lane


Re: Sensitivity to drive failure?

От
Peter Geoghegan
Дата:

I think it would be really handy if temp_tablespaces were made resilient against everything going away in the event of a hard crash.

--
Regards,
Peter Geoghegan