Re: Problem with background worker

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Marc Cousin <cousinmarc(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with background worker
Date: 2013-03-24 11:00:09
Message-ID: 1364122809.4019.2.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2013-03-20 at 13:13 -0300, Alvaro Herrera wrote:
> Marc Cousin escribió:
> > On 20/03/2013 16:33, Alvaro Herrera wrote:
>
> > >Ah. The reason for this problem is that the statement start time (which
> > >also sets the transaction start time, when it's the first statement) is
> > >set by postgres.c, not the transaction-control functions in xact.c. So
> > >you'd need to add a SetCurrentStatementStartTimestamp() call somewhere
> > >in your loop.
> >
> > Yes, that works. Thanks a lot !
> >
> > Maybe this should be added to the worker_spi example ?
>
> Yeah, I think I need to go over the postgres.c code and figure out what
> else needs to be called. I have a pending patch from Guillaume to
> improve worker_spi some more; I'll add this bit too.
>

Happy to know that you still remember it :) Thanks.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-03-24 11:14:50 Limiting setting of hint bits by read-only queries; vacuum_delay
Previous Message Hitoshi Harada 2013-03-24 07:43:25 Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls