Re: Reworking WAL locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Paul van den Bogaard <Paul(dot)Vandenbogaard(at)Sun(dot)COM>
Subject: Re: Reworking WAL locking
Date: 2008-02-14 16:49:06
Message-ID: 9649.1203007746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> LWLockAcquire(WALInsertLock, LW_EXCLUSIVE)

> Reserve space to write into.
> LSN = current Insert pointer
> Move pointer forward by length of data to be inserted, acquiring
> WALWriteLock if required to ensure space is available.

I think you've handwaved over how you'll avoid self-deadlock
in the case where the WAL record exceeds the size of wal_buffers.

Assuming that that can be fixed without too much ugliness,
it seems worth trying.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2008-02-14 18:27:46 Re: Show INHERIT in \du
Previous Message Tom Lane 2008-02-14 16:42:17 Re: Show INHERIT in \du