Re: Fwd: Re: [ADMIN] Can i write a time-trigger? - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Fwd: Re: [ADMIN] Can i write a time-trigger?
Date
Msg-id 937d27e10911182309kf7c8117j38c5fc09b46ba8f6@mail.gmail.com
Whole thread Raw
In response to Fwd: Re: [ADMIN] Can i write a time-trigger?  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Fwd: Re: [ADMIN] Can i write a time-trigger?
List pgadmin-hackers
On Thu, Nov 19, 2009 at 3:57 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Hi,
>
> I don't know all the in and out of pgagent, but I think he's right in his
> complaint (unfortunately not in the way he did complain). Should we really
> have "dbname=postgres" instead of "dbname=pgadmin" or am I missing something
> obvious?

Yes, probably. iirc, those docs were written before we had a postgres
database as standard - and we certainly didn't recommend using
template1 which was the old default maintenance DB.

> This is amazingly helpful.  More than i had imagined.  Thanks!  What i had initially
> thought by looking at pgagent --help which claims that with the -l option,  0 is error,
> 1 is warning, 2 is debug and 0 is default.   So i had thought that any error should
> be automatically flagged by the process when i run it in foreground (-f).  Including
> 'database pgadmin does not exist'.  But it didn't.  On further investigation after your
> suggestion, i found that this is considered only a 'warning' and not an 'error'!  So it
> is flagged with -l 1 or 2, but not with 0.  Isn't this ridiculous!

It's a warning because it doesn't cause a hard failure. It'll keep
trying to connect, and then give up with an error after 10 or so
attempts over a period of time. It's done that way to allow for race
conditions in init scripts, or systems where PostgreSQL starts in a
timely fashion, but doesn't come up immediately because it goes into
recovery for example.

> So now i know why my job wasn't running!
> And the -l 2 option (debug mode) is really great!  It gives me so many details i'm thrilled!  :-)

Yeah, you get to see the threaded pooler at work. A simple piece of
code really, but strangely satisfying to finish writing.


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Fwd: [Bug 484145] [NEW] Keyboard shortcuts for closing window / application inconsistent with GNOME
Next
From: Magnus Hagander
Date:
Subject: Re: Fwd: [Bug 484145] [NEW] Keyboard shortcuts for closing window / application inconsistent with GNOME