Re: Merge compact/non compact commits, make aborts dynamically sized

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Merge compact/non compact commits, make aborts dynamically sized
Дата
Msg-id 20150302174518.GD22160@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Merge compact/non compact commits, make aborts dynamically sized  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Merge compact/non compact commits, make aborts dynamically sized  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 2015-03-02 19:23:56 +0200, Heikki Linnakangas wrote:
> On 03/02/2015 07:14 PM, Andres Freund wrote:
> >On 2015-03-02 19:11:15 +0200, Heikki Linnakangas wrote:
> >>Come to think of it, it would be cleaner anyway to move the
> >>XLogBeginInsert() and XLogInsert() calls inside XactEmitCommitRecord. Then
> >>those structs don't need to be static either.
> >
> >That was my first thought as well - but it doesn't easily work because
> >of the way commit/abort records are embedded into twophase.c.  I
> >couldn't come with a simple way to change that, and anythign non simple
> >imo defeats the purpose.
> 
> Pass the prepared XID as yet another argument to XactEmitCommitRecord, and
> have XactEmitCommitRecord emit the xl_xact_commit_prepared part of the
> record too. It might even make sense to handle the prepared XID like all the
> other optional fields and add an xinfo flag for it.

That's what I mean with "non simple". Not a fan of teaching xact.c even
more about twophase's dealings than it already knows. We'd have to
either teach XactEmit* to insert different types of records pased a
parameter or switch in xact_redo() based on the availability of the
separate twophase xid via xinfo. Doesn't strike me as an improvement at
all.

I'd rather live with some statics in an isolated location - it's not as
if we're ever going to allow two concurrent xlog inserts to happen at
the same time.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Idea: closing the loop for "pg_ctl reload"
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Additional role attributes && superuser review