Thread

  1. A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Ryan Kirkpatrick <pgsql@rkirkpat.net> — 2001-01-30T04:52:39Z

    	Just a few random bits and pieces that might be useful to someone
    else. They are:
    
    	postgres-7-sparc.patch -> This is the same one I posted earlier to
    hackers and ports, forgot to post it to patches. This fixes the resultmap
    for sparc-linux so that all regression tests pass.
    
    	postgresql -> This is a Linux distribution independent (or so I
    hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    few in ./contrib/linux of the pgsql source tree, but they are RedHat
    specific. This one is simple and self contained. Might be worth adding to
    the other scripts. 
    
    	pg_ctl.patch -> Minor patch required by postgresql script above.
    It basically just allows you to specify the -o option (postmaster options)
    more than once and all of them will be concatenated together. Makes it
    easier to do '-o -F -o -i', then to try and shell escape quotes in a shell
    script. Should be harmless, and might be handy. 
    
    Anyway, just wanted to post them in case some one was interested in them.
    TTYL.
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
  2. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-30T17:39:32Z

    > 	Just a few random bits and pieces that might be useful to someone
    > else. They are:
    > 
    > 	postgres-7-sparc.patch -> This is the same one I posted earlier to
    > hackers and ports, forgot to post it to patches. This fixes the resultmap
    > for sparc-linux so that all regression tests pass.
    
    Already applied.
    
    > 
    > 	postgresql -> This is a Linux distribution independent (or so I
    > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > specific. This one is simple and self contained. Might be worth adding to
    > the other scripts. 
    
    Added to /contrib as init.d. 
    
    > 
    > 	pg_ctl.patch -> Minor patch required by postgresql script above.
    > It basically just allows you to specify the -o option (postmaster options)
    > more than once and all of them will be concatenated together. Makes it
    > easier to do '-o -F -o -i', then to try and shell escape quotes in a shell
    > script. Should be harmless, and might be handy. 
    
    This doesn't seem like a good idea.  It makes -o handling different for
    different utilities.
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  3. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Ryan Kirkpatrick <pgsql@rkirkpat.net> — 2001-01-31T03:01:02Z

    On Tue, 30 Jan 2001, Bruce Momjian wrote:
    
    > > 	postgres-7-sparc.patch -> This is the same one I posted earlier to
    > > hackers and ports, forgot to post it to patches. This fixes the resultmap
    > > for sparc-linux so that all regression tests pass.
    > 
    > Already applied.
    
    	Great! Just never saw a confirmation (may have missed it) of my
    first post. Also verified it is in beta4, and all regression
    tests now pass on Sparc/Linux. :)
    
    > > 	postgresql -> This is a Linux distribution independent (or so I
    > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > specific. This one is simple and self contained. Might be worth adding to
    > > the other scripts. 
    >
    > Added to /contrib as init.d. 
    
    	Please replace with the one attached to this email message. The
    previous version depended on the below patch, this one does not. It is
    also a bit cleaner and has a few more helpful comments. 
    
    > > 	pg_ctl.patch -> Minor patch required by postgresql script above.
    > > It basically just allows you to specify the -o option (postmaster options)
    > > more than once and all of them will be concatenated together. Makes it
    > > easier to do '-o -F -o -i', then to try and shell escape quotes in a shell
    > > script. Should be harmless, and might be handy. 
    > 
    > This doesn't seem like a good idea.  It makes -o handling different for
    > different utilities.
    
    	Hmm... Didn't know other utils used that option. Maybe use the
    '--' option for pg_ctl passing postmaster options, i.e. 'pg_ctl start --
    -F -i'. Of course that is a bit more major of a change to the code that I
    will leave as an exercise to others. With the revised version of the
    init.d script attached, the pg_ctl patch is immaterial.
    	Thanks and TTYL.
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
  4. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.dscript....

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2001-02-01T14:08:42Z

    >         Great! Just never saw a confirmation (may have missed it) of my
    > first post. Also verified it is in beta4, and all regression
    > tests now pass on Sparc/Linux. :)
    
    What version of Linux? I'm updating the ports listing...
    
                           - Thomas
    
    
  5. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-01T18:13:54Z

    Applied.
    
    > On Tue, 30 Jan 2001, Bruce Momjian wrote:
    > 
    > > > 	postgres-7-sparc.patch -> This is the same one I posted earlier to
    > > > hackers and ports, forgot to post it to patches. This fixes the resultmap
    > > > for sparc-linux so that all regression tests pass.
    > > 
    > > Already applied.
    > 
    > 	Great! Just never saw a confirmation (may have missed it) of my
    > first post. Also verified it is in beta4, and all regression
    > tests now pass on Sparc/Linux. :)
    > 
    > > > 	postgresql -> This is a Linux distribution independent (or so I
    > > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > > specific. This one is simple and self contained. Might be worth adding to
    > > > the other scripts. 
    > >
    > > Added to /contrib as init.d. 
    > 
    > 	Please replace with the one attached to this email message. The
    > previous version depended on the below patch, this one does not. It is
    > also a bit cleaner and has a few more helpful comments. 
    > 
    > > > 	pg_ctl.patch -> Minor patch required by postgresql script above.
    > > > It basically just allows you to specify the -o option (postmaster options)
    > > > more than once and all of them will be concatenated together. Makes it
    > > > easier to do '-o -F -o -i', then to try and shell escape quotes in a shell
    > > > script. Should be harmless, and might be handy. 
    > > 
    > > This doesn't seem like a good idea.  It makes -o handling different for
    > > different utilities.
    > 
    > 	Hmm... Didn't know other utils used that option. Maybe use the
    > '--' option for pg_ctl passing postmaster options, i.e. 'pg_ctl start --
    > -F -i'. Of course that is a bit more major of a change to the code that I
    > will leave as an exercise to others. With the revised version of the
    > init.d script attached, the pg_ctl patch is immaterial.
    > 	Thanks and TTYL.
    > 
    > ---------------------------------------------------------------------------
    > |   "For to me to live is Christ, and to die is gain."                    |
    > |                                            --- Philippians 1:21 (KJV)   |
    > ---------------------------------------------------------------------------
    > |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    > ---------------------------------------------------------------------------
    Content-Description: 
    
    [ Attachment, skipping... ]
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  6. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.dscript....

    Ryan Kirkpatrick <pgsql@rkirkpat.net> — 2001-02-02T03:29:18Z

    On Thu, 1 Feb 2001, Thomas Lockhart wrote:
    
    > >         Great! Just never saw a confirmation (may have missed it) of my
    > > first post. Also verified it is in beta4, and all regression
    > > tests now pass on Sparc/Linux. :)
    > 
    > What version of Linux? I'm updating the ports listing...
    
    	Debian GNU/Linux 2.2, with 2.2.15 (stock kernel for this
    distribution). For a bit more details, I tested it on a Sparc 20 w/64MB 
    of RAM, running the stock gcc 2.95.2 and glibc 2.1.3. 
    	Is that sufficient? :)
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
    
    
  7. julian day function

    doj@wwws2.redaex.de — 2001-02-02T13:09:54Z

    Hello Developers,
    
    I have written a function to calculate the julian day from any gregorian day.
    You can include this code in the contrib directory or whatever place seems
    applicable in future releases of posgresql.
    
    See the attachment for code and examples.
    
    -- 
    --
    ---> doj@redaex.de
    
  8. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.dscript....

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2001-02-02T14:00:33Z

    >         Is that sufficient? :)
    
    Yes ;)
    
                          - Thomas
    
    
  9. Re: julian day function

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2001-02-02T14:17:46Z

    > I have written a function to calculate the julian day from any gregorian day.
    > You can include this code in the contrib directory or whatever place seems
    > applicable in future releases of posgresql.
    
    Looks nice!
    
    There is already a j2date()/date2j() subroutine pair in the backend, to
    support all of the existing date/time arithmetic. Would you be willing
    to use calls to that? Then we wouldn't have two sets of code to maintain
    (not that JD calculations change very often ;)
    
    It would likely be helpful to have a, say, "julian" argument to
    date_part(), which I'd be happy to add in. There is already access to
    Julian date using the to_char(date,'J') function call, and you can get a
    numeric type return using
    
      cast(to_char(date,'J') as int)
    
                              - Thomas
    
    
  10. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Ryan Kirkpatrick <pgsql@rkirkpat.net> — 2001-02-03T01:58:51Z

    On Thu, 1 Feb 2001, Bruce Momjian wrote:
    
    > Applied.
    > 
    > > On Tue, 30 Jan 2001, Bruce Momjian wrote:
    >
    > > > > 	postgresql -> This is a Linux distribution independent (or so I
    > > > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > > > specific. This one is simple and self contained. Might be worth adding to
    > > > > the other scripts. 
    > > >
    > > > Added to /contrib as init.d. 
    > > 
    > > 	Please replace with the one attached to this email message. The
    > > previous version depended on the below patch, this one does not. It is
    > > also a bit cleaner and has a few more helpful comments. 
    
    	Thanks for the quick response. Just as nit-pick the
    ./contrib/README lists ./contirb/init.d as a starting/stopping script as
    for 'non-Linux' systems.... Uh... I meant it as non-distribution specific,
    but still probably linux specific. Though it is so general that any unix
    system that has bash (might even world under sh, never tested) that uses
    init.d style scripts should work. Maybe state it as a 'generic unix
    init.d script for starting/stopping pgsql....'? Thanks.
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
    
    
  11. Re: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-03T04:12:51Z

    New text:
    
            Init.d-style scripts for starting and stopping the PostgreSQL
            server by Ryan Kirkpatrick <pgsql@rkirkpat.net
    
    Thanks.
    
    
    > On Thu, 1 Feb 2001, Bruce Momjian wrote:
    > 
    > > Applied.
    > > 
    > > > On Tue, 30 Jan 2001, Bruce Momjian wrote:
    > >
    > > > > > 	postgresql -> This is a Linux distribution independent (or so I
    > > > > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > > > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > > > > specific. This one is simple and self contained. Might be worth adding to
    > > > > > the other scripts. 
    > > > >
    > > > > Added to /contrib as init.d. 
    > > > 
    > > > 	Please replace with the one attached to this email message. The
    > > > previous version depended on the below patch, this one does not. It is
    > > > also a bit cleaner and has a few more helpful comments. 
    > 
    > 	Thanks for the quick response. Just as nit-pick the
    > ./contrib/README lists ./contirb/init.d as a starting/stopping script as
    > for 'non-Linux' systems.... Uh... I meant it as non-distribution specific,
    > but still probably linux specific. Though it is so general that any unix
    > system that has bash (might even world under sh, never tested) that uses
    > init.d style scripts should work. Maybe state it as a 'generic unix
    > init.d script for starting/stopping pgsql....'? Thanks.
    > 
    > ---------------------------------------------------------------------------
    > |   "For to me to live is Christ, and to die is gain."                    |
    > |                                            --- Philippians 1:21 (KJV)   |
    > ---------------------------------------------------------------------------
    > |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    > ---------------------------------------------------------------------------
    > 
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  12. Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Peter Eisentraut <peter_e@gmx.net> — 2001-02-04T15:19:50Z

    Ryan Kirkpatrick writes:
    
    > 	postgresql -> This is a Linux distribution independent (or so I
    > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > specific. This one is simple and self contained. Might be worth adding to
    > the other scripts.
    
    I don't see how this can be more independent if it uses
    
    DAEMON=/home/postgres/bin/pg_ctl
    
    and
    
    LOG="/usr/local/pgsql/server.log"
    
    Nor is
    
    su - postgres sh -c "$DAEMON stop >& /dev/null"
    
    an appropriate way to stop the server in a system shutdown situation.
    
    
    IMHO, rather than accumulating a bunch of versions that somebody liked
    better than the existing ones, why not provide actual scripts from actual
    distributions?  Generic scripts will just lead to generic problems.
    
    -- 
    Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
    
    
    
  13. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-04T19:26:16Z

    > LOG="/usr/local/pgsql/server.log"
    > 
    > Nor is
    > 
    > su - postgres sh -c "$DAEMON stop >& /dev/null"
    
    Also, >& is not standard either.
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  14. Re: julian day function

    Karel Zak <zakkr@zf.jcu.cz> — 2001-02-05T07:02:49Z

    On Fri, 2 Feb 2001, Thomas Lockhart wrote:
    
    > > I have written a function to calculate the julian day from any gregorian day.
    > > You can include this code in the contrib directory or whatever place seems
    > > applicable in future releases of posgresql.
    > 
    > Looks nice!
    > 
    > There is already a j2date()/date2j() subroutine pair in the backend, to
    > support all of the existing date/time arithmetic. Would you be willing
    > to use calls to that? Then we wouldn't have two sets of code to maintain
    > (not that JD calculations change very often ;)
    > 
    > It would likely be helpful to have a, say, "julian" argument to
    > date_part(), which I'd be happy to add in. There is already access to
    > Julian date using the to_char(date,'J') function call, and you can get a
    > numeric type return using
    > 
    >   cast(to_char(date,'J') as int)
    
     ... and vice versa:
    
     test=# select to_timestamp('2451946', 'J');
          to_timestamp
    ------------------------
     2001-02-05 00:00:00+01
    (1 row)
    
    		Karel
    
    
    
  15. Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Ryan Kirkpatrick <ryan@calibration.com> — 2001-02-06T04:59:13Z

    On Sun, 4 Feb 2001, Peter Eisentraut wrote:
    
    > Ryan Kirkpatrick writes:
    > 
    > > 	postgresql -> This is a Linux distribution independent (or so I
    > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > specific. This one is simple and self contained. Might be worth adding to
    > > the other scripts.
    > 
    > I don't see how this can be more independent if it uses
    > 
    > DAEMON=/home/postgres/bin/pg_ctl
    
    	Ooops.... That is my mistake... Should have been
    /usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home
    (where there is more, faster disk space). I can submit a patch, or can
    some one just fix it?
    
    > LOG="/usr/local/pgsql/server.log"
    
    	What is wrong with that? There really is no standard on where to
    put the log file, so it is either here or /var/log.
    
    > su - postgres sh -c "$DAEMON stop >& /dev/null"
    
    	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    replaced with '2>&1 >' if that is more standard.
    
    > an appropriate way to stop the server in a system shutdown situation.
    
    	Uh... Isn't that the way you are supposed to stop it? pg_ctl stop?
    
    > IMHO, rather than accumulating a bunch of versions that somebody liked
    > better than the existing ones, why not provide actual scripts from actual
    > distributions?  Generic scripts will just lead to generic problems.
    
    	Fine by me... I just put mine up as a suggestion, as the only
    other one in contrib was very RH specific. The one included with the
    debian package is very debian specific (and over complex in IMHO). I just
    submitted mine as a possible generic Linux version that should work with
    bash on most installation. If some one has a better idea, then by all
    means post it.
    	Also, from the way I understand contrib, they are user submissions
    and are in no way assured to work on any other machine than the user's who
    submitted it. I take it as given anything in contrib might need a bit of
    editing to fit my needs.
    	Anyway, just my response as one who has used Slackware, RedHat,
    and now Debian over the years, but who in no way claims to be an
    uber-Linux or Unix hacker or sysadmin. :)
    
    	PS. I do play a part time Linux sysadmin in real though...
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
    
    
  16. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-06T17:45:27Z

    > On Sun, 4 Feb 2001, Peter Eisentraut wrote:
    > 
    > > Ryan Kirkpatrick writes:
    > > 
    > > > 	postgresql -> This is a Linux distribution independent (or so I
    > > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a
    > > > few in ./contrib/linux of the pgsql source tree, but they are RedHat
    > > > specific. This one is simple and self contained. Might be worth adding to
    > > > the other scripts.
    > > 
    > > I don't see how this can be more independent if it uses
    > > 
    > > DAEMON=/home/postgres/bin/pg_ctl
    > 
    > 	Ooops.... That is my mistake... Should have been
    > /usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home
    > (where there is more, faster disk space). I can submit a patch, or can
    > some one just fix it?
    
    Change made.
    
    > > LOG="/usr/local/pgsql/server.log"
    > 
    > 	What is wrong with that? There really is no standard on where to
    > put the log file, so it is either here or /var/log.
    > 
    > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > 
    > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > replaced with '2>&1 >' if that is more standard.
    > 
    
    Change made.
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  17. Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Florent Guillaume <efgeor@noos.fr> — 2001-02-06T21:21:15Z

    > > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > > 
    > > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > > replaced with '2>&1 >' if that is more standard.
    
    It won't do what you want. You want '>/dev/null 2>&1'.
    
    > Change made.
    
    Hmmm, I don't see this change in cvsweb.
    
    
    Florent
    
    -- 
    florent.guillaume@mail.com
    
    
  18. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-06T21:39:04Z

    > > > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > > > 
    > > > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > > > replaced with '2>&1 >' if that is more standard.
    > 
    > It won't do what you want. You want '>/dev/null 2>&1'.
    
    Yes, I knew he wanted >/dev/null 2>&1.  I just fixed it.  
    
    > 
    > > Change made.
    > 
    > Hmmm, I don't see this change in cvsweb.
    
    Thanks.  Seems I overwrote it with his new version.  Done now.
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  19. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Ryan Kirkpatrick <pgsql@rkirkpat.net> — 2001-02-08T04:44:18Z

    On Tue, 6 Feb 2001, Bruce Momjian wrote:
    
    > > > DAEMON=/home/postgres/bin/pg_ctl
    > > 
    > > 	Ooops.... That is my mistake... Should have been
    > > /usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home
    > > (where there is more, faster disk space). I can submit a patch, or can
    > > some one just fix it?
    > 
    > Change made.
    
    	Actually I found a few more places where I used /home/postgres
    instead of /usr/local/pgsql. To make things clear (and for reasons
    below) I have attached a new version of the file.
    
    > > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > > 
    > > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > > replaced with '2>&1 >' if that is more standard.
    > > 
    > Change made.
    
    	Turns out that it has to be '> {dest} 2>&1' for it to work, at
    least with bash. So, to reduce confusion on fixes to this file, as I
    stated above, a new version is attached. It is tested to work and I don't
    see any thing more that is non-standard. Though if you still see problems,
    feel free to point them out. :) Thanks and TTYL.
    
    ---------------------------------------------------------------------------
    |   "For to me to live is Christ, and to die is gain."                    |
    |                                            --- Philippians 1:21 (KJV)   |
    ---------------------------------------------------------------------------
    |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    ---------------------------------------------------------------------------
    
  20. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-08T04:57:17Z

    Updated.
    
    > On Tue, 6 Feb 2001, Bruce Momjian wrote:
    > 
    > > > > DAEMON=/home/postgres/bin/pg_ctl
    > > > 
    > > > 	Ooops.... That is my mistake... Should have been
    > > > /usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home
    > > > (where there is more, faster disk space). I can submit a patch, or can
    > > > some one just fix it?
    > > 
    > > Change made.
    > 
    > 	Actually I found a few more places where I used /home/postgres
    > instead of /usr/local/pgsql. To make things clear (and for reasons
    > below) I have attached a new version of the file.
    > 
    > > > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > > > 
    > > > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > > > replaced with '2>&1 >' if that is more standard.
    > > > 
    > > Change made.
    > 
    > 	Turns out that it has to be '> {dest} 2>&1' for it to work, at
    > least with bash. So, to reduce confusion on fixes to this file, as I
    > stated above, a new version is attached. It is tested to work and I don't
    > see any thing more that is non-standard. Though if you still see problems,
    > feel free to point them out. :) Thanks and TTYL.
    > 
    > ---------------------------------------------------------------------------
    > |   "For to me to live is Christ, and to die is gain."                    |
    > |                                            --- Philippians 1:21 (KJV)   |
    > ---------------------------------------------------------------------------
    > |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    > ---------------------------------------------------------------------------
    Content-Description: 
    
    [ Attachment, skipping... ]
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  21. Re: Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-08T04:57:32Z

    Applied.  Thanks.
    
    > On Tue, 6 Feb 2001, Bruce Momjian wrote:
    > 
    > > > > DAEMON=/home/postgres/bin/pg_ctl
    > > > 
    > > > 	Ooops.... That is my mistake... Should have been
    > > > /usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home
    > > > (where there is more, faster disk space). I can submit a patch, or can
    > > > some one just fix it?
    > > 
    > > Change made.
    > 
    > 	Actually I found a few more places where I used /home/postgres
    > instead of /usr/local/pgsql. To make things clear (and for reasons
    > below) I have attached a new version of the file.
    > 
    > > > > su - postgres sh -c "$DAEMON stop >& /dev/null"
    > > > 
    > > > 	Hmm... What is wrong here, besides the '>&'? The '>&' can be
    > > > replaced with '2>&1 >' if that is more standard.
    > > > 
    > > Change made.
    > 
    > 	Turns out that it has to be '> {dest} 2>&1' for it to work, at
    > least with bash. So, to reduce confusion on fixes to this file, as I
    > stated above, a new version is attached. It is tested to work and I don't
    > see any thing more that is non-standard. Though if you still see problems,
    > feel free to point them out. :) Thanks and TTYL.
    > 
    > ---------------------------------------------------------------------------
    > |   "For to me to live is Christ, and to die is gain."                    |
    > |                                            --- Philippians 1:21 (KJV)   |
    > ---------------------------------------------------------------------------
    > |   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
    > ---------------------------------------------------------------------------
    Content-Description: 
    
    [ Attachment, skipping... ]
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026