Technical article 126557

I am getting an error running the PostgreSQL command psql as root on OpenServer 5.0.7

OpenServer 5.0.7

Written · Last revised

Problem

I am trying to run the command:

psql
and I am getting the error:
psql: server closed the connection unexpectedly
      This probably means the server terminated abnormally
      before or while processing the request.
or

psql : could not send startup packet : Broken Pipe.

Cause

The psql command is not designed to be run as root. The command can only be issued by a configured postgresql user.

Solution

Postgresql user accounts are not the same as regular Unix
accounts.  A Unix account must be added to PostgreSQL with
the
createuser
commands by an existing postgresql user with proper
authorization.  An initial privileged user is created when
"mkdev pgsql" is run.

If you have not already run "mkdev pgsql" then please run it to create the initial privilaged postgresql user.

If "mkdev pgsql" has already been run then please su to the privileged user you have created and the run the "psql" command.

From the Xinuos technical article database, record 126557. Reproduced with permission. The original is at www.sco.com/ta/126557, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.