Thread

  1. Some items for the TODO list

    Tom Lane <tgl@sss.pgh.pa.us> — 1998-07-08T23:26:09Z

    Things I'd like to see get in there before 6.4:
    
    1. On HPUX, the new no-exec method of starting the backend means that
    all the backends claim to be "postmaster"; there's no way to tell 'em
    apart via ps(1).  There is some code in postgres.c that tries to update
    the process title information by tweaking the original argv[] array, but
    that just plain doesn't work under HPUX, nor under quite a few other
    Unix variants.  I'm finding out that not being able to tell which
    process is which is a real pain in the neck; I don't think it will be
    acceptable for production use.  I think we are going to have to bite the
    bullet and borrow the process-title-setting code from sendmail --- I
    know it's ugly, but it *works* on many many Unixes.
    
    2. I'm starting to get annoyed by the inability to "unlisten" from
    a particular relation.  Is there a reason that there is not an UNLISTEN
    command?  (Like maybe it's not in ANSI SQL?)  Or is it just something
    that never got to the top of the to-do queue?  I see that the low-level
    code for a backend to unlisten itself is in there, but there's no way
    for the frontend to command it to happen.
    
    If no one else feels like working on these, maybe I will.  I could use
    some pointers for #2 though ... what needs to be done to add a new SQL
    statement?
    
    			regards, tom lane
    
    
  2. Re: [HACKERS] Some items for the TODO list

    ocie@paracel.com — 1998-07-09T01:04:49Z

    Tom Lane wrote:
    > 
    > Things I'd like to see get in there before 6.4:
    > 
    > 1. On HPUX, the new no-exec method of starting the backend means that
    > all the backends claim to be "postmaster"; there's no way to tell 'em
    > apart via ps(1).  There is some code in postgres.c that tries to update
    > the process title information by tweaking the original argv[] array, but
    > that just plain doesn't work under HPUX, nor under quite a few other
    > Unix variants.  I'm finding out that not being able to tell which
    > process is which is a real pain in the neck; I don't think it will be
    > acceptable for production use.  I think we are going to have to bite the
    > bullet and borrow the process-title-setting code from sendmail --- I
    > know it's ugly, but it *works* on many many Unixes.
     
    One way to tell them apart is to see which of them is the parent of
    the rest.  Not as nice as being able to set the title, but it might be
    a serviceable workaround in some cases.
    
    Ocie
    
    
  3. Re: [HACKERS] Some items for the TODO list

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 1998-07-09T04:41:21Z

    > Is there a reason that there is not an UNLISTEN
    > command?  (Like maybe it's not in ANSI SQL?)
    > If no one else feels like working on these, maybe I will.  I could use
    > some pointers for #2 though ... what needs to be done to add a new SQL
    > statement?
    
    I'll add the new statement if you can get the backend to do something
    with it. Usually, there is a parse tree structure corresponding to the
    command, with any parameters included in it. In this case, the
    "unlisten" block should probably look like the "listen" block, since
    both probably have similar arguments.
    
    Let me know if you have time to work on it...
    
                           - Tom
    
    
  4. Re: [HACKERS] Some items for the TODO list

    Tom Samplonius <tom@sdf.com> — 1998-07-09T17:48:01Z

    On Wed, 8 Jul 1998, Tom Lane wrote:
    
    > Things I'd like to see get in there before 6.4:
    > 
    > 1. On HPUX, the new no-exec method of starting the backend means that
    > all the backends claim to be "postmaster"; there's no way to tell 'em
    > apart via ps(1).  There is some code in postgres.c that tries to update
    > the process title information by tweaking the original argv[] array, but
    > that just plain doesn't work under HPUX, nor under quite a few other
    > Unix variants.  I'm finding out that not being able to tell which
    > process is which is a real pain in the neck; I don't think it will be
    > acceptable for production use.  I think we are going to have to bite the
    > bullet and borrow the process-title-setting code from sendmail --- I
    > know it's ugly, but it *works* on many many Unixes.
    
      Many UNIXes have a setproctitle() function, either in libc or libutil.
    I think a native function should be used if exists.
    
    Tom
    
    
    
  5. Re: [HACKERS] Some items for the TODO list

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-07-09T18:40:07Z

    > 
    > On Wed, 8 Jul 1998, Tom Lane wrote:
    > 
    > > Things I'd like to see get in there before 6.4:
    > > 
    > > 1. On HPUX, the new no-exec method of starting the backend means that
    > > all the backends claim to be "postmaster"; there's no way to tell 'em
    > > apart via ps(1).  There is some code in postgres.c that tries to update
    > > the process title information by tweaking the original argv[] array, but
    > > that just plain doesn't work under HPUX, nor under quite a few other
    > > Unix variants.  I'm finding out that not being able to tell which
    > > process is which is a real pain in the neck; I don't think it will be
    > > acceptable for production use.  I think we are going to have to bite the
    > > bullet and borrow the process-title-setting code from sendmail --- I
    > > know it's ugly, but it *works* on many many Unixes.
    > 
    >   Many UNIXes have a setproctitle() function, either in libc or libutil.
    > I think a native function should be used if exists.
    
    What is Linux doing with my changes.  Do you see all the process names
    as postmaster?  Do you see the query type displayed as part of the ps
    output.  We can use setproctitle/sendmail hack to change the process
    name from postmaster to postgres, but are these sufficiently quick to
    be run for every query to display the query type, i.e. SELECT.
    
    -- 
    Bruce Momjian                          |  830 Blythe Avenue
    maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
      +  If your life is a hard drive,     |  (610) 353-9879(w)
      +  Christ can be your backup.        |  (610) 853-3000(h)