Re: does dml operations load the blocks to the shared buffers ?

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: does dml operations load the blocks to the shared buffers ?
Дата
Msg-id CAECtzeWzp+PNXB6+OaQsUU5X2DwdDS6VToYSYvTtYq0sv3DD-w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: does dml operations load the blocks to the shared buffers ?  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Список pgsql-performance
Le jeu. 10 janv. 2019 à 11:40, Mariel Cherkassky <mariel.cherkassky@gmail.com> a écrit :
. Lets assume the amount of data I insert is bigger than the shared_buffers. I didnt commit the transaction yet, the data will be saved on temp files until I commit ? 
What happens if I have in my transaction,I did a lot of changes and I filled the wal_buffers / shared buffers but I still didnt commit. How the database will handle it ?

Please, don't top-post. It makes it hard to follow the thread.

Whatever happens, it will get to disk in the data files, and it doesn't actually matter. The database has system informations on the datafiles (on each tuple actually) that will allow to make the distinction between commited tuples, rollbacked tuples and not-yet-committed-or-rollbacked tuples.


‫בתאריך יום ה׳, 10 בינו׳ 2019 ב-10:55 מאת ‪Guillaume Lelarge‬‏ <‪guillaume@lelarge.info‬‏>:‬
Le jeu. 10 janv. 2019 à 09:07, Mariel Cherkassky <mariel.cherkassky@gmail.com> a écrit :
Hey,
It is clear that when we query some data, if that data isnt in the shared buffers pg will go bring the relevant blocks from the disk to the shared buffers. I wanted to ask if the same logic works with dml(insert/update/delete). I'm familiar with the writing logic, that the checkpointer is the process that writing the data changes into the data files during every checkpoint and that the commit write the changes from the wal buffers to to the wal files. I wanted to ask about a situation where we run dmls and that data isnt available in the shared buffers.


It works the same.


--
Guillaume.


--
Guillaume.

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

Предыдущее
От: Thomas Güttler
Дата:
Сообщение: Detect missing combined indexes (automatically)
Следующее
От: Jim Finnerty
Дата:
Сообщение: Re: Detect missing combined indexes (automatically)