Re: [PATCH] 2PC state files on shared memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] 2PC state files on shared memory
Date: 2009-08-08 19:54:39
Message-ID: 28134.1249761279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> What if PREPARE simply didn't write the 2PC file at all, except into WAL?

> Interesting idea, might be worth performance testing. Peeking into the
> WAL files during normal operation feels naughty, but it should work.
> However, if the bottleneck is the WAL fsyncs, I doubt it's any faster
> than Michael's current patch.

This isn't about faster, it's about not requiring users to estimate
a suitable size for a shared-memory arena.

> Actually, it would be interesting to performance test a stripped down
> broken implementation that doesn't write the state files anywhere but
> WAL, PREPARE releases all locks like regular COMMIT does, and COMMIT
> PREPARED just writes the commit record and fsyncs. That would give an
> upper bound on how much gain any of these patches can have. If that's
> not much, we can throw in the towel.

Good idea --- although I would think that the performance of 2PC would
be pretty context-dependent anyway. What load would you test under?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-08-08 19:55:28 Re: contrib/pg_freespacemap
Previous Message Heikki Linnakangas 2009-08-08 19:02:48 Re: [PATCH] 2PC state files on shared memory