Re: PreallocXlogFiles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PreallocXlogFiles
Date: 2004-07-24 14:22:55
Message-ID: 4081.1090678975@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:
> Calling PreallocXlogFiles outside of the Checkpoint code is
> straightforward to initiate from bgwriter.c, but the caller must have
> already obtained the current recptr position. That would require
> attempting to gain a lock on XLogCtl, then releasing it quickly after
> having read the pointer. Then call Prealloc...

When I said "modified version", I meant that we'd change the function
to make it self-contained. Passing an already-obtained recptr is
convenient when it's being invoked at the end of Checkpoint, but to
be called from the bgwriter loop it should just get the necessary lock
and fetch the pointer for itself.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-07-24 14:33:12 Re: Nested xact status?
Previous Message Simon Riggs 2004-07-24 09:58:54 Re: PreallocXlogFiles