Re: Reworking WAL locking - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reworking WAL locking
Date
Msg-id 9649.1203007746@sss.pgh.pa.us
Whole thread Raw
In response to Reworking WAL locking  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Show INHERIT in \du
Next
From: Guillaume Lelarge
Date:
Subject: Re: Show INHERIT in \du