Thread: Restore

Restore

From
"Bob Pawley"
Date:
Hi
 
I am attempting to restore a database using -
 
psql PDW < PDW_June_10.sql
 
psql –U postgres PDW < PDW_June_10.sql
 
The response asks me for a password.
 
I use the same password with which I connect to the server but it is not accepted.
 
Without the –U postgres identifier it asks me for the password of my computer - which doesn’t exist.
 
How can I get around this??
 
Bob

Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 12:36:32 pm Bob Pawley wrote:
> Hi
>
> I am attempting to restore a database using -
>
> psql PDW < PDW_June_10.sql
>
> psql –U postgres PDW < PDW_June_10.sql

psql –U postgres -d PDW  -f PDW_June_10.sql

>
> The response asks me for a password.
>
> I use the same password with which I connect to the server but it is not
> accepted.
>
> Without the –U postgres identifier it asks me for the password of my
> computer - which doesn’t exist.

Without a specified -U it psql will use your system user name.
See here for all the gory details:
http://www.postgresql.org/docs/9.0/interactive/app-psql.html

>
> How can I get around this??
>
> Bob



--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
Thanks Adrian but

psql –U postgres -d PDW  -f PDW_June_10.sql

asks - "Password for user postgres:"

When I type the password the cursor doesn't respond and on enter I get
password failed.

Bob


-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 2:59 PM
To: pgsql-general@postgresql.org
Cc: Bob Pawley
Subject: Re: [GENERAL] Restore

On Friday 24 December 2010 12:36:32 pm Bob Pawley wrote:
> Hi
>
> I am attempting to restore a database using -
>
> psql PDW < PDW_June_10.sql
>
> psql –U postgres PDW < PDW_June_10.sql

psql –U postgres -d PDW  -f PDW_June_10.sql

>
> The response asks me for a password.
>
> I use the same password with which I connect to the server but it is not
> accepted.
>
> Without the –U postgres identifier it asks me for the password of my
> computer - which doesn’t exist.

Without a specified -U it psql will use your system user name.
See here for all the gory details:
http://www.postgresql.org/docs/9.0/interactive/app-psql.html

>
> How can I get around this??
>
> Bob



--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 3:28:38 pm Bob Pawley wrote:
> Thanks Adrian but
>
> psql –U postgres -d PDW  -f PDW_June_10.sql
>
> asks - "Password for user postgres:"
>
> When I type the password the cursor doesn't respond and on enter I get
> password failed.
>
> Bob
>

A little bit of testing on my part showed that your form of connecting should
work also i.e.psql –U postgres PDW < PDW_June_10.sql.
A couple of questions.
Can you connect to a database using psql and -U postgres?
Does the postgres user have a password?
If you can connect to a database with  psql what does \l show? What I am looking
for is whether PDW has its case preserved or not?


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
bricklen
Date:
On Fri, Dec 24, 2010 at 3:38 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
> On Friday 24 December 2010 3:28:38 pm Bob Pawley wrote:
>> Thanks Adrian but
>>
>> psql –U postgres -d PDW  -f PDW_June_10.sql
>>
>> asks - "Password for user postgres:"
>>
>> When I type the password the cursor doesn't respond and on enter I get
>> password failed.
>>
>> Bob
>>
>
> A little bit of testing on my part showed that your form of connecting should
> work also i.e.psql –U postgres PDW < PDW_June_10.sql.
> A couple of questions.
> Can you connect to a database using psql and -U postgres?
> Does the postgres user have a password?
> If you can connect to a database with  psql what does \l show? What I am looking
> for is whether PDW has its case preserved or not?

How about the pg_hba.conf setting? Is it set to something like md5?

Re: Restore

From
"Bob Pawley"
Date:
I have tried this a number of times -
psql –U postgres PDW < PDW_June_10.sql. (with and without spaces between U &
postgres and/or < and PDW_June)

Sometimes I am asked for a postgres password, once I was asked for the PDW
password (this makes sense and which I did enter).

When I entered the password it either said password failed or it simply went
back to the root command.

No database information was sent.

pg_hba.conf sets method as md5

I don't know what is meant by your reference to  \1.

Bob


-----Original Message-----
From: bricklen
Sent: Friday, December 24, 2010 3:47 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 3:38 PM, Adrian Klaver <adrian.klaver@gmail.com>
wrote:
> On Friday 24 December 2010 3:28:38 pm Bob Pawley wrote:
>> Thanks Adrian but
>>
>> psql –U postgres -d PDW  -f PDW_June_10.sql
>>
>> asks - "Password for user postgres:"
>>
>> When I type the password the cursor doesn't respond and on enter I get
>> password failed.
>>
>> Bob
>>
>
> A little bit of testing on my part showed that your form of connecting
> should
> work also i.e.psql –U postgres PDW < PDW_June_10.sql.
> A couple of questions.
> Can you connect to a database using psql and -U postgres?
> Does the postgres user have a password?
> If you can connect to a database with  psql what does \l show? What I am
> looking
> for is whether PDW has its case preserved or not?

How about the pg_hba.conf setting? Is it set to something like md5?

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 4:03:52 pm Bob Pawley wrote:
> I have tried this a number of times -
> psql –U postgres PDW < PDW_June_10.sql. (with and without spaces between U
> & postgres and/or < and PDW_June)
>
> Sometimes I am asked for a postgres password, once I was asked for the PDW
> password (this makes sense and which I did enter).
>
> When I entered the password it either said password failed or it simply
> went back to the root command.
>
> No database information was sent.
>
> pg_hba.conf sets method as md5
>
> I don't know what is meant by your reference to  \1.
>
> Bob
>

