Thread: pgadmin is changing pgpass.conf
Hi All, I have been having a few problems with my password file recently, causing my scheduled pg_dump to fail. The problem is that the pgpass.conf file keeps changing. Eventually I narrowed it down to using pgadmin. Every time I start pgadmin, it changes the contents of my pgpass file, even though I do not store my password in pgadmin. This only seems to have become a problem since installing 8.4 and associated version of pgadmin. Is this the desired behaviour or is it a bug? Howard Cole www.selestial.com
On 16/09/2009 10:55, Howard Cole wrote: > Hi All, > > I have been having a few problems with my password file recently, > causing my scheduled pg_dump to fail. The problem is that the > pgpass.conf file keeps changing. Eventually I narrowed it down to using > pgadmin. Every time I start pgadmin, it changes the contents of my > pgpass file, even though I do not store my password in pgadmin. > > This only seems to have become a problem since installing 8.4 and > associated version of pgadmin. > > Is this the desired behaviour or is it a bug? It's the desired behaviour, and is described in the pgAdmin docs. As I remember there was also a discussion (on the pgadmin-support list I think) when this feature was added, on the merits or otherwise of storing passwords in plain text on disk. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
Raymond O'Donnell wrote: > On 16/09/2009 10:55, Howard Cole wrote: > >> Hi All, >> >> I have been having a few problems with my password file recently, >> causing my scheduled pg_dump to fail. The problem is that the >> pgpass.conf file keeps changing. Eventually I narrowed it down to using >> pgadmin. Every time I start pgadmin, it changes the contents of my >> pgpass file, even though I do not store my password in pgadmin. >> >> This only seems to have become a problem since installing 8.4 and >> associated version of pgadmin. >> >> Is this the desired behaviour or is it a bug? >> > > It's the desired behaviour, and is described in the pgAdmin docs. As I > remember there was also a discussion (on the pgadmin-support list I > think) when this feature was added, on the merits or otherwise of > storing passwords in plain text on disk. > > Ray. > > ------------------------------------------------------------------ > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland > rod@iol.ie > Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals > ------------------------------------------------------------------ > > Hi Ray, Thanks for the update. Unfortunately this behaviour has the side effect of deleting passwords that I have set up in the file manually for other applications (namely the backup), which runs under the same user account. I guess I'll just have to come up with an alternative. Howard. www.selestial.com
On 18/09/2009 16:07, Howard Cole wrote: > Thanks for the update. Unfortunately this behaviour has the side effect > of deleting passwords that I have set up in the file manually for other > applications (namely the backup), which runs under the same user > account. I guess I'll just have to come up with an alternative. Hi Howard, I'm afraid that's about the size of it. It's probably a good idea to have a separate account for executing the backup in any case. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
Raymond O'Donnell wrote: > On 18/09/2009 16:07, Howard Cole wrote: > >> Thanks for the update. Unfortunately this behaviour has the side effect >> of deleting passwords that I have set up in the file manually for other >> applications (namely the backup), which runs under the same user >> account. I guess I'll just have to come up with an alternative. > > Hi Howard, > > I'm afraid that's about the size of it. It's probably a good idea to > have a separate account for executing the backup in any case. Surely pgadmin preserves any existing entries in pgpass.conf? -- Richard Huxton Archonet Ltd
Richard Huxton wrote: > Raymond O'Donnell wrote: > >> On 18/09/2009 16:07, Howard Cole wrote: >> >> >>> Thanks for the update. Unfortunately this behaviour has the side effect >>> of deleting passwords that I have set up in the file manually for other >>> applications (namely the backup), which runs under the same user >>> account. I guess I'll just have to come up with an alternative. >>> >> Hi Howard, >> >> I'm afraid that's about the size of it. It's probably a good idea to >> have a separate account for executing the backup in any case. >> > > Surely pgadmin preserves any existing entries in pgpass.conf? > > Not in this case. There are originally two entries in pgpass.conf - one for server localhost and one for server 127.0.0.1 - the reasoning behind this is that when the backup runs as a scheduled task it sometimes seems to prefer one format to the other. However, when I open PGAdmin, one of the entries disappears. Perhaps it resolves the address and thinks they are the same entries? Anyway, the problem was resolved in the script that executes pg_dump, forcing it to use localhost or 127.0.0.1 using the -h option. As long as the -h ties in with what pgadmin writes to pgpass, there are no authentication problems. Howard Cole www.selestial.com
Howard Cole wrote: > Not in this case. There are originally two entries in pgpass.conf - > one for server localhost and one for server 127.0.0.1 - the > reasoning behind this is that when the backup runs as a scheduled > task it sometimes seems to prefer one format to the other. However, > when I open PGAdmin, one of the entries disappears. Perhaps it > resolves the address and thinks they are the same entries? I think you should file this as a pgadmin bug -- see the pgadmin lists for that. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support