Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
| От | Robert Haas |
|---|---|
| Тема | Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated) |
| Дата | |
| Msg-id | CA+TgmoY+G7v3ePgHPcybA7i9Q6_2q+HOBSXeN9WGKCT0BjmzRQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated) (Alvaro Herrera <alvherre@2ndquadrant.com>) |
| Список | pgsql-bugs |
On Thu, May 7, 2015 at 2:00 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> There's also a question about this function's "else" branch:
>
> void
> MultiXactAdvanceOldest(MultiXactId oldestMulti, Oid oldestMultiDB)
> {
> if (MultiXactIdPrecedes(MultiXactState->oldestMultiXactId, oldestMulti))
> SetMultiXactIdLimit(oldestMulti, oldestMultiDB);
> else
> DetermineSafeOldestOffset(oldestMulti);
> }
>
> The reason the "else" is there is that I chickened out about not calling
> DetermineSafeOldestOffset() (which SetMultiXactIdLimit calls) when the
> oldestMulti does not advance; what if in the previous run we failed to
> get to this point for whatever reason? The calls to SetMultiXactIdLimit
> are seldom enough that it seemed better to be protected against previous
> runs not finishing. Then again, I might be worrying over nothing and
> this is just dead code.
It's dead code for more pedestrian reasons: MultiXactAdvanceOldest()
is called only from xlog_redo(), but does nothing if InRecovery.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgsql-bugs по дате отправления: