Re: Crash: backup / restore

Поиск
Список
Период
Сортировка
От Anssi Kääriäinen
Тема Re: Crash: backup / restore
Дата
Msg-id 4CBFFB84.9080209@thl.fi
обсуждение исходный текст
Ответ на Re: Crash: backup / restore  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: Crash: backup / restore  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgadmin-support
On 10/19/2010 09:14 PM, Guillaume Lelarge wrote:
>> Also, if I remove the host=localhost from pgadmin connection
>> configuration (leaving host blank), I can backup any DB without errors.
>>
>>      
>  From pgAdmin, I suppose?
>    
Yes, from the servers left click a server, pick properties, and remove 
all text from Host portion.
>    
>> I am using ubuntu 10.04, apt installed postgresql 8.4.5, apt installed
>> pgAdmin, version: 1.10.2 rev 8217.
>>
>>      
> pgAdmin cannot give the password to pg_dump without using the
> environment variable (PGPASSWORD)... but it means the password will
> appear in the ps output. That won't happen. The only workaround
> available is to use a .pgpass file. Which pgAdmin would have created if
> you allowed it to store the password.
>
>    
The point is there is no postgresql password for the user. A little more 
about why the problem happens:

Pgadmin allows me to connect without any password to server when I have 
host=localhost in server configuration. If I try to connect from command 
line with psql:
psql -h localhost -p 5432 -d xxx -U yyy
I get password prompt. If I do not specify -h and -p I will not get 
password prompt, and if I issue
psql -h 127.0.0.1 -p 5432 -d xxx -U yyy
I will not get password prompt. resolveip localhost gives me:
IP address of localhost is 127.0.0.1
IP address of localhost is 127.0.0.1
(yes, two lines)

So when connecting to localhost from pgadmin I do not need password. 
When pgadmin issues the dump command, it uses -h localhost -p 5432, and 
thus pg_dump requires a password. I can fix this with leaving the host 
blank in server configuration. If I have 127.0.0.1 as host, for some 
reason, pgadmin requires me to supply a password. This is opposite to 
what psql does.

Anyway, the bug is that I can connect without password when 
host=localhost, but pgadmin hangs when trying to backup, because 
"pg_dump -h localhost ..." requires a password.
 - Anssi


В списке pgadmin-support по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Another Crash
Следующее
От: Julius Tuskenis
Дата:
Сообщение: no mirrors were found