Обсуждение: Finding my database

Поиск
Список
Период
Сортировка

Finding my database

От
Дата:
Hi

I initially had the Windows version of PostgreSQL v8.0 running on my C drive
and was connected to a database in the data subdirectory below PostgreSQL.  I
needed to move it to the D Drive.  After completely messing everything up, I
am now unable to get it working.  I have uninstalled everything and now have
v8.2 installed on the D drive, and I put the data directory back within that
installation.  On windows start up I am unable to get the service to start
and it generates the following message:

Error #1
Unable to connect to PostgreSQL (Port#:5432) to get the list of databases.
The error was:
101 - SQLSTATE = 08001


My question is, how do I get it to see the database which is still right
there so this message goes away and all is normal again.  I am totally
stumped as it must be the most unintuitve program I have ever come across,
and trying to find anything in the 1600+ page manual is fruitless.  I am
hoping I have not deleted any critical files.

Can users give me some guidance please, as I am totally unfamiliar with the
complexities of the program.  I'm just an end user of the database within a
separate program.

Thanks,
Adrian

Re: Finding my database

От
Raymond O'Donnell
Дата:
On 17/08/2007 05:44, apitt@tech2u.com.au wrote:

> needed to move it to the D Drive.  After completely messing everything up, I
> am now unable to get it working.  I have uninstalled everything and now have
> v8.2 installed on the D drive, and I put the data directory back within that

I know it's not a lot of help to you at this point, but the recommended
way to backup and restore a database is using pg_dump, and if you're
moving from one major version to another it's the only way.

Was the previous installation of Postgres also 8.2? If not - if it was
an earlier version - I'd put the old version back, point it at the data
directory, then use pg_dump to export the data if you want to upgrade at
that point.

Have a look at the following, and in particular the examples towards the
bottom:

   http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html


HTH,

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: Finding my database

От
Raymond O'Donnell
Дата:
On 17/08/2007 13:32, Raymond O'Donnell wrote:

> Was the previous installation of Postgres also 8.2? If not - if it was
> an earlier version - I'd put the old version back, point it at the data
> directory, then use pg_dump to export the data if you want to upgrade at
> that point.

I meant to add that you can get Win32 versions back as far as 8.0 on the
PostgreSQL home page (http://www.postgresql.org/) - top right of the
page - click on the "Binary" link beside the version number.

To check the version number of your data files, look in the PG_VERSION file.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: Finding my database

От
"Adrian Pitt"
Дата:
I have put v8.0 back on as you suggested, but so far it has made no
difference. I am still unable to get the service restarted.  When installing
I changed the install to drive D, and also changed the data reference to the
directory where I moved the data to. I unchecked the initialize database
cluster and it seemed to install fine and did not create the usual data
directory within the SQL folder.  But for some perplexing reason, even
though it all was working fine on drive C, I can't for the life of me work
out what has gone wrong.  I cannot export any data if it's not finding the
data.  And if I was able to export it then I wouldn't need to be going
through all the hassle I am.  Any further suggestions that I might be able
to try to get the SQL service running. What other possible reasons would
there be for it not seeing my database?

-----Original Message-----
From: Raymond O'Donnell [mailto:rod@iol.ie]
Sent: Friday, 17 August 2007 10:33 PM
To: apitt@tech2u.com.au
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Finding my database

On 17/08/2007 05:44, apitt@tech2u.com.au wrote:

> needed to move it to the D Drive.  After completely messing everything up,
I
> am now unable to get it working.  I have uninstalled everything and now
have
> v8.2 installed on the D drive, and I put the data directory back within
that

I know it's not a lot of help to you at this point, but the recommended
way to backup and restore a database is using pg_dump, and if you're
moving from one major version to another it's the only way.

Was the previous installation of Postgres also 8.2? If not - if it was
an earlier version - I'd put the old version back, point it at the data
directory, then use pg_dump to export the data if you want to upgrade at
that point.

Have a look at the following, and in particular the examples towards the
bottom:

   http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html


HTH,

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.12.0/957 - Release Date: 16/08/2007
1:46 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.12.0/959 - Release Date: 17/08/2007
5:43 PM



Re: Finding my database

От
Raymond O'Donnell
Дата:
On 18/08/2007 09:03, Adrian Pitt wrote:

> I have put v8.0 back on as you suggested, but so far it has made no
> difference. I am still unable to get the service restarted.  When installing
> I changed the install to drive D, and also changed the data reference to the
> directory where I moved the data to. I unchecked the initialize database
> cluster and it seemed to install fine and did not create the usual data
> directory within the SQL folder.  But for some perplexing reason, even
> though it all was working fine on drive C, I can't for the life of me work
> out what has gone wrong.  I cannot export any data if it's not finding the

What about permissions on the data directory? Apart from that, I'm
afraid I'm out of suggestions.

If you post the exact text of the error you're getting, maybe other more
knowledgeable people can help.

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------