Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.
Дата
Msg-id 27204.1505591941@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only oneReadControlFile() during startup.  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only oneReadControlFile() during startup.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-09-16 14:30:21 -0400, Tom Lane wrote:
>> I wonder whether we shouldn't just revert this patch altogether.

> The problem is that the patch that makes the segment size configurable
> also adds a bunch more ordering constraints due to the fact that the
> contents of the control file influence how much shared buffers are
> needed (via wal_buffers = -1, which requires the segment size, which is
> read from the control file).  Reading things in the wrong order leads to
> bad results too.

Maybe we could redefine wal_buffers to avoid that.  Or read the control
file at the time where we need it.  This does not seem like a problem
that justifies a system-wide change that's much more delicate than
you thought.

>> I'm now quite worried about whether we aren't introducing
>> hazards of using stale values from the file; if a system crash isn't
>> enough to get it to flush its cache, then what is?

> I don't think the problem here is stale values, it's "just" a stale
> pointer pointing into shared memory that gets reiniitalized?

The code that's crashing is attempting to install some pre-existing
copy of pg_control into shared memory.  Even if there were good reason
to think the copy were up to date, I'm not sure we should trust it
in a crash recovery context.  I'd rather see this hunk of code just
playing dumb and reading the file (which, I'm pretty sure, is what
it did up till this week).
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] valgrind vs. shared typmod registry
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only oneReadControlFile() during startup.