Re: [HACKERS] [hackers]development suggestion needed
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] [hackers]development suggestion needed |
| Дата | |
| Msg-id | 29354.947862686@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] [hackers]development suggestion needed (Oleg Bartunov <oleg@sai.msu.su>) |
| Ответы |
Re: [HACKERS] [hackers]development suggestion needed
|
| Список | pgsql-hackers |
Oleg Bartunov <oleg@sai.msu.su> writes:
>> The selects that such sites spew forth are handled wonderfully
>> by Postgres now, with MVCC and the change that stops the update
>> of pg_log after read-only selects.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Does plain 6.5.3 handle read-only selects in this way ?
AFAIR that logic is in 6.5.*. (Vadim would remember better, since he
put it in.) But keep in mind that a SELECT is read-only just to the
extent that it is hitting previously committed tuples. The first visit
to a newly committed-good or newly committed-dead tuple will cause an
update and write-back of the tuple's status flags --- whether that visit
happens in SELECT or anything else.
It occurs to me that the no-log-update logic could probably be improved
on. The test to see whether a log update is needed looks at whether any
buffers have been written. A SELECT that marks someone else's tuples as
known-committed will look like it needs to be committed in pg_log
... but it doesn't really need it. Perhaps Vadim is planning to fix
this in the WAL rewrite.
regards, tom lane
В списке pgsql-hackers по дате отправления: