Обсуждение: pg_dumpall not working?

Поиск
Список
Период
Сортировка

pg_dumpall not working?

От
David Siebert
Дата:
Okay I have version 8.0.2 installed on CentOS 4.0 with all updates.
I SSH into the server and try and run pg_dump all and get a stream of
errors on the server screen but not on my ssh.
Any suggestions?

Re: pg_dumpall not working?

От
Richard Huxton
Дата:
David Siebert wrote:
> Okay I have version 8.0.2 installed on CentOS 4.0 with all updates.
> I SSH into the server and try and run pg_dump all and get a stream of
> errors on the server screen but not on my ssh.
> Any suggestions?

Um - post some of the errors?

There are some very clever people on these lists, but none of them
psychic afaik ;-)

--
   Richard Huxton
   Archonet Ltd

Re: pg_dumpall not working?

От
"Joshua D. Drake"
Дата:
>
> Um - post some of the errors?
>
> There are some very clever people on these lists, but none of them
> psychic afaik ;-)

Speak for yourself. I know you are wearing a blue shirt today! ;P)

Sincerely,

Joshua D. Drake


>


--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

Re: pg_dumpall not working?

От
David Siebert
Дата:
Richard Huxton wrote:
> David Siebert wrote:
>
>> Okay I have version 8.0.2 installed on CentOS 4.0 with all updates.
>> I SSH into the server and try and run pg_dump all and get a stream of
>> errors on the server screen but not on my ssh.
>> Any suggestions?
>
>
> Um - post some of the errors?
>
> There are some very clever people on these lists, but none of them
> psychic afaik ;-)
>

I would if I could. The errors where only showing on the server monitor
none where making it to the ssh client.
I discovered the problem was SELinux.

Re: pg_dumpall not working?

От
Tom Lane
Дата:
David Siebert <david@eclipsecat.com> writes:
> Okay I have version 8.0.2 installed on CentOS 4.0 with all updates.
> I SSH into the server and try and run pg_dump all and get a stream of
> errors on the server screen but not on my ssh.

What do you get from

ls -Z /usr/bin/pg_dumpall
ls -Z /usr/bin/pg_dump

?  On a reasonably up-to-date Fedora Core 3 system I get

-rwxr-xr-x  root     root     system_u:object_r:bin_t          /usr/bin/pg_dumpall
-rwxr-xr-x  root     root     system_u:object_r:bin_t          /usr/bin/psql

but it sounds a lot like you have something else, like postgresql_exec_t
(which is set up to forbid writes to /dev/tty, I believe).  If so, try
restorecon on these files to see if that fixes it.  If not, you have an
out-of-date SELinux policy RPM ... update that, or complain to CentOS
that they haven't borrowed Red Hat's latest version yet ;-)

            regards, tom lane

Re: pg_dumpall not working?

От
David Siebert
Дата:
Thanks for the help but it was an SELinux policy problem.
I turned it off for now. I just do not have the time to learn SELinux
right now and my server is located behind a fire wall, contains not
sensitive data, and is just a test box for now.

Tom Lane wrote:
> David Siebert <david@eclipsecat.com> writes:
>
>>Okay I have version 8.0.2 installed on CentOS 4.0 with all updates.
>>I SSH into the server and try and run pg_dump all and get a stream of
>>errors on the server screen but not on my ssh.
>
>
> What do you get from
>
> ls -Z /usr/bin/pg_dumpall
> ls -Z /usr/bin/pg_dump
>
> ?  On a reasonably up-to-date Fedora Core 3 system I get
>
> -rwxr-xr-x  root     root     system_u:object_r:bin_t          /usr/bin/pg_dumpall
> -rwxr-xr-x  root     root     system_u:object_r:bin_t          /usr/bin/psql
>
> but it sounds a lot like you have something else, like postgresql_exec_t
> (which is set up to forbid writes to /dev/tty, I believe).  If so, try
> restorecon on these files to see if that fixes it.  If not, you have an
> out-of-date SELinux policy RPM ... update that, or complain to CentOS
> that they haven't borrowed Red Hat's latest version yet ;-)
>
>             regards, tom lane
>
>