Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ8d3-0000r8-LE for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Apr 2013 03:56:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQ8d2-00033T-WC for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Apr 2013 03:56:53 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ8d1-00033J-Rf; Thu, 11 Apr 2013 03:56:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ8cv-0007bp-I6; Thu, 11 Apr 2013 03:56:51 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3B3uifB019285; Wed, 10 Apr 2013 23:56:45 -0400 (EDT) From: Tom Lane To: Gurjeet Singh cc: PostgreSQL Docs , PGSQL Hackers Subject: Re: [DOCS] synchronize_seqscans' description is a bit misleading In-reply-to: References: <18280.1365649805@sss.pgh.pa.us> Comments: In-reply-to Gurjeet Singh message dated "Wed, 10 Apr 2013 23:39:38 -0400" Date: Wed, 10 Apr 2013 23:56:44 -0400 Message-ID: <19284.1365652604@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Gurjeet Singh writes: > On Wed, Apr 10, 2013 at 11:10 PM, Tom Lane wrote: >> The point you're missing is that the synchronization is self-enforcing: > Let's consider a pathological case where a scan is performed by a user > controlled cursor, whose scan speed depends on how fast the user presses > the "Next" button, then this scan is quickly going to fall out of sync with > other scans. Moreover, if a new scan happens to pick up the block reported > by this slow scan, then that new scan may have to read blocks off the disk > afresh. Sure --- if a backend stalls completely, it will fall out of the synchronized group. And that's a good thing; we'd surely not want to block the other queries while waiting for a user who just went to lunch. > So, again, it is not guaranteed that all the scans on a relation will > synchronize with each other. Hence my proposal to include the term > 'probability' in the definition. Yeah, it's definitely not "guaranteed" in any sense. But I don't really think your proposed wording is an improvement. The existing wording isn't promising guaranteed sync either, to my eyes. Perhaps we could compromise on, say, changing "so that concurrent scans read the same block at about the same time" to "so that concurrent scans tend to read the same block at about the same time", or something like that. I don't mind making it sound a bit more uncertain, but I don't think that we need to emphasize the probability of failure. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers