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

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Merge compact/non compact commits, make aborts dynamically sized
Дата
Msg-id 54F499B3.3060703@iki.fi
обсуждение исходный текст
Ответ на Re: Merge compact/non compact commits, make aborts dynamically sized  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Merge compact/non compact commits, make aborts dynamically sized  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 03/02/2015 06:51 PM, Andres Freund wrote:
> On 2015-02-25 12:10:42 +0100, Andres Freund wrote:
>> On 2015-02-24 20:51:42 +0200, Heikki Linnakangas wrote:
>>> Regarding XactEmitCommitRecord and XactEmitAbortRecord, I wonder if you
>>> could pass an xl_xact_parsed/abort_commit struct to them, instead of the
>>> individual fields? You could then also avoid the static variables inside it,
>>> passing pointers to that struct to XLogRegisterData() instead.
>>
>> Hm, that's an idea. And rename it to xaxt_commit/abort_data?
>
> So, I just tried this, and it doesn't really seem to come out as a net
> positive. More code at the callsites and more complex code in the *Emit*
> routines. It's impossible to use [FLEXIBLE_ARRAY_MEMBER] employing
> datatypes in xact_commit_data while emitting because there obviously are
> several chunks needing it. And avoid using it would make for a slightly
> less clear format.
>
> So unless you feel strongly about it, don't think so, I'll keep the
> statics, even if they're not particularly pretty.

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.

- Heikki




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

Предыдущее
От: Sawada Masahiko
Дата:
Сообщение: Re: Proposal : REINDEX xxx VERBOSE
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Merge compact/non compact commits, make aborts dynamically sized