From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, matioli(dot)matheus(at)gmail(dot)com, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, Максим Панченко <Panchenko(at)gw(dot)tander(dot)ru>, Сизов Сергей Павлович <sizov_sp(at)gw(dot)tander(dot)ru> |
Subject: | Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages |
Date: | 2014-01-14 01:15:59 |
Message-ID: | 25048.1389662159@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-01-13 23:29:59 +0200, Heikki Linnakangas wrote:
>> I don't think that saves us. standbyMode can be STANDBY_SNAPSHOT_READY,
>> before we reach consistency. Adding a check for reachedConsistency, though,
>> ought to fix it.
> Maybe we should just put LocalHotStandbyActive into xlog_internal.h?
> That'd be enough for the startup process. Or alternatively add a check
> for EnableHotStandby into HotStandbyActive() so we don't take the
> spinlock if it's not enabled?
After a little bit of research, I propose that we add a function like
this in xlog.c:
/*
* Like HotStandbyActive(), but to be used only in WAL replay code,
* where we don't need to ask any other process what the state is.
*/
bool
HotStandbyActiveStartup(void)
{
Assert(AmStartupProcess());
return LocalHotStandbyActive;
}
Any objections? Bikeshedding on the name?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-01-14 01:18:51 | Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages |
Previous Message | Tom Lane | 2014-01-13 23:55:39 | Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-01-14 01:18:51 | Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages |
Previous Message | James Bottomley | 2014-01-14 01:13:51 | Re: [Lsf-pc] Linux kernel impact on PostgreSQL performance |