| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11 Jan 2010 19:14:16
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
PostgreSQL 8.4 Standard Server
i can't get pgpass.conf to work on my WinXP SP2 laptop.
contents of pg_hba.conf
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
contents of pgpass.conf
localhost:5432:postgres:postgres 0stgres
location of pgpass.conf
C:\Documents and Settings\rathoa1\Application Data\postgresql AND
C:\Documents and Settings\postgres\Application Data\postgresql
is this a bug?
This message was edited 1 time. Last update was at 11 Jan 2010 19:14:56
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Jan 2010 08:20:31
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
It should work. Tested on Windows XP for PostgreSQL 8.4
Please try to connect through psql to verify.
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Jan 2010 12:16:06
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
i tried through the psql console and this is what i got.
i put it in the attachments
| Filename |
psql_warning_msg.doc |
Download
|
| Description |
|
| Filesize |
34 Kbytes
|
| Downloaded: |
281 time(s) |
This message was edited 1 time. Last update was at 12 Jan 2010 12:18:48
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Jan 2010 12:58:53
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
i think pgpass is working in the PSQL window but it does not seem to work in pgAdmin.
In pgAdmin, it seems to run forever as if the pgpass file does not exist.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Jan 2010 14:14:28
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
i think pgpass is working in the PSQL window but it does not seem to work in pgAdmin
Do you mean that for Connecting to Database through pgAdmin3, pgAdmin ask password every time? If this is a case you can save database password in pgAdmin by checking "store password" when, pgAdmin prompt for Password.
If you are talking about plugins tab option of "psql", then please go to "File" tab of pgAdmin and click on "open .pgpass" to check the entry for user.
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Jan 2010 18:34:48
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
Storing the password is a security risk because it is stored in clear text.
pgpass.conf has the correct values in it.
pgpass.conf is working with the psql console but not with the pgagent within the pgAdmin.
if i look at pg_dump and pg_dumpall in the task manager, they are running forever.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 14 Jan 2010 17:53:40
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Storing the password is a security risk because it is stored in clear text.
pgpass.conf file also stored password as normal text.
pgpass.conf is working with the psql console but not with the pgagent within the pgAdmin
Please check the eventlog, since psql is able to access the pgpass.conf file, then pgagent should also.
if i look at pg_dump and pg_dumpall in the task manager, they are running forever.
How have you scheduled the backups? Is it running as user, which has pgpass.conf file in its %APPDATA%\postgresql directory.
This message was edited 1 time. Last update was at 14 Jan 2010 17:54:11
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 14 Jan 2010 18:14:20
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
the pgpass.conf file is stored in the user's home directory and so is in a fairly secure location.
Besides, this is the way that the POSTGRESQL developers specify is the best practice. They do not recommend storing the password in the manner you described.
The eventlog does not have any entries for the event. i know this because i scheduled backups at 10, 11, 12, 13, 14, 15, 16, and 17 o clock.
pg_dump and pg_dumpall are running in the task manager but they are not doing anything.
if i specify the trust option in the pg_hba file, then there is no problem.
Can i ask you if it is working on your laptop? i understand that it 'should' work but it is not working as advertised on my laptop. furthermore, it seems that other users have had this problem in the past.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 14 Jan 2010 18:15:18
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
as for scheduling the backups, it is running under the local postgre account. if i use pg_hba and specify trust rather than md5, there is no problem.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 14 Jan 2010 19:55:56
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Besides, this is the way that the POSTGRESQL developers specify is the best practice.
True. Best Practice is keeping pgpass.
They do not recommend storing the password in the manner you described.
It's an option (not recommendation).
I thought laptop is personal and login-password is with the the person who is owner.
Can i ask you if it is working on your laptop?
It is working fine on my windows XP.
This message was edited 1 time. Last update was at 14 Jan 2010 20:01:44
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 15 Jan 2010 12:01:27
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
i don't know what to tell you except it is not working out of box and following instructions that they provide.
can i give you any other information?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 15 Jan 2010 13:38:50
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Summarizing the steps of pageant schedule:
1. Login to system as test_user (On your machine you can use your user):
Please create a pgpass.conf file in test_user %APPDATA%\postgresql directory:
entry for pgpass.conf should be as given below:
hostname:port:database:username:password
2. Connect to database as given below:
C:\”Program Files”\PostgresPlus\8.4\bin\psql.exe -U postgres
(Above command will also verify that pgpass.conf is used by the psql command or not)
3. After connecting to database, create plpgsql language as given below:
CREATE LANGUAGE plpgsql;
4. Now, run the pgagent.sql file.
5. Create pgAgent service, as given below:
pgagent.exe INSTALL pgAgent -u test_user -p test hostaddr=<host> dbname=<dbname> user=<username>
3. Start the created service using following command:
net start pgAgent
4. While Creating job, Please keep the output of following command in “Host Agent” field of “pgAgent Job” window:
select jagstation from pgagent.pga_jobagent;
Above steps are tested on My machine and working fine and I hope this would help.
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 20 Jan 2010 14:38:15
|
Aashish_Rathod
New member
Joined: 11 Jan 2010 19:09:48
Messages: 8
Offline
|
sorry, i can't get this to work. really disappointed as it makes me wonder what else does not work and as such can't recommend it to others.
i'll just switch the pg_hba file to trust mode.
|
|
|
 |
|
|