Lets go back to the beginning.
Basic info:
Pg version
OS
How do you normally connect to the database?
Have you set up passwords for Postgres users?
Remember Postgres users are not the same as system users. So when it asking for
a password it is for the Postgres users password not the system users password
of the same name.

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
Version 8.4.1
OS Win 7
I connect through PG Admin (plus an interface I use when the database is up
and running)
The password for this connection is the password I set up during the
installation. this is the same password I am using for the restore
connection.
I haven`t done anything for the postgres user other than what PG Admin uses.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 4:09 PM
To: pgsql-general@postgresql.org
Cc: Bob Pawley ; bricklen
Subject: Re: [GENERAL] Restore

On Friday 24 December 2010 4:03:52 pm Bob Pawley wrote:
> I have tried this a number of times -
> psql –U postgres PDW < PDW_June_10.sql. (with and without spaces between U
> & postgres and/or < and PDW_June)
>
> Sometimes I am asked for a postgres password, once I was asked for the PDW
> password (this makes sense and which I did enter).
>
> When I entered the password it either said password failed or it simply
> went back to the root command.
>
> No database information was sent.
>
> pg_hba.conf sets method as md5
>
> I don't know what is meant by your reference to  \1.
>
> Bob
>

Lets go back to the beginning.
Basic info:
Pg version
OS
How do you normally connect to the database?
Have you set up passwords for Postgres users?
Remember Postgres users are not the same as system users. So when it asking
for
a password it is for the Postgres users password not the system users
password
of the same name.

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 4:20:13 pm Bob Pawley wrote:
> Version 8.4.1
> OS Win 7
> I connect through PG Admin (plus an interface I use when the database is up
> and running)
> The password for this connection is the password I set up during the
> installation. this is the same password I am using for the restore
> connection.

The installation of what Postgres or PgAdmin?
I don't use PgAdmin so I going out on a limb here. Is there a way in PgAdmin to
look at users? If so it should show you whether the postgres user has a
password.

> I haven`t done anything for the postgres user other than what PG Admin
> uses.
>
> Bob


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 5:03 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I have tried this a number of times -
> psql –U postgres PDW < PDW_June_10.sql. (with and without spaces between U &
> postgres and/or < and PDW_June)
>
> Sometimes I am asked for a postgres password, once I was asked for the PDW
> password (this makes sense and which I did enter).
>
> When I entered the password it either said password failed or it simply went
> back to the root command.

Keep in mind, the password set for the unix account is NOT related to
the password set for a user in postgresql with alter user password =
'mypassword';.

If you are entering a unix password for a pg account that hasn't had
the pw set, then it's not going to work.  They're not related at all.

Re: Restore

From
"Bob Pawley"
Date:
In the windows install PG Admin comes packaged with PostgreSQL.

I`m a little confused. My PDW database has postgres as an owner.

You refer to postgres as a user.

My PG Admin shows postgres as a database along with PDW and
template_postgis.

The postgres database probably has a password.

Maybe I need to delete the postgres database.

Bob





-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 4:27 PM
To: Bob Pawley
Cc: pgsql-general@postgresql.org ; bricklen
Subject: Re: [GENERAL] Restore

On Friday 24 December 2010 4:20:13 pm Bob Pawley wrote:
> Version 8.4.1
> OS Win 7
> I connect through PG Admin (plus an interface I use when the database is
> up
> and running)
> The password for this connection is the password I set up during the
> installation. this is the same password I am using for the restore
> connection.

The installation of what Postgres or PgAdmin?
I don't use PgAdmin so I going out on a limb here. Is there a way in PgAdmin
to
look at users? If so it should show you whether the postgres user has a
password.

> I haven`t done anything for the postgres user other than what PG Admin
> uses.
>
> Bob


--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 6:00 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> In the windows install PG Admin comes packaged with PostgreSQL.
>
> I`m a little confused. My PDW database has postgres as an owner.
>
> You refer to postgres as a user.
>
> My PG Admin shows postgres as a database along with PDW and
> template_postgis.

And there's also a postgres user.  Change pg_hba.conf to use trust,
reload pgsql, log in, and issue a \du and you'll see all the users.

> The postgres database probably has a password.

databases do not have individual passwords.  Users do.

> Maybe I need to delete the postgres database.

No, that won't change this issue.

Whether or not a particular connection type needs a password or not is
determined by the pg_hba.conf file.  Change that to trust, ident (for
local connections) or md5 as you need.  First match is what you need.
I.e. if you have local unix socket and tcp connections set to trust,
then later entries won't really matter.  pg_hba.conf is pretty close
to self documenting really.

After setting it reload or restart pgsql and you can log in according
to the method you set in pg_hba.conf.

Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 5:00:19 pm Bob Pawley wrote:
> In the windows install PG Admin comes packaged with PostgreSQL.
>
> I`m a little confused. My PDW database has postgres as an owner.
>
> You refer to postgres as a user.

The default superuser for Postgres is the user postgres. An owner needs to be a
user(role actually) so the user that owns PDW is postgres. To make things a
little more complicated the system user that Postgres is run as is also usually
called postgres. This is why I am trying to figure out which password you are
using. In order for it to work to connect to Postgres it needs to be the
password associated with the database user postgres not the system user
postgres. If you are using the password that the Postgres installer used to set
up the system postgres user that is the wrong one. The one you want is the one
you used when you set up the Server properties in PgAdmin.

>
> My PG Admin shows postgres as a database along with PDW and
> template_postgis.

The postgres database is a system db set up along with template0 and template1
when a Postgres database cluster is first created.

>
> The postgres database probably has a password.



>
> Maybe I need to delete the postgres database.

No don't do that. It is basically empty and can be recreated if needed but there
is no need to delete it.

> Bob
>
>


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
I just stopped the server after changing config to trust and I got the
message `System error 5 has occurred. Access is denied`

Perhaps this is a clue.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 5:15 PM
To: Bob Pawley
Cc: pgsql-general@postgresql.org ; bricklen
Subject: Re: [GENERAL] Restore

