Re: pgsql: Document XLOG_INCLUDE_XID a little better

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: Document XLOG_INCLUDE_XID a little better
Дата
Msg-id 202110201616.ftltjk5b2rwv@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pgsql: Document XLOG_INCLUDE_XID a little better  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: pgsql: Document XLOG_INCLUDE_XID a little better  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On 2021-Oct-20, Dilip Kumar wrote:

> On Wed, Oct 20, 2021 at 7:09 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

> > In IsTopTransactionIdLogPending(), I suggest to reorder the tests so
> > that the faster ones are first -- or at least, the last one should be at
> > the top, so in some cases we can return without additional function
> > calls.  I don't think it'd be extremely noticeable, but as Tom likes to
> > say, a cycle shaved is a cycle earned.
> 
> I don't think we can really move the last at top.  Basically, we only
> want to log the top transaction id if all the above check passes and
> the top xid is not yet logged.  For example, if the WAL level is not
> logical then we don't want to log the top xid even if it is not yet
> logged, similarly, if the current transaction is not a subtransaction
> then also we don't want to log the top transaction.

Well, I don't suggest to move it verbatim, but ISTM the code can be
restructured so that we do that test first, and if we see that flag set
to true, we don't have to consider any of the other tests.  That flag
can only be set true if we saw all the other checks pass in the same
subtransaction, right?

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: add retry mechanism for achieving recovery target before emitting FATA error "recovery ended before configured recovery target was reached"
Следующее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.