Thread: problem in restoring database when connected via named socket

problem in restoring database when connected via named socket

From
Giuseppe Sacco
Date:
Hi all,
I am connected to a local postgresql server via named pipe instead of
tcp/ip socket, i.e., I did not specify the hostname while creating the
connection.

No, when I try to restore a database, the command fail since the
"hostname" argument is missing. This is the error message I get:

/usr/bin/pg_restore -i -h  -p 5439 -U giuseppe -d proteus -v
"/home/giuseppe/Desktop/migrazione saronno/saronno-proteus.pgdump"
pg_restore: [archiviatore] could not open input file "5439": No such
file or directory

the problem being that pg_restore use "-p" as hostname since it is just
after "-h" option, then "4539" is used as file name since it is the
first non option argument.

Of course, I imported my dump using command line pg_restore. Using the
very same line, without "-h".

Is this a known problem of pgadmin? Should I file it somewhere?

Bye,
Giuseppe



Re: problem in restoring database when connected via named socket

From
Guillaume Lelarge
Date:
Hi Giuseppe,

Le 12/01/2010 10:34, Giuseppe Sacco a écrit :
> [...]
> I am connected to a local postgresql server via named pipe instead of
> tcp/ip socket, i.e., I did not specify the hostname while creating the
> connection.
> 
> No, when I try to restore a database, the command fail since the
> "hostname" argument is missing. This is the error message I get:
> 
> /usr/bin/pg_restore -i -h  -p 5439 -U giuseppe -d proteus -v
> "/home/giuseppe/Desktop/migrazione saronno/saronno-proteus.pgdump"
> pg_restore: [archiviatore] could not open input file "5439": No such
> file or directory
> 
> the problem being that pg_restore use "-p" as hostname since it is just
> after "-h" option, then "4539" is used as file name since it is the
> first non option argument.
> 
> Of course, I imported my dump using command line pg_restore. Using the
> very same line, without "-h".
> 
> Is this a known problem of pgadmin? Should I file it somewhere?
> 

You shouldn't have this issue because we check if the server name is
empty or not before adding the -h command line option. AFAICT, this is
fixed since "Wed Mar 19 11:28:37 2008". So I assume you have a rather
old release. Try on a current one (current being 1.10.1 right now).


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: problem in restoring database when connected via named socket

From
Giuseppe Sacco
Date:
Hi Guillaume,

Il giorno mar, 12/01/2010 alle 10.47 +0100, Guillaume Lelarge ha
scritto:
> Hi Giuseppe,
[...]
> You shouldn't have this issue because we check if the server name is
> empty or not before adding the -h command line option. AFAICT, this is
> fixed since "Wed Mar 19 11:28:37 2008". So I assume you have a rather
> old release. Try on a current one (current being 1.10.1 right now).

Right, I am using 1.9. Yesterday I tried to update source from
repository, but I did not manage to compile it because of a link error.
I'll try again later on.

Thanks,
Giuseppe




Re: problem in restoring database when connected via named socket

From
Guillaume Lelarge
Date:
Le 12/01/2010 11:08, Giuseppe Sacco a écrit :
> Hi Guillaume,
> 
> Il giorno mar, 12/01/2010 alle 10.47 +0100, Guillaume Lelarge ha
> scritto:
>> Hi Giuseppe,
> [...]
>> You shouldn't have this issue because we check if the server name is
>> empty or not before adding the -h command line option. AFAICT, this is
>> fixed since "Wed Mar 19 11:28:37 2008". So I assume you have a rather
>> old release. Try on a current one (current being 1.10.1 right now).
> 
> Right, I am using 1.9. Yesterday I tried to update source from
> repository, but I did not manage to compile it because of a link error.
> I'll try again later on.
> 

Did you re-run ./bootstrap? if not, try to do so.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: problem in restoring database when connected via named socket

From
Giuseppe Sacco
Date:
Il giorno mar, 12/01/2010 alle 11.21 +0100, Guillaume Lelarge ha
scritto:
> Did you re-run ./bootstrap? if not, try to do so.

I didn't. That fixed the problem.

Thanks again,
Giuseppe