Обсуждение: Reading information from crashed PGDATA

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

Reading information from crashed PGDATA

От
veejar
Дата:
This information I have found in PostgreSQL docs:

Table 52-1. Contents of PGDATA

PG_VERSION    A file containing the major version number of PostgreSQL
base    Subdirectory containing per-database subdirectories
global    Subdirectory containing cluster-wide tables, such as pg_database
pg_clog    Subdirectory containing transaction commit status data
pg_multixact    Subdirectory containing multitransaction status data
(used for shared row locks)
pg_subtrans    Subdirectory containing subtransaction status data
pg_tblspc    Subdirectory containing symbolic links to tablespaces
pg_twophase    Subdirectory containing state files for prepared transactions
pg_xlog    Subdirectory containing WAL (Write Ahead Log) files
postmaster.opts    A file recording the command-line options the server
was last started with
postmaster.pid    A lock file recording the current server PID and shared
memory segment ID (not present after server shutdown)

When I have only folder base or base+global, can I read tables data
from databases in such PGDATA via any tools or methods?

Re: Reading information from crashed PGDATA

От
Alvaro Herrera
Дата:
veejar escribió:

> When I have only folder base or base+global, can I read tables data
> from databases in such PGDATA via any tools or methods?

No, you need pg_clog at the very least.  pg_xlog, pg_multixact and
pg_subtrans are almost equally important -- I think you could start
without them but it's not unlikely that your data would be corrupt.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.