Re: Speedup twophase transactions

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Speedup twophase transactions
Date: 2016-01-11 19:39:14
Message-ID: CANP8+jLPS5mSmi9UODUwzpwwnpWfEBMrb1519Acsbz7ZAJ43aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11 January 2016 at 19:18, Andres Freund <andres(at)anarazel(dot)de> wrote:

> > More generally, I'm doubtful that the approach of reading data from WAL
> > > as proposed here is a very good idea. It seems better to "just" dump
> the
> > > entire 2pc state into *one* file at checkpoint time.
> > >
> >
> > I think you misunderstand the proposed approach. This isn't just to do
> > with reading things back at checkpoint.
>
> Sure, the main purpose is not to write 2pc state files in the common
> path - or is that not the main purpose?
>

Yes, that is the main purpose, but that's not what you were talking about.

Currently, the patch reuses all of the code related to reading/write state
files, so it is the minimal patch that can implement the important things
for performance. The current patch succeeds in its goal to improve
performance, so I personally see no further need for code churn.

As you suggest, we could also completely redesign the state file mechanism
and/or put it in WAL at checkpoint. That's all very nice but is much more
code and doesn't anything more for performance, since the current mainline
path writes ZERO files at checkpoint. If you want that for some other
reason or refactoring, I won't stop you, but its a separate patch for a
separate purpose.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-01-11 19:46:58 Re: Making plpython 2 and 3 coexist a bit better
Previous Message Andres Freund 2016-01-11 19:27:42 Re: checkpointer continuous flushing