[GENERAL] Postgres and Upstart

Chris Angelico rosuav at gmail.com
Fri Aug 10 10:00:01 EDT 2012


On Fri, Aug 10, 2012 at 11:56 PM, Albe Laurenz <laurenz.albe at wien.gv.at> wrote:
> Chris Angelico wrote:
>> I'm looking for a reliable way to be sure that Postgres has finished
>> its initialization and is ready to rumble.
>
> The normal way to test this is a connection attempt.
> You could also look into the server logs for the
> appropriate message, but that seems more fragile and difficult.

Yeah, I can poll it, and that's what I do in a couple of places; but
somewhere in the code, it probably "knows" that it's ready. I can keep
doing what I'm doing, but was hoping for an event-driven approach.

Thanks!

ChrisA



More information about the Python-list mailing list