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

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

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.


> 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?

Greetings,

Andres Freund


-- 
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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] valgrind vs. shared typmod registry