Re: Bug in autovacuum.c?
От | Bruce Momjian |
---|---|
Тема | Re: Bug in autovacuum.c? |
Дата | |
Msg-id | 201103312035.p2VKZ1l26221@momjian.us обсуждение исходный текст |
Ответ на | Re: Bug in autovacuum.c? (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Bug in autovacuum.c?
|
Список | pgsql-hackers |
Robert Haas wrote: > >> > The effect is to map max xid + 1 to max xid - > >> > FirstNormalTransactionId(3) + 1, which makes the xid look like it is > >> > going backwards, less than max xid --- not good. > >> > >> The XID space is *circular*. > > > > Right but you would think that as the xid moves forward, the caculation > > of how far back to vacuum should move only forward. ?In this case, > > incrementing the xid by one would cause the vacuum horizon to move > > backward by two. > > I don't see how that would happen. The XID immediately preceding > FirstNormalTransactionId is 2^32-1, and that's exactly what this > calculation produces. OK, let me see if I understand --- the caculation is below: xidForceLimit = recentXid - autovacuum_freeze_max_age; if (xidForceLimit < FirstNormalTransactionId) xidForceLimit-= FirstNormalTransactionId; The values: xidForceLimit Result---------------------------max_xid-2 max_xid-2max_xid-1 max_xid-1max_xid max_xid0 max_xid-3 <- backward here1 max_xid-22 max_xid-13 3 With the -= change to =, we get: xidForceLimit Result---------------------------max_xid-2 max_xid-2max_xid-1 max_xid-1max_xid max_xid0 31 32 33 3 -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: