Re: Speedup twophase transactions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Speedup twophase transactions
Дата
Msg-id 20160111190318.GB10941@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Speedup twophase transactions  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Speedup twophase transactions  (Andres Freund <andres@anarazel.de>)
Re: Speedup twophase transactions  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Hi,

On 2016-01-09 15:29:11 +0000, Simon Riggs wrote:
> Hmm, I was just preparing this for commit.

Just read downthread that you want to commit this soon. Please hold of
for a while, this doesn't really look ready to me. I don't have time for
a real review right now, but I'll try to get to it asap.

> +
> +/*
> + * Reads 2PC data from xlog. During checkpoint this data will be moved to
> + * twophase files and ReadTwoPhaseFile should be used instead.
> + */
> +static void
> +XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len)
> +{
> +    XLogRecord *record;
> +    XLogReaderState *xlogreader;
> +    char       *errormsg;
> +
> +    xlogreader = XLogReaderAllocate(&logical_read_local_xlog_page,
> NULL);

logical_read_local_xlog_page isn't really suitable for the use
here. Besides the naming issue, at the very least it'll be wrong during
WAL replay in the presence of promotions on an upstream node - it
doesn't dealwith timelines.

More generally, I'm doubtful that the approach of reading data from WAL
as proposed here is a very good idea. It seems better to "just" dump the
entire 2pc state into *one* file at checkpoint time.

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Making plpython 2 and 3 coexist a bit better
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Speedup twophase transactions