Re: Potential Large Performance Gain in WAL synching - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Potential Large Performance Gain in WAL synching
Date
Msg-id 200210040444.g944iMI08942@candle.pha.pa.us
Whole thread Raw
In response to Re: Potential Large Performance Gain in WAL synching  ("Curtis Faith" <curtis@galtair.com>)
Responses Re: Potential Large Performance Gain in WAL synching  ("Curtis Faith" <curtis@galtair.com>)
List pgsql-hackers
Curtis Faith wrote:
> The method I propose does not result in any blocking because of writes
> other than the final commit's write and it has the very significant
> advantage of allowing other transactions (from other back-ends) to
> continue until they enter commit (and blocking waiting for their final
> commit write to complete).
> 
> > > 2) Allow transactions to complete and do work while other threads are
> > > waiting on the completion of the log write.
> > 
> > I'm missing something.  There is no useful work that a transaction can
> > do between writing its commit record and reporting completion, is there?
> > It has to wait for that record to hit disk.
> 
> The key here is that a thread that has not committed and therefore is
> not blocking can do work while "other threads" (should have said back-ends 
> or processes) are waiting on their commit writes.

I may be missing something here, but other backends don't block while
one writes to WAL.  Remember, we are proccess based, not thread based,
so the write() call only blocks the one session.  If you had threads,
and you did a write() call that blocked other threads, I can see where
your idea would be good, and where async i/o becomes an advantage.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "Curtis Faith"
Date:
Subject: Re: Potential Large Performance Gain in WAL synching
Next
From: Bruce Momjian
Date:
Subject: Re: Return of INSTEAD rules