Re: Getting postmaster: StreamConnection: accept: The connection

From: Kevin Brannen <kevinb(at)nurseamerica(dot)net>
To: Jeff Lu <jklcom(at)mindspring(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting postmaster: StreamConnection: accept: The connection
Date: 2002-07-16 17:29:25
Message-ID: 3D3457F5.7080701@nurseamerica.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Lu wrote:
> Hi,
>
> I'm trying to perform a pg_dump from within a C program and I'm getting
>
> postmaster: StreamConnection: accept: The connection was aborted
>
> I've tried two different ways:
>
> 1) system("./pg_dump --file=database.dat database");
>
> AND
>
> 2) system("./dbbackup.bat");
>
> Where dbbackup.bat consists of
>
> pg_dump --file=database.dat database
>
> Both ways have the same error.
>
> However, it works fine with run dbbackup.bat from a command line.
>
> Please help
>
> Thanks
>
> -Jeff
>

From what you're describing, it sounds like the classic "missing
environmental variables" problem. If it works on the command line but
not from within a program (or from cron), then you're just missing 1 or
more env-vars, maybe PGPASSWORD? You should be able to track it down
from there. :-)

HTH,
Kevin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Graulich 2002-07-16 17:43:43 size of function body
Previous Message Keith G. Murphy 2002-07-16 17:20:22 Re: PostgreSQL in mission-critical system