On Friday 24 December 2010 5:00:19 pm Bob Pawley wrote:
> In the windows install PG Admin comes packaged with PostgreSQL.
>
> I`m a little confused. My PDW database has postgres as an owner.
>
> You refer to postgres as a user.

The default superuser for Postgres is the user postgres. An owner needs to
be a
user(role actually) so the user that owns PDW is postgres. To make things a
little more complicated the system user that Postgres is run as is also
usually
called postgres. This is why I am trying to figure out which password you
are
using. In order for it to work to connect to Postgres it needs to be the
password associated with the database user postgres not the system user
postgres. If you are using the password that the Postgres installer used to
set
up the system postgres user that is the wrong one. The one you want is the
one
you used when you set up the Server properties in PgAdmin.

>
> My PG Admin shows postgres as a database along with PDW and
> template_postgis.

The postgres database is a system db set up along with template0 and
template1
when a Postgres database cluster is first created.

>
> The postgres database probably has a password.



>
> Maybe I need to delete the postgres database.

No don't do that. It is basically empty and can be recreated if needed but
there
is no need to delete it.

> Bob
>
>


--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 6:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I just stopped the server after changing config to trust and I got the
> message `System error 5 has occurred. Access is denied`

What exactly did you type.  copy and paste, don't transcribe bits and pieces.

Re: Restore

From
Adrian Klaver
Date:
On Friday 24 December 2010 5:20:50 pm Bob Pawley wrote:
> I just stopped the server after changing config to trust and I got the
> message `System error 5 has occurred. Access is denied`
>
> Perhaps this is a clue.
>
> Bob
>

Does not meaning anything to me. Please lets not push more buttons:)


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
I didn't copy or paste anything. I just clicked Stop.

Bob

-----Original Message-----
From: Scott Marlowe
Sent: Friday, December 24, 2010 5:41 PM
To: Bob Pawley
Cc: adrian.klaver@gmail.com ; pgsql-general@postgresql.org ; bricklen
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 6:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I just stopped the server after changing config to trust and I got the
> message `System error 5 has occurred. Access is denied`

What exactly did you type.  copy and paste, don't transcribe bits and
pieces.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 7:02 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I didn't copy or paste anything. I just clicked Stop.

No, copy and paste WHAT YOU DID, from your screen into the email.  Like this:

smarlowe@breckenridge:~$ psql
psql (8.4.5)
Type "help" for help.

smarlowe=# create user joe;
CREATE ROLE
smarlowe=# alter user joe with password='xyz';
ERROR:  syntax error at or near "="
LINE 1: alter user joe with password='xyz';
                                    ^
smarlowe=# alter user joe with password 'xyz';
ALTER ROLE
smarlowe=# \q
smarlowe@breckenridge:~$ psql -U jpe
psql: FATAL:  Ident authentication failed for user "jpe"
smarlowe@breckenridge:~$ psql -U joe
psql: FATAL:  Ident authentication failed for user "joe"
smarlowe@breckenridge:~$

So we're not guessing at what you're seeing.

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 5:03 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I don't know what is meant by your reference to  \1.

That's a \l the letter l, not a number.  It lists the databases in
your installation.  If you can get in by psql then \l should work.

Re: Restore

From
John R Pierce
Date:
On 12/24/10 6:09 PM, Scott Marlowe wrote:
> On Fri, Dec 24, 2010 at 7:02 PM, Bob Pawley<rjpawley@shaw.ca>  wrote:
>> I didn't copy or paste anything. I just clicked Stop.
> No, copy and paste WHAT YOU DID, from your screen into the email.  Like this:

he's on MS Windows 7.  you want him to email screen shots?  please,
spare us.



Re: Restore

From
Scott Marlowe
Date:
In a technical discussion, please don't top post.  It destroys
formatting of previous comments and disrupts the flow.  People trying
to come in halfway down a conversation will be thrown for a loop and
find.  I would reformat your reply to be inline but this message isn't
about changing your config.  I'll just cut most of the previous and
put it at the bottom.

On Fri, Dec 24, 2010 at 6:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> -----Original Message----- From: Adrian Klaver
> On Friday 24 December 2010 5:00:19 pm Bob Pawley wrote:
>>
>>> The postgres database probably has a password.
>>> Maybe I need to delete the postgres database.
>
>> No don't do that. It is basically empty and can be recreated if needed but
>> there
>> is no need to delete it.

> I just stopped the server after changing config to trust and I got the
> message `System error 5 has occurred. Access is denied`

So I see you're running windows so I too am now out of my area of
expertise.  Can you show us the changes you made configuration wise?
They might provide a clue.

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 7:12 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 12/24/10 6:09 PM, Scott Marlowe wrote:
>>
>> On Fri, Dec 24, 2010 at 7:02 PM, Bob Pawley<rjpawley@shaw.ca>  wrote:
>>>
>>> I didn't copy or paste anything. I just clicked Stop.
>>
>> No, copy and paste WHAT YOU DID, from your screen into the email.  Like
>> this:
>
> he's on MS Windows 7.  you want him to email screen shots?  please, spare
> us.

Yeah I just noticed that.  Thanks for the professional and polite
reply.  I would like to see copy and pastes of relavent things, like
configuration cahnges.  Seems reasonable to ask for as much info as he
can throw at us to let us see what he sees and know what he did.
Right now we're like a group of blind men inspecting an elephant from
different angles.

Re: Restore

From
"Bob Pawley"
Date:
When I type psql I am asked for a password. When I attempt to enter a
password the cursor doesn't move.
When I click enter I get failed password for - my computer name.

When I type psql \I -  I get the same as above.

Bob


-----Original Message-----
From: Scott Marlowe
Sent: Friday, December 24, 2010 6:12 PM
To: Bob Pawley
Cc: bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 5:03 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I don't know what is meant by your reference to  \1.

That's a \l the letter l, not a number.  It lists the databases in
your installation.  If you can get in by psql then \l should work.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> When I type psql I am asked for a password. When I attempt to enter a
> password the cursor doesn't move.

It's not supposed to, so don't worry about that.
How exactly are you running psql? Can you show us what you typed in?

> When I click enter I get failed password for - my computer name.

Hmmm.  Again, please copy and paste exactly what it says.

> When I type psql \I -  I get the same as above.

Yeah, until you can log in psql \l isn't going to work.  Once you can
log in it should work.

So, yeah.  cut and paste your psql session first, k?

Re: Restore

From
"Bob Pawley"
Date:

-----Original Message-----
From: Scott Marlowe
Sent: Friday, December 24, 2010 6:23 PM
To: Bob Pawley
Cc: bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> When I type psql I am asked for a password. When I attempt to enter a
> password the cursor doesn't move.

It's not supposed to, so don't worry about that.
How exactly are you running psql? Can you show us what you typed in?

> When I click enter I get failed password for - my computer name.

Hmmm.  Again, please copy and paste exactly what it says.

> When I type psql \I -  I get the same as above.

Yeah, until you can log in psql \l isn't going to work.  Once you can
log in it should work.

So, yeah.  cut and paste your psql session first, k?

Is this what you meant by psql session??

2010-12-24 11:08:46 PSTLOG:  database system was shut down at 2010-12-24
11:07:13 PST
2010-12-24 11:08:46 PSTFATAL:  the database system is starting up
2010-12-24 11:08:47 PSTFATAL:  the database system is starting up
2010-12-24 11:08:48 PSTFATAL:  the database system is starting up
2010-12-24 11:08:49 PSTLOG:  database system is ready to accept connections
2010-12-24 11:08:49 PSTLOG:  autovacuum launcher started
2010-12-24 11:21:25 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:35 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:39 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:50 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:54 PSTWARNING:  pgstat wait timeout
2010-12-24 11:22:05 PSTWARNING:  pgstat wait timeout
2010-12-24 11:32:38 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 12:11:09 PSTFATAL:  password authentication failed for user "-U"
2010-12-24 12:18:50 PSTFATAL:  password authentication failed for user
"psql"
2010-12-24 15:27:40 PSTFATAL:  password authentication failed for user
"postgres"
2010-12-24 15:41:10 PSTFATAL:  password authentication failed for user
"postgresql"
2010-12-24 15:44:15 PSTFATAL:  password authentication failed for user "PDW"
2010-12-24 15:50:13 PSTFATAL:  password authentication failed for user
"postgresql"
2010-12-24 16:08:49 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:13:34 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:17:25 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:19:05 PSTFATAL:  password authentication failed for user "Bob"


Bob

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:23 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>> When I type psql I am asked for a password. When I attempt to enter a
>> password the cursor doesn't move.
>
> It's not supposed to, so don't worry about that.
> How exactly are you running psql? Can you show us what you typed in?
>
>> When I click enter I get failed password for - my computer name.
>
> Hmmm.  Again, please copy and paste exactly what it says.
>
>> When I type psql \I -  I get the same as above.
>
> Yeah, until you can log in psql \l isn't going to work.  Once you can
> log in it should work.
>
> So, yeah.  cut and paste your psql session first, k?
>
> Is this what you meant by psql session??

No, that's the pgsql log, which is also quite useful.  So, when you
bring up a command prompt and type in psql -U bob wwwdb or something
like that and it says something about a password failure, that's the
stuff I'd like you to cut and paste.  The accompanying postgresql like
this one here would be useful too.

>
> 2010-12-24 11:08:46 PSTLOG:  database system was shut down at 2010-12-24
> 11:07:13 PST
> 2010-12-24 11:08:46 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:47 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:48 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:49 PSTLOG:  database system is ready to accept connections
> 2010-12-24 11:08:49 PSTLOG:  autovacuum launcher started
> 2010-12-24 11:21:25 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:35 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:39 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:50 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:54 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:22:05 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:32:38 PSTFATAL:  password authentication failed for user "Bob"
> 2010-12-24 12:11:09 PSTFATAL:  password authentication failed for user "-U"
> 2010-12-24 12:18:50 PSTFATAL:  password authentication failed for user
> "psql"
> 2010-12-24 15:27:40 PSTFATAL:  password authentication failed for user
> "postgres"
> 2010-12-24 15:41:10 PSTFATAL:  password authentication failed for user
> "postgresql"
> 2010-12-24 15:44:15 PSTFATAL:  password authentication failed for user "PDW"
> 2010-12-24 15:50:13 PSTFATAL:  password authentication failed for user
> "postgresql"
> 2010-12-24 16:08:49 PSTFATAL:  password authentication failed for user "Bob"
> 2010-12-24 18:13:34 PSTFATAL:  password authentication failed for user "Bob"
> 2010-12-24 18:17:25 PSTFATAL:  password authentication failed for user "Bob"
> 2010-12-24 18:19:05 PSTFATAL:  password authentication failed for user "Bob"

Re: Restore

From
"Bob Pawley"
Date:

-----Original Message-----
From: Scott Marlowe
Sent: Friday, December 24, 2010 6:49 PM
To: Bob Pawley
Cc: bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:23 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>> When I type psql I am asked for a password. When I attempt to enter a
>> password the cursor doesn't move.
>
> It's not supposed to, so don't worry about that.
> How exactly are you running psql? Can you show us what you typed in?
>
>> When I click enter I get failed password for - my computer name.
>
> Hmmm.  Again, please copy and paste exactly what it says.
>
>> When I type psql \I -  I get the same as above.
>
> Yeah, until you can log in psql \l isn't going to work.  Once you can
> log in it should work.
>
> So, yeah.  cut and paste your psql session first, k?
>
> Is this what you meant by psql session??

No, that's the pgsql log, which is also quite useful.  So, when you
bring up a command prompt and type in psql -U bob wwwdb or something
like that and it says something about a password failure, that's the
stuff I'd like you to cut and paste.  The accompanying postgresql like
this one here would be useful too.

>
> 2010-12-24 11:08:46 PSTLOG:  database system was shut down at 2010-12-24
> 11:07:13 PST
> 2010-12-24 11:08:46 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:47 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:48 PSTFATAL:  the database system is starting up
> 2010-12-24 11:08:49 PSTLOG:  database system is ready to accept
> connections
> 2010-12-24 11:08:49 PSTLOG:  autovacuum launcher started
> 2010-12-24 11:21:25 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:35 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:39 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:50 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:21:54 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:22:05 PSTWARNING:  pgstat wait timeout
> 2010-12-24 11:32:38 PSTFATAL:  password authentication failed for user
> "Bob"
> 2010-12-24 12:11:09 PSTFATAL:  password authentication failed for user
> "-U"
> 2010-12-24 12:18:50 PSTFATAL:  password authentication failed for user
> "psql"
> 2010-12-24 15:27:40 PSTFATAL:  password authentication failed for user
> "postgres"
> 2010-12-24 15:41:10 PSTFATAL:  password authentication failed for user
> "postgresql"
> 2010-12-24 15:44:15 PSTFATAL:  password authentication failed for user
> "PDW"
> 2010-12-24 15:50:13 PSTFATAL:  password authentication failed for user
> "postgresql"
> 2010-12-24 16:08:49 PSTFATAL:  password authentication failed for user
> "Bob"
> 2010-12-24 18:13:34 PSTFATAL:  password authentication failed for user
> "Bob"
> 2010-12-24 18:17:25 PSTFATAL:  password authentication failed for user
> "Bob"
> 2010-12-24 18:19:05 PSTFATAL:  password authentication failed for user
> "Bob"


Following is the copy of the command prompt

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Bob>cd c:\program files (x86)\postgresplus\8.4ss\bin

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql PDW < PDW_June_2_2010.sql
Password: calgary0623

psql: FATAL:  password authentication failed for user "Bob"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql PDW < PDW_June_2_2010.sql
Password:

psql: fe_sendauth: no password supplied

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql PDW -U postgres <
PDW_June_2_
2010.sql
psql: warning: extra command-line argument "postgres" ignored
Password for user -U: calgary0623

psql: FATAL:  password authentication failed for user "-U"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -h localhost -U psql -d
PDW <
PDW_June_2_2010.backup
Password for user psql: calgary0623

psql: FATAL:  password authentication failed for user "psql"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -u postgres PDW <
PDW_June_2_
2010.sql
psql: illegal option -- u
Try "psql --help" for more information.

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW <
PDW_June_2_
2010.sql
Password for user postgres: calgary0623


c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql PDW < PDW_June_2_2010.sql
Password:

psql: fe_sendauth: no password supplied

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres -d PDW -f
PDW_Jun
e_2_2010.sql
Password for user postgres:

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U
postgres -fPDW_June_2_2010
.sql
Password for user postgres:
psql: FATAL:  password authentication failed for user "postgres"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgresql
Password for user postgresql:
psql: FATAL:  password authentication failed for user "postgresql"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>
c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW
<PDW)June_2_2
010.sql
The system cannot find the file specified.

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW
<PDW_June_2_2
010
The system cannot find the file specified.

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U PDW
<PDW_June_2_2010.sql
Password for user PDW: calgary0823

psql: FATAL:  password authentication failed for user "PDW"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW
<PDW_June_2_2
010.sql
Password for user postgres: calgary0623


c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -Upostgres PDW <
PDW_June_2_2
010.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW <
PDW_June_2_
2010.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -Upostgresql PDW
<PDW_June_2_
2010.sql
Password for user postgresql: calgary0623

psql: FATAL:  password authentication failed for user "postgresql"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -Upostgres PDW
<PDW_June_2_20
10.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres PDW <
PDW_June_2_
2010.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql PDW < PDW_June_2_2010.sql
Password: calgary0623

psql: FATAL:  password authentication failed for user "Bob"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres -d PDW -U
postgre
s -f PDW_June_2_2010.sql

c:\Program Files
(x86)\PostgresPlus\8.4SS\bin>psql -Upostgres -dPDW -fPDW_June_2
_2010.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -U postgres -d PDW -f
PDW_Jun
e_2_2010.sql

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql \I
Password:
psql: FATAL:  password authentication failed for user "Bob"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql \I
Password:
psql: fe_sendauth: no password supplied

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql
Password:
psql: fe_sendauth: no password supplied

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql
Password:
psql: FATAL:  password authentication failed for user "Bob"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql \I
Password:
psql: FATAL:  password authentication failed for user "Bob"

c:\Program Files (x86)\PostgresPlus\8.4SS\bin>
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 07:09 PM, Bob Pawley wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:49 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>>
>> -----Original Message----- From: Scott Marlowe
>> Sent: Friday, December 24, 2010 6:23 PM
>> To: Bob Pawley
>> Cc: bricklen ; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Restore
>>
>> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>>
>>> When I type psql I am asked for a password. When I attempt to enter a
>>> password the cursor doesn't move.
>>
>> It's not supposed to, so don't worry about that.
>> How exactly are you running psql? Can you show us what you typed in?
>>
>>> When I click enter I get failed password for - my computer name.
>>
>> Hmmm. Again, please copy and paste exactly what it says.
>>
>>> When I type psql \I - I get the same as above.
>>
>> Yeah, until you can log in psql \l isn't going to work. Once you can
>> log in it should work.
>>
>> So, yeah. cut and paste your psql session first, k?
>>
>> Is this what you meant by psql session??
>
> No, that's the pgsql log, which is also quite useful. So, when you
> bring up a command prompt and type in psql -U bob wwwdb or something
> like that and it says something about a password failure, that's the
> stuff I'd like you to cut and paste. The accompanying postgresql like
> this one here would be useful too.
>
>>

Lets stick with on thing. For now use the following:

psql -d PDW -U postgres -h localhost

At this point it is important to be clear on what password you are using
for the postgres user. As I posted before it should be the one you used
when filling out the Server properties in PgAdmin. Is that the case?
We will worry about loading the file once we have figured out what it
takes to connect.


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 8:09 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:49 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>>
>> -----Original Message----- From: Scott Marlowe
>> Sent: Friday, December 24, 2010 6:23 PM
>> To: Bob Pawley
>> Cc: bricklen ; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Restore
>>
>> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>>
>>> When I type psql I am asked for a password. When I attempt to enter a
>>> password the cursor doesn't move.
>>
>> It's not supposed to, so don't worry about that.
>> How exactly are you running psql? Can you show us what you typed in?
>>
>>> When I click enter I get failed password for - my computer name.
>>
>> Hmmm.  Again, please copy and paste exactly what it says.
>>
>>> When I type psql \I -  I get the same as above.
>>
>> Yeah, until you can log in psql \l isn't going to work.  Once you can
>> log in it should work.
>>
>> So, yeah.  cut and paste your psql session first, k?
>>
>> Is this what you meant by psql session??
>
> No, that's the pgsql log, which is also quite useful.  So, when you
> bring up a command prompt and type in psql -U bob wwwdb or something
> like that and it says something about a password failure, that's the
> stuff I'd like you to cut and paste.  The accompanying postgresql like
> this one here would be useful too.
>
>>
>> 2010-12-24 11:08:46 PSTLOG:  database system was shut down at 2010-12-24
>> 11:07:13 PST
>> 2010-12-24 11:08:46 PSTFATAL:  the database system is starting up
>> 2010-12-24 11:08:47 PSTFATAL:  the database system is starting up
>> 2010-12-24 11:08:48 PSTFATAL:  the database system is starting up

SNIP

>> 2010-12-24 18:17:25 PSTFATAL:  password authentication failed for user
>> "Bob"
>> 2010-12-24 18:19:05 PSTFATAL:  password authentication failed for user
>> "Bob"
>
>
> Following is the copy of the command prompt
>
> Microsoft Windows [Version 6.1.7600]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

SNIP

> c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql
> Password:
> psql: FATAL:  password authentication failed for user "Bob"

So have you at any time before this set a password for any user within
postgres (remember, a postgres account and password are not the same
as an OS user and password.  Have you issued a command that went
through in pgadmin or psql that changed / set a password for any
account?

Do this if you can:

Change pg_hba.conf to change all methods from md5 or ident to trust.
Save the original file.  restart pgsql.  If it won't restart, then
show us the changes from the file before and after you edited it.  If
it does work, then try to log in as postgres:

psql -U postgres postgres

First arg is db, second is user.

See if that works.  If it doesn't, copy and paste that psql terminal
session for us to look at.

Re: Restore

From
"Bob Pawley"
Date:

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:17 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:09 PM, Bob Pawley wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:49 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>>
>> -----Original Message----- From: Scott Marlowe
>> Sent: Friday, December 24, 2010 6:23 PM
>> To: Bob Pawley
>> Cc: bricklen ; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Restore
>>
>> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>>
>>> When I type psql I am asked for a password. When I attempt to enter a
>>> password the cursor doesn't move.
>>
>> It's not supposed to, so don't worry about that.
>> How exactly are you running psql? Can you show us what you typed in?
>>
>>> When I click enter I get failed password for - my computer name.
>>
>> Hmmm. Again, please copy and paste exactly what it says.
>>
>>> When I type psql \I - I get the same as above.
>>
>> Yeah, until you can log in psql \l isn't going to work. Once you can
>> log in it should work.
>>
>> So, yeah. cut and paste your psql session first, k?
>>
>> Is this what you meant by psql session??
>
> No, that's the pgsql log, which is also quite useful. So, when you
> bring up a command prompt and type in psql -U bob wwwdb or something
> like that and it says something about a password failure, that's the
> stuff I'd like you to cut and paste. The accompanying postgresql like
> this one here would be useful too.
>
>>

Lets stick with on thing. For now use the following:

psql -d PDW -U postgres -h localhost

At this point it is important to be clear on what password you are using
for the postgres user. As I posted before it should be the one you used
when filling out the Server properties in PgAdmin. Is that the case?
We will worry about loading the file once we have figured out what it
takes to connect.


Here is the result -
c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -d PDW -U postgres -h
localho
st
psql (8.4.5)
WARNING: Console code page (850) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

PDW=#

--
Adrian Klaver
adrian.klaver@gmail.com


Re: Restore

From
"Bob Pawley"
Date:

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:17 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:09 PM, Bob Pawley wrote:
>
>
> -----Original Message----- From: Scott Marlowe
> Sent: Friday, December 24, 2010 6:49 PM
> To: Bob Pawley
> Cc: bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On Fri, Dec 24, 2010 at 7:36 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>
>>
>> -----Original Message----- From: Scott Marlowe
>> Sent: Friday, December 24, 2010 6:23 PM
>> To: Bob Pawley
>> Cc: bricklen ; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Restore
>>
>> On Fri, Dec 24, 2010 at 7:20 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
>>>
>>> When I type psql I am asked for a password. When I attempt to enter a
>>> password the cursor doesn't move.
>>
>> It's not supposed to, so don't worry about that.
>> How exactly are you running psql? Can you show us what you typed in?
>>
>>> When I click enter I get failed password for - my computer name.
>>
>> Hmmm. Again, please copy and paste exactly what it says.
>>
>>> When I type psql \I - I get the same as above.
>>
>> Yeah, until you can log in psql \l isn't going to work. Once you can
>> log in it should work.
>>
>> So, yeah. cut and paste your psql session first, k?
>>
>> Is this what you meant by psql session??
>
> No, that's the pgsql log, which is also quite useful. So, when you
> bring up a command prompt and type in psql -U bob wwwdb or something
> like that and it says something about a password failure, that's the
> stuff I'd like you to cut and paste. The accompanying postgresql like
> this one here would be useful too.
>
>>

Lets stick with on thing. For now use the following:

psql -d PDW -U postgres -h localhost

At this point it is important to be clear on what password you are using
for the postgres user. As I posted before it should be the one you used
when filling out the Server properties in PgAdmin. Is that the case?
We will worry about loading the file once we have figured out what it
takes to connect.

There is only one password that I entered during the installation and I used
the same password to connect PG Admin.

Bob
--
Adrian Klaver
adrian.klaver@gmail.com


Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 8:29 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> Here is the result -
> c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -d PDW -U postgres -h
> localho
> st
> psql (8.4.5)
> WARNING: Console code page (850) differs from Windows code page (1252)
>        8-bit characters might not work correctly. See psql reference
>        page "Notes for Windows users" for details.
> Type "help" for help.
>
> PDW=#

Cool, so you're in.  now you can use \u to see what your usernames
are.  you can use alter user to change / set the password for postgres
and the other users as well now.

Then you can change pg_hba.conf back to md5 and when it asks for a
password try the one you just set.

Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 07:29 PM, Bob Pawley wrote:
>
> Here is the result -
> c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -d PDW -U postgres -h
> localho
> st
> psql (8.4.5)
> WARNING: Console code page (850) differs from Windows code page (1252)
> 8-bit characters might not work correctly. See psql reference
> page "Notes for Windows users" for details.
> Type "help" for help.
>
> PDW=#
>

You are connected. PDW=# is the psql propmpt

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
I tried PDW# \i PDW_June_2_2010.sql  (\i FILE as per help)

My guess didn't work.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:33 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:29 PM, Bob Pawley wrote:
>
> Here is the result -
> c:\Program Files (x86)\PostgresPlus\8.4SS\bin>psql -d PDW -U postgres -h
> localho
> st
> psql (8.4.5)
> WARNING: Console code page (850) differs from Windows code page (1252)
> 8-bit characters might not work correctly. See psql reference
> page "Notes for Windows users" for details.
> Type "help" for help.
>
> PDW=#
>

You are connected. PDW=# is the psql propmpt

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 07:46 PM, Bob Pawley wrote:
> I tried PDW# \i PDW_June_2_2010.sql (\i FILE as per help)
>
> My guess didn't work.
>
> Bob

Is the file in the same directory as where you started psql? If not you
will need to provide the full path to the file. If it is then the error
messages would be nice.


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 8:46 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I tried PDW# \i PDW_June_2_2010.sql  (\i FILE as per help)
>
> My guess didn't work.

So what error did you get?

Re: Restore

From
"Bob Pawley"
Date:
No error it just went back to PDW#

Bob

-----Original Message-----
From: Scott Marlowe
Sent: Friday, December 24, 2010 7:51 PM
To: Bob Pawley
Cc: Adrian Klaver ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On Fri, Dec 24, 2010 at 8:46 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I tried PDW# \i PDW_June_2_2010.sql  (\i FILE as per help)
>
> My guess didn't work.

So what error did you get?

Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 07:51 PM, Scott Marlowe wrote:
> On Fri, Dec 24, 2010 at 8:46 PM, Bob Pawley<rjpawley@shaw.ca>  wrote:
>> I tried PDW# \i PDW_June_2_2010.sql  (\i FILE as per help)
>>
>> My guess didn't work.
>
> So what error did you get?

Also might be good time to ask what is in the file. You said you where
trying a restore. Is the file a complete plain text database dump?

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
Yes the file is in the postgresql bin and that is where I changed directory
to begin this saga.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:49 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:46 PM, Bob Pawley wrote:
> I tried PDW# \i PDW_June_2_2010.sql (\i FILE as per help)
>
> My guess didn't work.
>
> Bob

Is the file in the same directory as where you started psql? If not you
will need to provide the full path to the file. If it is then the error
messages would be nice.


--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
"Bob Pawley"
Date:
The file is an .sql file from a database dump - same procedure I have used a
number of times previous to this upgrade.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:53 PM
To: Scott Marlowe
Cc: Bob Pawley ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:51 PM, Scott Marlowe wrote:
> On Fri, Dec 24, 2010 at 8:46 PM, Bob Pawley<rjpawley@shaw.ca>  wrote:
>> I tried PDW# \i PDW_June_2_2010.sql  (\i FILE as per help)
>>
>> My guess didn't work.
>
> So what error did you get?

Also might be good time to ask what is in the file. You said you where
trying a restore. Is the file a complete plain text database dump?

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 07:57 PM, Bob Pawley wrote:
> The file is an .sql file from a database dump - same procedure I have
> used a number of times previous to this upgrade.
>
> Bob
>
>

What upgrade?

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
I am installing 8.4 as I had problems with 8.3.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 7:59 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 07:57 PM, Bob Pawley wrote:
> The file is an .sql file from a database dump - same procedure I have
> used a number of times previous to this upgrade.
>
> Bob
>
>

What upgrade?

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 08:03 PM, Bob Pawley wrote:
> I am installing 8.4 as I had problems with 8.3.
>
> Bob

Well that would have been nice to have known at the beginning of this.
At this point what versions do you have installed? As to errors have you
looked at the Postgres log?


--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 8:08 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 08:03 PM, Bob Pawley wrote:
> I am installing 8.4 as I had problems with 8.3.
>
> Bob

Well that would have been nice to have known at the beginning of this.
At this point what versions do you have installed? As to errors have you
looked at the Postgres log?


Version 8.4.1 is installed.

The same log as I sent before.

2010-12-24 11:08:46 PSTLOG:  database system was shut down at 2010-12-24
11:07:13 PST
2010-12-24 11:08:46 PSTFATAL:  the database system is starting up
2010-12-24 11:08:47 PSTFATAL:  the database system is starting up
2010-12-24 11:08:48 PSTFATAL:  the database system is starting up
2010-12-24 11:08:49 PSTLOG:  database system is ready to accept connections
2010-12-24 11:08:49 PSTLOG:  autovacuum launcher started
2010-12-24 11:21:25 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:35 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:39 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:50 PSTWARNING:  pgstat wait timeout
2010-12-24 11:21:54 PSTWARNING:  pgstat wait timeout
2010-12-24 11:22:05 PSTWARNING:  pgstat wait timeout
2010-12-24 11:32:38 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 12:11:09 PSTFATAL:  password authentication failed for user "-U"
2010-12-24 12:18:50 PSTFATAL:  password authentication failed for user
"psql"
2010-12-24 15:27:40 PSTFATAL:  password authentication failed for user
"postgres"
2010-12-24 15:41:10 PSTFATAL:  password authentication failed for user
"postgresql"
2010-12-24 15:44:15 PSTFATAL:  password authentication failed for user "PDW"
2010-12-24 15:50:13 PSTFATAL:  password authentication failed for user
"postgresql"
2010-12-24 16:08:49 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:13:34 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:17:25 PSTFATAL:  password authentication failed for user "Bob"
2010-12-24 18:19:05 PSTFATAL:  password authentication failed for user "Bob"

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Adrian Klaver
Date:
On 12/24/2010 08:15 PM, Bob Pawley wrote:
>
> -----Original Message----- From: Adrian Klaver
> Sent: Friday, December 24, 2010 8:08 PM
> To: Bob Pawley
> Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On 12/24/2010 08:03 PM, Bob Pawley wrote:
>> I am installing 8.4 as I had problems with 8.3.
>>
>> Bob
>
> Well that would have been nice to have known at the beginning of this.
> At this point what versions do you have installed? As to errors have you
> looked at the Postgres log?
>
>
> Version 8.4.1 is installed.
>
> The same log as I sent before.
>
> 2010-12-24 11:08:46 PSTLOG: database system was shut down at 2010-12-24
> 11:07:13 PST
> 2010-12-24 11:08:46 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:47 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:48 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:49 PSTLOG: database system is ready to accept connections
> 2010-12-24 11:08:49 PSTLOG: autovacuum launcher started
> 2010-12-24 11:21:25 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:35 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:39 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:50 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:54 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:22:05 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:32:38 PSTFATAL: password authentication failed for user "Bob"
> 2010-12-24 12:11:09 PSTFATAL: password authentication failed for user "-U"
> 2010-12-24 12:18:50 PSTFATAL: password authentication failed for user
> "psql"
> 2010-12-24 15:27:40 PSTFATAL: password authentication failed for user
> "postgres"
> 2010-12-24 15:41:10 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 15:44:15 PSTFATAL: password authentication failed for user "PDW"
> 2010-12-24 15:50:13 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 16:08:49 PSTFATAL: password authentication failed for user "Bob"
> 2010-12-24 18:13:34 PSTFATAL: password authentication failed for user "Bob"
> 2010-12-24 18:17:25 PSTFATAL: password authentication failed for user "Bob"
> 2010-12-24 18:19:05 PSTFATAL: password authentication failed for user "Bob"
>

Your computer clock is correct? The last entry is for 18:19:05 PST where
the time is currently Fri Dec 24 20:19:47 PST 2010. At any rate I am
going to have to bow for now, the elves are getting cranky:)

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Restore

From
"Bob Pawley"
Date:
Thanks for hanging in there.

Merry Christmas to all.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 8:21 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 08:15 PM, Bob Pawley wrote:
>
> -----Original Message----- From: Adrian Klaver
> Sent: Friday, December 24, 2010 8:08 PM
> To: Bob Pawley
> Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On 12/24/2010 08:03 PM, Bob Pawley wrote:
>> I am installing 8.4 as I had problems with 8.3.
>>
>> Bob
>
> Well that would have been nice to have known at the beginning of this.
> At this point what versions do you have installed? As to errors have you
> looked at the Postgres log?
>
>
> Version 8.4.1 is installed.
>
> The same log as I sent before.
>
> 2010-12-24 11:08:46 PSTLOG: database system was shut down at 2010-12-24
> 11:07:13 PST
> 2010-12-24 11:08:46 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:47 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:48 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:49 PSTLOG: database system is ready to accept connections
> 2010-12-24 11:08:49 PSTLOG: autovacuum launcher started
> 2010-12-24 11:21:25 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:35 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:39 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:50 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:54 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:22:05 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:32:38 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 12:11:09 PSTFATAL: password authentication failed for user "-U"
> 2010-12-24 12:18:50 PSTFATAL: password authentication failed for user
> "psql"
> 2010-12-24 15:27:40 PSTFATAL: password authentication failed for user
> "postgres"
> 2010-12-24 15:41:10 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 15:44:15 PSTFATAL: password authentication failed for user
> "PDW"
> 2010-12-24 15:50:13 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 16:08:49 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:13:34 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:17:25 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:19:05 PSTFATAL: password authentication failed for user
> "Bob"
>

Your computer clock is correct? The last entry is for 18:19:05 PST where
the time is currently Fri Dec 24 20:19:47 PST 2010. At any rate I am
going to have to bow for now, the elves are getting cranky:)

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
"Bob Pawley"
Date:
I attempted loading earlier version of my backup database, using PDW# \I
PDW_May_2010  and it worked.

Looks as tho the June version may have been corrupt.

Thanks again for all of the help.

Bob

-----Original Message-----
From: Adrian Klaver
Sent: Friday, December 24, 2010 8:21 PM
To: Bob Pawley
Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restore

On 12/24/2010 08:15 PM, Bob Pawley wrote:
>
> -----Original Message----- From: Adrian Klaver
> Sent: Friday, December 24, 2010 8:08 PM
> To: Bob Pawley
> Cc: Scott Marlowe ; bricklen ; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Restore
>
> On 12/24/2010 08:03 PM, Bob Pawley wrote:
>> I am installing 8.4 as I had problems with 8.3.
>>
>> Bob
>
> Well that would have been nice to have known at the beginning of this.
> At this point what versions do you have installed? As to errors have you
> looked at the Postgres log?
>
>
> Version 8.4.1 is installed.
>
> The same log as I sent before.
>
> 2010-12-24 11:08:46 PSTLOG: database system was shut down at 2010-12-24
> 11:07:13 PST
> 2010-12-24 11:08:46 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:47 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:48 PSTFATAL: the database system is starting up
> 2010-12-24 11:08:49 PSTLOG: database system is ready to accept connections
> 2010-12-24 11:08:49 PSTLOG: autovacuum launcher started
> 2010-12-24 11:21:25 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:35 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:39 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:50 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:21:54 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:22:05 PSTWARNING: pgstat wait timeout
> 2010-12-24 11:32:38 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 12:11:09 PSTFATAL: password authentication failed for user "-U"
> 2010-12-24 12:18:50 PSTFATAL: password authentication failed for user
> "psql"
> 2010-12-24 15:27:40 PSTFATAL: password authentication failed for user
> "postgres"
> 2010-12-24 15:41:10 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 15:44:15 PSTFATAL: password authentication failed for user
> "PDW"
> 2010-12-24 15:50:13 PSTFATAL: password authentication failed for user
> "postgresql"
> 2010-12-24 16:08:49 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:13:34 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:17:25 PSTFATAL: password authentication failed for user
> "Bob"
> 2010-12-24 18:19:05 PSTFATAL: password authentication failed for user
> "Bob"
>

Your computer clock is correct? The last entry is for 18:19:05 PST where
the time is currently Fri Dec 24 20:19:47 PST 2010. At any rate I am
going to have to bow for now, the elves are getting cranky:)

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: Restore

From
Alban Hertroys
Date:
On 25 Dec 2010, at 3:20, Bob Pawley wrote:

> When I type psql \I -  I get the same as above.


Not \I, that option doesn't exist. It's \l (lower-case el).
You can't use it like that on the prompt either, but you can use "psql -l" there. The backslash (\) commands are
availableonce you are in psql. 

What font are you using in your mail client? Arial I guess? Not the best of screen fonts...
It doesn't matter most of the time as our brains are capable of substituting the correct letter given sufficient
context,but in cases like these - where a character is on its own - it jumps out. 

I'm not on Windows, so recommending a better font is difficult, but I read Georgia and Verdana are good alternatives (I
oftenfind Verdana too wide though). 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4d15ddb9802655374330115!



Re: Restore

From
Raymond O'Donnell
Date:
On 25/12/2010 01:43, Adrian Klaver wrote:
> On Friday 24 December 2010 5:20:50 pm Bob Pawley wrote:
>> I just stopped the server after changing config to trust and I got the
>> message `System error 5 has occurred. Access is denied`
>>
>> Perhaps this is a clue.
>>
>> Bob
>>
>
> Does not meaning anything to me. Please lets not push more buttons:)

I think you get this when the system user under which you're logged in
(to the computer, not to Postgres) hasn't the necessary privileges to
start and stop services. PG runs as a service on Windows, and Windows 7
is much tighter about privileges than previous versions.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: Restore

From
Scott Marlowe
Date:
On Fri, Dec 24, 2010 at 9:38 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> I attempted loading earlier version of my backup database, using PDW# \I
> PDW_May_2010  and it worked.
>
> Looks as tho the June version may have been corrupt.

If it's a plain sql text file you can read it with a simple app like
the notepad or whatever editor comes with windows.  If it's not plain
sql, but was created with pg_dump with switches to make it a custom
compressed format then you'll need to use pg_restore to restore the
file.  I generally store plain text sql files as .sql and compressed
dumps as .dmp so I can tell them apart by their names.