Thread: Postgresql Data directory Issue
Dear all, I have a database server ( 10 databases near about 110 GB) running Postgresql-.8.3 ) Today I need to format that system but I an facing the below issues :- 1. I am trying to use the previous data directory (/opt/PostgresPlus/8.3/data) in new Postgresql-8.4 installation but it results in below error while installing :- Data Directory [/media/a519e535-62a8-43a2-af93-2323690a3177/opt/PostgresPlus/8.3/data]: Error: The existing data directory (catalog version: 200711281) is not compatible with this server (catalog version: 200904091). Press [Enter] to continue : So i think I need to install Postgresql-8.3 to use that data. 2. I installed Postgresql-8.3 in new server and trying to use the data directory but it faces the below error :- Existing data directory is not empty and it cannot able to use it . Please note that I am not able to take the complete databases backup because the database server is down and restarts when we start backups. Any help will be appreciated. Thanks
* Adarsh Sharma wrote: > 2. I installed Postgresql-8.3 in new server and trying to use the data > directory but it faces the below error :- > > Existing data directory is not empty and it cannot able to use it . First, be very, very careful. initdb already saved your data from destruction once, but you should never have allowed it anywhere near your live data in the first place. Also, do not tempt fate: Make sure that your new installation is as close to identical to the old one as possible (architecture, endianness, word size). Starting PostgreSQL on an incompatible data directory should fail reliably, but it sounds as if you do not have current backups. If your data is on some sort of shared storage, maybe you can take a snapshot before you do any more experiments? Install with a different data directory (or make sure it is not mounted while you are installing), then reconfigure before starting the database. -- Christian
Sorry to be rude, but you are in urgent need of a PostgreSQL DBA, (if you feel you somehow value your data). Anyways, 8.3 catalog is not compatible with 8.4. You need to dump->upgrade->restore if you just start 8.3 server with /usr/local/pgsql/bin/postgres -D <path_to_your_data_dir> what happens? Στις Wednesday 05 October 2011 15:05:26 ο/η Adarsh Sharma έγραψε: > Dear all, > > I have a database server ( 10 databases near about 110 GB) running > Postgresql-.8.3 ) > Today I need to format that system but I an facing the below issues :- > > 1. I am trying to use the previous data directory > (/opt/PostgresPlus/8.3/data) in new Postgresql-8.4 installation but it > results in below error while installing :- > > Data Directory > [/media/a519e535-62a8-43a2-af93-2323690a3177/opt/PostgresPlus/8.3/data]: > Error: The existing data directory (catalog version: 200711281) is not > compatible with this server (catalog version: 200904091). > Press [Enter] to continue : > > So i think I need to install Postgresql-8.3 to use that data. > > 2. I installed Postgresql-8.3 in new server and trying to use the data > directory but it faces the below error :- > > Existing data directory is not empty and it cannot able to use it . > > > Please note that I am not able to take the complete databases backup > because the database server is down and restarts when we start backups. > > Any help will be appreciated. > > > > Thanks > > > -- Achilleas Mantzios
Dear all, Any update on the issue. Thanks Adarsh Sharma wrote: > Dear all, > > I have a database server ( 10 databases near about 110 GB) running > Postgresql-.8.3 ) > Today I need to format that system but I an facing the below issues :- > > 1. I am trying to use the previous data directory > (/opt/PostgresPlus/8.3/data) in new Postgresql-8.4 installation but it > results in below error while installing :- > > Data Directory > [/media/a519e535-62a8-43a2-af93-2323690a3177/opt/PostgresPlus/8.3/data]: > Error: The existing data directory (catalog version: 200711281) is not > compatible with this server (catalog version: 200904091). > Press [Enter] to continue : > > So i think I need to install Postgresql-8.3 to use that data. > > 2. I installed Postgresql-8.3 in new server and trying to use the data > directory but it faces the below error :- > > Existing data directory is not empty and it cannot able to use it . > > > Please note that I am not able to take the complete databases backup > because the database server is down and restarts when we start backups. > > Any help will be appreciated. > > > > Thanks > > >
On 6 October 2011 11:04, Adarsh Sharma <adarsh.sharma@orkash.com> wrote: > Dear all, > > Any update on the issue. Apparently, pg-migrator (later called pg_upgrade) is available for pg 8.3, see here for instructions: http://www.depesz.com/index.php/2010/05/19/waiting-for-9-0-pg_upgrade/ -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.
We can upgrade to new version if our previous version is running.
But In my Case I have only /opt/postgresql-8.3/data directory ( 110 Gb).
My server Crashes down and Postgres is not running.
I copied postgresql data directory to a new server and installed Postgresql8.3 but still it is not using the previous directory.
Thanks & regards
Adarsh Sharma
I donot want to upgrade
Alban Hertroys wrote:
But In my Case I have only /opt/postgresql-8.3/data directory ( 110 Gb).
My server Crashes down and Postgres is not running.
I copied postgresql data directory to a new server and installed Postgresql8.3 but still it is not using the previous directory.
Thanks & regards
Adarsh Sharma
I donot want to upgrade
Alban Hertroys wrote:
On 6 October 2011 11:04, Adarsh Sharma <adarsh.sharma@orkash.com> wrote:Dear all, Any update on the issue.Apparently, pg-migrator (later called pg_upgrade) is available for pg 8.3, see here for instructions: http://www.depesz.com/index.php/2010/05/19/waiting-for-9-0-pg_upgrade/
On 6 October 2011 12:18, Adarsh Sharma <adarsh.sharma@orkash.com> wrote: > We can upgrade to new version if our previous version is running. But isn't upgrading exactly what you're trying to do? And why do you think you need to have the old database running to be able to upgrade? According to the link I sent you, you don't. > But In my Case I have only /opt/postgresql-8.3/data directory ( 110 Gb). And PG 8.4 software, right? So you are in the middle of upgrading. > My server Crashes down and Postgres is not running. > I copied postgresql data directory to a new server and installed > Postgresql8.3 but still it is not using the previous directory. Check the logs to see why it isn't using that directory. Is it a different directory than where your settings expect it? You can also use the -D switch for pg_ctl and start PG manually like that. -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.