Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwIhO-0008He-2g for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 20:38:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TwIhM-000544-MR for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 20:38:00 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwIhL-00053a-5I for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 20:37:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwIhJ-0002V6-CR for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 20:37:58 +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 r0IKbl0f028624; Fri, 18 Jan 2013 15:37:48 -0500 (EST) From: Tom Lane To: Alvaro Herrera cc: Erik Rijkers , Kevin Grittner , pgsql-hackers@postgresql.org, Andres Freund Subject: Re: foreign key locks In-reply-to: <20130118200204.GH4063@alvh.no-ip.org> References: <20121129152326.69330@gmx.com> <20121129160220.GA4942@alvh.no-ip.org> <20121129161654.GB4942@alvh.no-ip.org> <20121228204847.GD4150@alvh.no-ip.org> <20130110210040.GB4110@alvh.no-ip.org> <20130118200204.GH4063@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Fri, 18 Jan 2013 17:02:04 -0300" Date: Fri, 18 Jan 2013 15:37:47 -0500 Message-ID: <28623.1358541467@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Alvaro Herrera writes: > The reason is that there is an (unknown to me) rule that there must be > some data not associated with a buffer: > /* > * NOTE: We disallow len == 0 because it provides a useful bit of extra > * error checking in ReadRecord. This means that all callers of > * XLogInsert must supply at least some not-in-a-buffer data. [...] > */ > This seems pretty strange to me. And having the rule be spelled out > only in a comment within XLogInsert and not at its top, and not nearby > the XLogRecData struct definition either, seems pretty strange to me. > I wonder how come every PG hacker except me knows this. I doubt it ever came up before. What use is logging only the content of a buffer page? Surely you'd need to know, for example, which relation and page number it is from. 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