From:
Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To:
Robert Haas <robertmhaas(at)gmail(dot)com>
Cc:
Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Chris Redekop <chris(at)replicon(dot)com>
Subject:
Re: pg_last_xact_insert_timestamp
Date:
2011-09-11 04:24:10
Message-ID:
CAHGQGwEsMSOCmgeOVte5WwHgPTXNr=2aYSDjSQi9f28UBXRT9Q@mail.gmail.com (view raw or flat )
Thread:
2011-09-08 08:36:38 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-08 08:55:40 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-08 10:14:46 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-08 13:03:14 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-08 22:33:39 from Chris Redekop <chris(at)replicon(dot)com>
2011-09-09 00:42:03 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-09 15:32:46 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-11 04:24:10 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-14 09:21:08 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp>
2011-09-15 08:52:53 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-23 13:34:19 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-29 08:20:33 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp>
2011-09-29 12:21:32 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-30 02:24:43 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp>
2011-09-30 07:18:53 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-30 19:11:30 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-30 19:22:24 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-30 19:57:19 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-30 20:07:58 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-10-02 11:10:11 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-02 12:21:31 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-10-03 19:07:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-03 20:25:01 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-10-03 20:33:01 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-04 12:05:29 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-04 13:15:11 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-10-13 12:25:28 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 11:49:29 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-10 12:29:39 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2011-12-12 12:17:10 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-14 16:06:08 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-12 13:45:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-12 14:24:41 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-12 14:47:34 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-12 14:51:10 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-12-12 14:53:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-12 22:08:51 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2011-10-03 09:56:53 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-02 11:19:33 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-02 21:35:31 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-10-03 09:31:47 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-04 11:52:59 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Lists:
pgsql-hackers
On Sat, Sep 10, 2011 at 12:32 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Sep 8, 2011 at 8:42 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> Another idea to avoid spinlock contention is save the timestamp in
>> PgBackendStatus (which contains information for pg_stat_activity).
>> This enables us to write and read the timestamp without spinlock.
>> Comments?
>
> That seems like a possibly promising approach, in that each backend
> could update the information separately, and it's the reader's job to
> go find the maximum of all those values when needed. So the overhead
> is (properly, in this case) placed on the reader instead of the
> writer. But it's a bit tricky, because when the reader wants that
> maximum, it has to take into account inactive backends that may have
> committed transactions before exiting, not just the ones that are
> still connected.
Yes, that's what I was thinking. The attached patch has adopted that
approach.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
In response to
Responses
pgsql-hackers by date
Next :From: Pavel StehuleDate: 2011-09-11 04:56:16
Subject : Re: [REVIEW] prepare plans of embedded sql on function start
Previous :From : Pavel StehuleDate : 2011-09-11 04:17:50
Subject : Re: [REVIEW] prepare plans of embedded sql on function start