Re: Split xlog.c

Поиск
Список
Период
Сортировка
Искать
От
Heikki Linnakangas
Тема
Re: Split xlog.c
Дата
Msg-id
ff82d82b-8905-8f94-740d-da8d52baa6e0@iki.fi
Ответ на
Re: Split xlog.c (Kyotaro Horiguchi)
Список
Дерево обсуждения
Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Andres Freund <andres@anarazel.de>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c vignesh C <vignesh21@gmail.com>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Andres Freund <andres@anarazel.de>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Split xlog.c Jaime Casanova <jcasanov@systemguards.com.ec>
Re: Split xlog.c Daniel Gustafsson <daniel@yesql.se>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Robert Haas <robertmhaas@gmail.com>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Robert Haas <robertmhaas@gmail.com>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Michael Paquier <michael@paquier.xyz>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
Re: Split xlog.c Heikki Linnakangas <hlinnaka@iki.fi>
On 17/09/2021 06:10, Kyotaro Horiguchi wrote:
>    recoveryStopReason is always acquired but it is used only after
>    archive recovery.  I'm not sure about reason for the variable to
>    live in that wide context.  Couldn't we remove the variable then
>    call getRecoveryStopReason() directly at the required place?

Robert commented on the same thing, see my reply there.

> 0002:
> 
>    heapam.c, clog.c, twophase.c, dbcommands.c doesn't need  xlogrecvoer.h.

Cleaned that up in v7, thanks!

>> XLogRecCtl
> 
>    "Rec" looks like Record. Couldn't we use "Rcv", "Recov" or just
>    "Recovery" instead?

I never made that association before, but now I cannot unsee it :-). I 
changed it to XLogRecoveryCtl.

>> TimeLineID	PrevTimeLineID;
>> TransactionId oldestActiveXID;
>> bool		promoted = false;
>> EndOfWalRecoveryInfo *endofwal;
>> bool		haveTblspcMap;
> 
>    This is just a matter of taste but the "endofwal" looks somewhat
>    alien in the variables.

Changed to "endOfRecoveryInfo".

> 
> xlog.c:
> +void
> +SwitchIntoArchiveRecovery(XLogRecPtr EndRecPtr)
> 
>    Isn't this a function of xlogrecovery.c?  Or rather isn't
>    minRecoveryPoint-related stuff of xlogrecovery.c?

Updating the control file is xlog.c's responsibility. There are two 
different minRecoveryPoints:

1. xlogrecovery.c has a copy of the minRecoveryPoint from the control 
file, so that it knows when we have reached consistency.

2. xlog.c is responsible for updating the minRecoveryPoint in the 
control file, after consistency has been reached.

SwitchIntoArchiveRecovery() is called on the transition.

- Heikki


В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
Сообщение: Re: Split xlog.c
От: Andres Freund
Дата:
FAQ