From: | Kenneth Marshall <ktm(at)it(dot)is(dot)rice(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Kenneth Marshall <ktm(at)is(dot)rice(dot)edu>, pgsql-hackers(at)postgresql(dot)org, xu(at)cs(dot)wisc(dot)edu |
Subject: | Re: Re: We have got a serious problem with pg_clog/WAL synchronization |
Date: | 2004-08-12 18:25:17 |
Message-ID: | 20040812182517.GB11862@it.is.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Thu, Aug 12, 2004 at 01:13:46PM -0400, Tom Lane wrote:
> Kenneth Marshall <ktm(at)is(dot)rice(dot)edu> writes:
> > On Thu, Aug 12, 2004 at 09:58:56AM -0400, Tom Lane wrote:
> >> How would a read-only action work to block out the checkpoint?
>
> > The latch+version number is use by the checkpoint process. The
> > other processes can do a read of the latch to determine if it has
> > been set. This does not cause a cache invalidation hit. If the
> > latch is set, the competing processes read until it has been
> > cleared and the version updated. This makes the general case of
> > no checkpoint not incur a write and the consequent cache-line
> > invalidation and reload by all processors on an SMP system.
>
> Except that reading the latch and finding it clear offers no guarantee
> that a checkpoint isn't about to start. The problem is that we are
> performing two separate actions (write a COMMIT xlog record and update
> transaction status in clog) and we have to prevent a checkpoint from
> starting in between those actions. I don't see that there's any way to
> do that with a read-only latch.
>
> regards, tom lane
Yes, you are correct. I missed that part of the previous thread. When
I saw "exclusive lock" I thought latch since that is what I am investigating
to solve other performance issues that I am addressing.
Ken
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2004-08-12 18:36:13 | Re: PostgreSQL 8.0 Feature List? |
Previous Message | Laura Vance | 2004-08-12 18:02:48 | Re: My admin left the job and I am stuck |
From | Date | Subject | |
---|---|---|---|
Next Message | ntufar | 2004-08-12 19:09:11 | Re: Turkish downcasting in PL/pgSQL |
Previous Message | Tom Lane | 2004-08-12 17:49:59 | Re: [HACKERS] SAVEPOINT syntax again |