A
A
Alexander2020-10-30 04:46:13
PostgreSQL
Alexander, 2020-10-30 04:46:13

How to reinstall postgresql while keeping existing databases?

Hello, you need to completely reinstall postgresql, but with the preservation of existing databases, the

dump is not suitable, because the database does not work in principle, the logs say that the error is in the configuration file, but no one even went there
OS: UBUNTU

Thanks in advance)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Neonoviiwolf, 2020-10-30
@Neonoviiwolf

Option to unload the dump? You can even unload with the table creation script

X
Xtensive, 2020-11-05
@Xtensive

0) Will work for a "simple" installation without standby servers or multimaster.
1) Make a cold backup of the database (copy files to PGDATA).
2) Then Try to run PG on the default config.
3) If possible, take a dump (just in case).
4) If it doesn't work, try to create a new cluster in the temporary folder via initdb, check what works with it.
If there is an error in the config, there is hope that this is really an error in the config, and not critical file corruption. This is the easiest way to fix the config. If the database files have died, then it is a long and sad thing to restore.
EMNIP at startup PG checks the configuration file and explicitly says a line with an erroneous parameter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question