Re: Stuck spins in current

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stuck spins in current
Дата
Msg-id 29094.984785107@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stuck spins in current  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
Список pgsql-hackers
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> Alternatively, could we avoid holding that lock while initializing a
>> new log segment?

> How to synchronize with checkpoint-er if wal_files > 0?

I was sort of visualizing assigning the created xlog files dynamically:
create a temp file of a PID-dependent namefill it with zeroes and fsync itacquire ControlFileLockIdrename temp file
intoplace as next uncreated segmentupdate pg_controlrelease ControlFileLockId
 

Since the things are just filled with 0's, there's no need to know which
segment it will be while you're filling it.

This would leave you sometimes with more advance files than you really
needed, but so what ...

> And you know - I've run same tests on ~ Mar 9 snapshot
> without any problems.

That was before I changed the code to pre-fill the file --- now it takes
longer to init a log segment.  And we're only using a plain SpinAcquire,
not the flavor with a longer timeout.
        regards, tom lane


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

Предыдущее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: Stuck spins in current
Следующее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: Stuck spins in current