Re: Bug in autovacuum.c?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bug in autovacuum.c?
Дата
Msg-id 201104012311.p31NBND02966@momjian.us
обсуждение исходный текст
Ответ на Re: Bug in autovacuum.c?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> > > I am not so concerned about this case but about other cases where we are
> > > computing xid distances across the invalid range.
> > 
> > Such as?
> 
> Not sure.  I have not had time to research this, but there might be
> cases where this backward movement matters --- remember our XIDs are
> valid only within about a 2 billion range, and we do less/greater
> comparisons in that range (using a macro).  That macro is not going to
> cover over backward xid movement.

OK, I am done training for the day, and found this macro:/* advance a transaction ID variable, handling wraparound
correctly*/#define TransactionIdAdvance(dest)  \    do { \        (dest)++; \        if ((dest) <
FirstNormalTransactionId)\            (dest) = FirstNormalTransactionId; \    } while(0)
 

which seems OK, but we the -= all over varsup.c
   /*    * We'll refuse to continue assigning XIDs in interactive mode once we get    * within 1M transactions of data
loss. This leaves lots of room for the    * DBA to fool around fixing things in a standalone backend, while not    *
beingsignificant compared to total XID space. (Note that since    * vacuuming requires one transaction per table
cleaned,we had better be    * sure there's lots of XIDs left...)    */   xidStopLimit = xidWrapLimit - 1000000;   if
(xidStopLimit< FirstNormalTransactionId)       xidStopLimit -= FirstNormalTransactionId;
 

Now I am not sure where to add a C comment.  :-(

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug in autovacuum.c?
Следующее
От: Darren Duncan
Дата:
Сообщение: Re: Postgres 9.1 - Release Theme