Re: MultiXacts & WAL

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: paolo romano <paolo(dot)romano(at)yahoo(dot)it>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: MultiXacts & WAL
Date: 2006-06-17 11:17:47
Message-ID: Pine.OSF.4.61.0606171406160.307302@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 17 Jun 2006, paolo romano wrote:

> * Reduced I/O Activity: during transaction processing: current workloads
> are typically dominated by reads (rather than updates)... and reads give
> rise to multixacts (if there are at least two transactions reading the
> same page or if an explicit lock request is performed through
> heap_lock_tuple). And (long) transactions can read a lot of tuples,
> which directly translates into (long) multixact logging sooner or later.
> To accurately estimate the possible performance gain one should perform
> some profiling, but at first glance ISTM that there are good
> potentialities.

Read-only transactions don't acquire shared locks. And updating
transcations emit WAL records anyway; the additional I/O caused by
multixact records is negligable.

Also, multixacts are only used when two transactions hold a shared lock
on the same row.

> * Reduced Recovery Time: because of shorter logs & less data
> structures to rebuild... and reducing recovery time helps improving
> system availability so should not be overlooked.

I doubt the multixact stuff makes much difference compared to all other
WAL traffic.

In fact, logging the multixact stuff could be skipped when no two-phase
transactions are involved. The problem is, you don't know if a transaction is one
phase or two phase before you see COMMIT or PREPARE TRANSACTION.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-17 16:04:00 Re: PG_MODULE_MAGIC
Previous Message Heikki Linnakangas 2006-06-17 11:05:16 Re: MultiXacts & WAL