From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Marc Cousin <cousinmarc(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Problem with background worker |
Date: | 2013-03-20 16:13:22 |
Message-ID: | 20130320161322.GB3688@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-03-20 16:30:32 | Re: pg_upgrade segfaults when given an invalid PGSERVICE value |
Previous Message | Marc Cousin | 2013-03-20 16:06:42 | Re: Problem with background worker |