RE: [COMMITTERS] pgsql/src/backend/access/transam (xact.c xlog.c)

Поиск
Список
Период
Сортировка
От Mikheev, Vadim
Тема RE: [COMMITTERS] pgsql/src/backend/access/transam (xact.c xlog.c)
Дата
Msg-id 8F4C99C66D04D4118F580090272A7A234D3147@sectorbase1.sectorbase.com
обсуждение исходный текст
Ответы Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (xact.c xlog.c)  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
> > New CHECKPOINT command.
> > Auto removing of offline log files and creating new file
> > at checkpoint time.
> 
> Is this the same as a SAVEPOINT?

No. Checkpoints are to speedup after crash recovery and
to remove/archive log files. With WAL server doesn't write
any datafiles on commit, only commit record goes to log
(and log fsync-ed). Dirty buffers remains in memory long
time - only when some transaction is going to use unpinned
dirty buffer its content will be written (but not fsync-ed)
to system buffer cache. So, at any time some changes made by
transactions would be saved on disk, others would be in system
cache and some of them in server buffer pool. In the event of
crash recoverer should know what changes are on disk, ie -
from what position in log it should try to start redo
operation ((re-)applying changes). Obviously, it's not
good to start from first log record -:) For this purposes
checkpoints are used. At checkpoint time (each ~ 3-5 minutes)
*all* dirty buffers is forced to disk and checkpoint record
is written to log, so recoverer will know that up to the
last record in log made before checkpoint started all changes
are on disk and redo is not required for previous records.

Vadim


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Alternative database locations are broken
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: problems with configure