Re: postgresql commands(psql,createdb,dropdb) are not working from shell script

From: Ramesh Penuballi <ramesh(dot)252(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: postgresql commands(psql,createdb,dropdb) are not working from shell script
Date: 2020-01-17 13:22:56
Message-ID: CAGeQtUs6wUqwk_Kgg_toc7d5i9c=CaB51W+mvBA8AuyQO2S9hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks once again for sharing the info.
Let me check and get back to you.

Thanks and Regards
Ramesh Penuballi

On Fri, 17 Jan, 2020, 18:43 Ron, <ronljohnsonjr(at)gmail(dot)com> wrote:

> The Jenkins server needs to be able to find the Unix executables dropdb,
> createdb and psql.
>
> I don't know *anything* about Jenkins, or even whether or not Jenkins
> runs on the same box as Postgres, but there's *some* shell script
> *somewhere* that points $PATH to the proper Postgres binaries.
>
> On 1/17/20 6:56 AM, Ramesh Penuballi wrote:
>
> Dear Ron,
>
> Thanks for looking into this query.
>
> Could you please let me know how can I check the same.
>
> We are able take our production backup from the Jenkins server, and the
> issue is with our uat database server only.
>
> Could you please let me know how to check the path on Jenkins server as I
> am new to Jenkins.
>
> Thanks and Regards
> Ramesh Penuballi
>
> On Fri, 17 Jan, 2020, 17:53 Ron, <ronljohnsonjr(at)gmail(dot)com> wrote:
>
>> Does the Jenkins' $PATH variable have the Postgres binaries' location?
>>
>> On 1/17/20 2:47 AM, ramesh penumalli wrote:
>>
>> Dear Team,
>>
>> I am using postgresql 9.2.12 version and I am facing an issue while
>> running the executing the commands createdb,dropdb,psql commands in the
>> shell script which is running from Jenkins to restore prod data into stage
>> environment.
>>
>> Jenkins job is failing with the below output.I have verified the script
>> and the scrit is fine and it seems to be an issue with the configuration of
>> postgresql and not sure where to make the changes.
>>
>> line 48: dropdb: command not found
>>
>> line 50: createdb: command not found
>>
>> line 52: psql: command not found
>>
>> Kindly guide me to rectify the issue.
>>
>> Thanks and Regards,
>>
>> Ramesh
>>
>>
>> --
>> Angular momentum makes the world go 'round.
>>
>
> --
> Angular momentum makes the world go 'round.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Durgamahesh Manne 2020-01-17 13:25:57 Regarding automatic table partitioning without using trigger function in pgsql 12 is possible or not
Previous Message Ron 2020-01-17 13:13:02 Re: postgresql commands(psql,createdb,dropdb) are not working from shell script