Re: shared_buffers, wal_buffers, WAL files, data files

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: shared_buffers, wal_buffers, WAL files, data files
Дата
Msg-id 475842EF.5090901@lelarge.info
обсуждение исходный текст
Ответ на Re: shared_buffers, wal_buffers, WAL files, data files  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: shared_buffers, wal_buffers, WAL files, data files  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Tom Lane a écrit :
> Guillaume Lelarge <guillaume@lelarge.info> writes:
>> I try to answer a simple question : what happens when I do a simple
>> "INSERT" on a just started PostgreSQL server.
> 
>> From what I understand with the INSERT statement, here is what happens :
>>  * backend loads first (and only) block from footable file into a shared
>>    buffer
>>  * it modifies this block on the shared buffer, and sets it as dirty
> 
> Right, and it also makes a WAL log entry about this action.
> 

The WAL log entry is made on the wal buffers (in memory). As soon as
this statement is commited (in my example, it's right now, but in a
BEGIN ... COMMIT statement, at COMMIT time), the wal buffer is flushed
on WAL files. It can be flushed before if wal buffer is not big enough
to contain all the current transactions. Am I right ?

Thanks for your answer, I think I better understand the complete process.

Regards.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pg_dump and BINARY mode COPY
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: shared_buffers, wal_buffers, WAL files, data files