Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3aC-0000oJ-TP for pgsql-docs@arkaria.postgresql.org; Tue, 12 Nov 2013 02:20:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vg3aC-0006LY-Bl for pgsql-docs@arkaria.postgresql.org; Tue, 12 Nov 2013 02:20:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3aB-0006KE-7D for pgsql-docs@postgresql.org; Tue, 12 Nov 2013 02:19:59 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3a8-0007MO-02 for pgsql-docs@postgresql.org; Tue, 12 Nov 2013 02:19:58 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Vg3a6-0003jG-BZ; Mon, 11 Nov 2013 21:19:54 -0500 Date: Mon, 11 Nov 2013 21:19:54 -0500 From: Bruce Momjian To: Tom Lane Cc: PostgreSQL-documentation Subject: Re: MVCC snapshot timing Message-ID: <20131112021954.GD15562@momjian.us> References: <20131111175737.GA15562@momjian.us> <13024.1384202385@sss.pgh.pa.us> <20131111205833.GC15562@momjian.us> <20331.1384221575@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="61jdw2sOBCFtR2d/" Content-Disposition: inline In-Reply-To: <20331.1384221575@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --61jdw2sOBCFtR2d/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 11, 2013 at 08:59:35PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Mon, Nov 11, 2013 at 03:39:45PM -0500, Tom Lane wrote: > >> I'm not really seeing the point of s/transaction/session/ here. > > > Well, the problem with the original wording is that we don't take a new > > snapshot for every transaction in the default read-committed mode. > > We take at least one snapshot per transaction, in any mode. Referring > to sessions makes it even further away from being a useful concept. > > > Would you prefer I refer to statements, e.g.: > > 'Statement' might work. OK, updated patch attached. Is "statement" too vague here? SQL statement? query? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --61jdw2sOBCFtR2d/ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="mvcc.diff" diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml new file mode 100644 index cefd323..7d6e75b *** a/doc/src/sgml/mvcc.sgml --- b/doc/src/sgml/mvcc.sgml *************** *** 41,52 **** for developers to manage concurrent access to data. Internally, data consistency is maintained by using a multiversion model (Multiversion Concurrency Control, MVCC). ! This means that while querying a database each transaction sees a snapshot of data (a database version) as it was some time ago, regardless of the current state of the underlying data. ! This protects the transaction from viewing inconsistent data that ! could be caused by (other) concurrent transaction updates on the same data rows, providing transaction isolation for each database session. MVCC, by eschewing the locking methodologies of traditional database systems, --- 41,52 ---- for developers to manage concurrent access to data. Internally, data consistency is maintained by using a multiversion model (Multiversion Concurrency Control, MVCC). ! This means that while querying a database each statement sees a snapshot of data (a database version) as it was some time ago, regardless of the current state of the underlying data. ! This prevents statements from viewing inconsistent data produced ! by concurrent transactions performing updates on the same data rows, providing transaction isolation for each database session. MVCC, by eschewing the locking methodologies of traditional database systems, --61jdw2sOBCFtR2d/ Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --61jdw2sOBCFtR2d/--