Re: [HACKERS] [hackers]development suggestion needed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [hackers]development suggestion needed
Date
Msg-id 29354.947862686@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [hackers]development suggestion needed  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: [HACKERS] [hackers]development suggestion needed
List 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 by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] [hackers]development suggestion needed
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] [hackers]development suggestion needed