Thread: Reading information from crashed PGDATA

Reading information from crashed PGDATA

From
veejar
Date:
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

From
Alvaro Herrera
Date:
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.