Restoring database from false update

Поиск
Список
Период
Сортировка
От Maksim Fomin
Тема Restoring database from false update
Дата
Msg-id d-dSPyz7AbptW8-tvu3Q476dFdcnnBdg4YEaJwwoHf9osuhxJBoF_-mDtrwJ_EVqGHl43wqfP-QAN8cNvXpIatC1dAJe5wcQaqYvnUq1VbA=@fomin.one
обсуждение исходный текст
Ответы Re: Restoring database from false update  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hi!

Yesterday I updated the version of posgtresql from 12.0 to 12.5-1. Today I found that for some reason (*) there was bug
inpackage update script which caused the postgresql to think that it should be updated from 12 to 13. I followed
instructionsto update postgresql (**). 
What I did:
1) copied postgresql folder to backup destination (mv)
2) created new directories (mkdir) and changed permissions (chown)
3) executed 'initdb' inside new folder

Then I tried to upgrade the database via 'pg_upgrade' but realised that I cannot do that because in my distro binaries
ofprevious package version are gone, so I cannot supply arguement to the '-b' parameter. At this point I realized that
theupgrade step should not be necessary for transition from 12 to 12.5. I found the issue in bugzilla (*) and updated
postgresqlfrom 12.5-1 12.5-3. Later, I stopped the service and moved backup folder to the usual place. For some reason
psqlshows that there are no relations found in the database, although the database is listed. My next step was to copy
datafrom file-system level backup (about 4-5 days ago) but the result was the same. 

How I can restore the database?

* https://bugs.archlinux.org/task/68601
** https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: New "function tables" in V13 documentation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Range partitioning and overlap