Re: Re: postgres memory management - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: postgres memory management
Date
Msg-id 6566.980268471@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres memory management  (Alexander Jerusalem <ajeru@gmx.net>)
List pgsql-general
Alexander Jerusalem <ajeru@gmx.net> writes:
> you are right, I have the same problem on RedHat. After I inserted -e it
> works so far. But there's something else that seems strange to me I'm not
> quite sure if I'm reading this right since I understand only half of what
> happens in this script. After the comment that says "Don't do anything if
> process still running..." on line there is the following sequence of lines:

> ps hj$ipcs_pid >/dev/null 2>&1
> if [ $? -eq 0 ]; then
>          echo "skipped...."

> As I understand it the if statement tests the output of the previous ps
> statement. The strange thing is that the variable $ipcs_pid is never used
> anywhere before this line, so I think it's always null (or whatever this
> scripting language defaults to). There are three other variables ipcs_id,
> ipcs_cpid and ipcs_lpid but no ipcs_pid. If I'm right here, it seems that
> this script does effectively nothing in terms of shared memory.

I think you are right --- the Linux portion of this script is broken.
Aside from the bogus variable, the awk call at the top of the loop is
wrong (printf has three arguments and only two percents).  Given those
two typos, there are probably more.

Feel free to submit a patch to make it actually work ...

            regards, tom lane

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Looking for info on Solaris 7 (SPARC) specific considerations
Next
From: "Tim Barnard"
Date:
Subject: Re: Data entry screen building utilities