Re: Transaction ID wraparound: problem and proposed solution

Поиск
Список
Период
Сортировка
От Nathan Myers
Тема Re: Transaction ID wraparound: problem and proposed solution
Дата
Msg-id 20001110120125.Q8881@store.zembu.com
обсуждение исходный текст
Ответ на Re: Transaction ID wraparound: problem and proposed solution  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
On Sun, Nov 05, 2000 at 03:48:13PM +0200, Hannu Krosing wrote:
> Tom Lane wrote:
> > 
> > Philip Warner <pjw@rhyme.com.au> writes:
> > >> * disk space --- letting pg_log grow without bound isn't a pleasant
> > >> prospect either.
> > 
> > > Maybe this can be achieved by wrapping XID for the log file only.
> > 
> > How's that going to improve matters?  pg_log is ground truth for XIDs;
> > if you can't distinguish two XIDs in pg_log, there's no point in
> > distinguishing them elsewhere.
> 
> One simple way - start a new pg_log file at each wraparound and encode 
> the high 4 bytes in the filename (or in first four bytes of file)

Proposal:

Annotate each log file with the current XID value at the time the file 
is created.  Before comparing any two XIDs, subtract that value from 
each operand, using unsigned arithmetic. 

At a sustained rate of 10,000 transactions/second, any pair of 32-bit 
XIDs less than 2.5 days apart compare properly.

Nathan Myers
ncm@zembu.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Problems with Perl
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Coping with 'C' vs 'newC' function language names