Thread

  1. Re: Bug #882: Cannot manually log in to database.

    Giles Lean <giles@nemeton.com.au> — 2003-01-24T14:02:54Z

    [ Where *did* that Reply-To: line come from -- it's broken ...
    
      repl: bad addresses:
    	benk@aiinet.com; -- extraneous semi-colon
    ]
    
    > Stopping and starting the postmaster daemon clears up this problem,
    > but this problem creeps up about 2 times a week, and is a major
    > annoyance.
    
    Either teach your /tmp cleaner not to clean out the socket files as
    Tom Lane suggested, or arrange to update the socket timestamps.  I
    think it's easier to just keep updating the timestamps -- then I don't
    have to educate each new system administrator.
    
        utimes("/tmp/.s.PGSQL.5432", (const struct timeval *) 0);
    
    If you can't write that into C, drop me a line, and I'll send you the
    code.  Most touch(1) implementations would also do the right thing, so
    you could try that too.  Then put whatever solution you choose into
    cron, and you're done.
    
    Regards,
    
    Giles
    
        
    
    
  2. Re: Bug #882: Cannot manually log in to database.

    Tom Lane <tgl@sss.pgh.pa.us> — 2003-01-24T16:03:48Z

    Giles Lean <giles@nemeton.com.au> writes:
    > Either teach your /tmp cleaner not to clean out the socket files as
    > Tom Lane suggested, or arrange to update the socket timestamps.  I
    > think it's easier to just keep updating the timestamps -- then I don't
    > have to educate each new system administrator.
    
    >     utimes("/tmp/.s.PGSQL.5432", (const struct timeval *) 0);
    
    Hm, do you think that's portable?
    
    There is already code in the postmaster to touch the socket lock file
    every few minutes, so as to keep tmp-cleaners from zapping it.  (Or at
    least there once was; I can't find it right now.)  If we could do the
    same for the socket file it'd be really nice.  But I didn't think there
    was any portable way to update the mod timestamp on a socket.
    
    			regards, tom lane