Re: Fwd: Re: [ADMIN] Can i write a time-trigger?

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Fwd: Re: [ADMIN] Can i write a time-trigger?
Date: 2009-11-19 07:09:16
Message-ID: 937d27e10911182309kf7c8117j38c5fc09b46ba8f6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, Nov 19, 2009 at 3:57 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-11-19 07:11:19 Re: Fwd: [Bug 484145] [NEW] Keyboard shortcuts for closing window / application inconsistent with GNOME
Previous Message Guillaume Lelarge 2009-11-19 07:05:29 Fwd: [Bug 484145] [NEW] Keyboard shortcuts for closing window / application inconsistent with GNOME