Re: Tracking latest timeline in standby mode

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tracking latest timeline in standby mode
Date: 2011-03-07 19:16:55
Message-ID: 4D752F27.40707@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07.03.2011 14:35, Fujii Masao wrote:
> Comments:
>
> + if (!list_member_int(expectedTLIs,
> + (int) recoveryTargetTLI))
> + ereport(LOG,
> + (errmsg("new timeline %u is not a child of database system timeline %u",
>
> We should check whether recoveryTargetTLI is a member of newExpectedTLIs
> instead of expectedTLIs?

Thanks, fixed.

>> + /* Switch target */
>>
>> + recoveryTargetTLI = newtarget;
>> + expectedTLIs = newExpectedTLIs;
>>
>> Before "expectedTLIs = newExpectedTLIs", we should call
>> list_free_deep(expectedTLIs)?
>>
>> It's an integer list so list_free(expectedTLIs) is enough, and I doubt that leakage will ever be a problem in practice, but in principle you're right.
>
> True. But I think that it's good habit to fix a leakage no matter how
> small it's.

Ah, thanks for the reminder.

Added that and committed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-03-07 19:17:25 Re: How should the primary behave when the sync standby goes away? Re: Sync Rep v17
Previous Message Heikki Linnakangas 2011-03-07 19:16:05 pgsql: If recovery_target_timeline is set to 'latest' and standby mode