I had an instance of Postgres (v 9.2), running locally on Windows 7. I have yet to isolate the cause, but PG became corrupted in such a way that the server abruptly stopped, and the service would shut down immediately when I attempted to restart it. I reinstalled 9.2, and that fixed the problem with the service not starting. However, now pgAdmin does not show any of the databases were there previously (yet the files are still there in the data\base directory). Oddly, the size of the pg_default tablespace shows 11GB, the correct size, but does not show any of the databases or objects under the dependencies. The backups I have are a few days old, so I would like to restore the databases directly from the files. How do I get PG to recognize the database files that are in the data/base directory?

Data Recovery: PostgreSQL showing base volume under postgres pg_default tablespace, but does not recognize separate databases
317 views Asked by npell At
1
There are 1 answers
Related Questions in POSTGRESQL
- Only the first SQL script gets executed inside Docker Postgres container
- Compare fields in two tables
- Hibernate ClobJdbcType bindings: what are the diferences?
- Postgres && statement Error in Mybatis Mapper?
- Can this query be optimized? (Choosing a random row to insert, that excludes previously inserted Rows)
- Connection terminated unexpectedly while performing multi row insert using pg-promise
- Processing multiple forms in nodejs and postgresql
- How to copy data from SQLite to postgreSQL?
- PGAdmin4 configured behind a reverse proxy but unable to connect to Postgresql server
- Updates to pgsodium encrypted values don't use specified key_id
- Connecting to Postgres running in a Docker container using psql
- Can't connect to local postgresql server from my docker container
- Django Arrayfield migration to cloud sql (Postgresql) not creating the column
- Get list of matching keywords for each post
- docker-compose can't reset postgresql database
Related Questions in POSTGRESQL-9.2
- Alter entries of Primary key in table to match number of rows from COUNT Postgresql
- Merge two rows with both possibly being null
- postgres database recovery - version 9.2
- Upgrading PostgreSQL 9.2.15 to 16.1 - Incremental Version Updates?
- How to optimize this postgresql query which is running for more than 24 hours.it process 60,000 data inside the loop
- Need help configuring PostgreSQL connection to behave like MySQL: Connect to server without auto-selecting default database
- unable to drop ERROR: unknown compresstype "quicklz" unable to drop
- PGSQL 9.2 / OpenErp 7 / Restore database from plain directory
- XML validation using XSD in postgres procedure
- User's Online Time and Period with no Users Online
- How to configure Postgres to never rotate or truncate a log file?
- insert if update subquery returns 0 rows
- Pre-define groups for PostgreSQL query
- Upgraded pgAdmin shows warning, not displaying Tables list, queries working without problem
- pg_ctl: directory "C:/Program Files/PostgreSQL/13/data" does not exist The reload command returned an error (1)
Related Questions in PGADMIN
- PGAdmin4 configured behind a reverse proxy but unable to connect to Postgresql server
- make selected text visible in PGAdmin 4 Query Editor
- 1 to 1 relation postgres
- Unwanted Rollback in Postgres - missing data after commit
- pgadmin unable to connect to server
- i cannot enter the http://localhost:8069/web/ odoo 16
- I cannot COMMIT inside a procedure
- Image not appearing. Instead it is displaying the alt text
- Why can't I restore dataset on pg admin with MacOS
- postresql installed locally and use pgadmin with docker ; can't connect to my local database
- Unable to connect to postgres(running in docker) from pgadmin
- Is there a way to configure so that pgadmin 4 via browser can continue to work after pgadmin 4 via desktop version is closed?
- PgAdmin Connection Error: "getaddrinfo ENOTFOUND postgresdb" (Docker Compose)
- Pg Admin import csv issues
- SQL pgAdmin 4 Syntax
Related Questions in DATA-RECOVERY
- Exporting conda environments without using conda commands
- How to recover missing files and folders after power loss on an encrypted LUKS drive
- Limitation of versionRetentionPeriod in Cloud Spanner PiTR
- file recovery with foremost
- postgres database recovery - version 9.2
- How to Convert Garbled Text Back to an Image File?
- Infinix Android showing error - Cannot load Android System. Your data may be corrupt
- Files disappeared after renaming folder to .nomedia in Android, so what happend?
- How to recover collection that are dropped but in a pending state in the MongoDB?
- Copy files from root folder of android to pc using python
- Heuristics to improve brute forcing the location of a DEFLATE block
- Data recovery from an Android struck in bootloop
- Forgot the pattern for my one plus 7t pro mobile, how to recovery it?
- How to delete security software without a password?
- Recovering embedded data from seed value
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
In general, every data recovery job is unique. You aren't going to find a simple answer, and these require a lot of hands-on troubleshooting. If you are going to do this yourself, I have some pointers below for getting started. If the data is important, hire an expert (2ndQuadrant, PgExperts, etc).
A few general rules:
Work on a copy of the files (i.e. back up your data directory and all tablespaces, and work on that, on another computer). Better yet, create a validated copy and work on a copy of that.
After having made and verified copies (ideally with hashes of data), run hardware diagnostics on the corrupted system to see what went wrong.
Now to get started, you are probably want to look over the PostgreSQL architecture docs and source code relating to on-disk layout. You will probably need a hex editor. You will certainly want to look at the system tables to see why the relations are not showing up. If you don't have a good understanding of memory and disk alignment issues on your platform you need to brush up on that as well.