Is this non-volatile pointer access OK?

Поиск
Список
Период
Сортировка
От Daniel Farina
Тема Is this non-volatile pointer access OK?
Дата
Msg-id CAAZKuFbr+KnpDgCP4tCDxMzKEqD096FzipMP_8Ra_iZF9nsnMg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is this non-volatile pointer access OK?
Список pgsql-hackers
http://doxygen.postgresql.org/xlog_8c_source.html#l08197

On line 8197 of xlog.c:

08194     /* Get a local copy of the last safe checkpoint record. */
08195     SpinLockAcquire(&xlogctl->info_lck);
08196     lastCheckPointRecPtr = xlogctl->lastCheckPointRecPtr;
08197     memcpy(&lastCheckPoint, &XLogCtl->lastCheckPoint, sizeof(CheckPoint));
08198     SpinLockRelease(&xlogctl->info_lck);

Note the use of capital XLogCtl->lastCheckPoint, which is not the
volatile pointer.

I found this while scouring the code trying to figure out Bug #6291,
which is the (to my latest knowledge) is when the epoch is not
incremented (sometimes) when passing wraparound.

-- 
fdr



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

Предыдущее
От: Daniel Farina
Дата:
Сообщение: Re: [GENERAL] Multiple Slave Failover with PITR
Следующее
От: Dave Page
Дата:
Сообщение: Re: _USE_32BIT_TIME_T Patch