Re: Please help

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "Roseller A(dot) Romanos" <don2_907(at)yahoo(dot)com>
Cc: POSTGRES <pgsql-general(at)postgresql(dot)org>
Subject: Re: Please help
Date: 2009-07-17 18:03:44
Message-ID: 1247853824.9349.206.camel@ayaki
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2009-07-16 at 04:47 -0700, Roseller A. Romanos wrote:
> Please help me with this. I really need your advice as to how to
> retrieve the data in my postgresql database.
>
> I have postgresql installed in Windows XP platform five months ago.
> Just yesterday my OS bugged down and saying NTDLR is missing. What I
> did was I re-installed my OS. When I finished my installation I found
> out that I cannot access anymore my postgresql using PGAdmin III.
>
> What should I do to access my database and retrieve the important
> records in it?

Back up your data directory NOW. This is the directory containing the
PG_VERSION file, the pg_xlog directory, etc. You must back up the WHOLE
directory EXACTLY as it is.

Unfortunately I have the feeling the Windows installer wants to initdb
even if there's already data in the data directory (someone please
correct me if that's not so), so you might have to:

- rename your data directory before installing PostgreSQL.

- Install PostgreSQL. Make sure you install the same major
version, eg install 8.3.7 if you had some 8.3.x version
installed originally. If you are unsure, open the PG_VERSION
file in a text editor to see what it says. (DO NOT save
changes).

- Stop the PostgreSQL service. Use "Start -> Run -> services.msc",
find the PostgreSQL service, and stop it.

- Rename the data directory the installer created to something else.

- Rename your old data directory to the one the installer created.

- Make sure the security settings on the old data directory will allow
PostgreSQL to read and write to it. Setting the ownership to be the
same as that of the new data directory should do the trick. Use the
"security" tab of the properties window on the folder to do this.

- Start the PostgreSQL service.

With luck you can now connect. If so, IMMEDIATELY back up your database,
and start doing so regularly...

--
Craig Ringer

In response to

  • Please help at 2009-07-16 11:47:57 from Roseller A. Romanos

Browse pgsql-general by date

  From Date Subject
Next Message Andreas 2009-07-17 18:06:03 COPY command on windows???
Previous Message Craig Ringer 2009-07-17 17:50:42 Re: Working around spurious unique constraint errors due to SERIALIZABLE bug