Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Jim C. Nasby" <jnasby@pervasive.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Andrew Dunstan <andrew@dunslane.net>, simon@2ndquadrant.com, kleptog@svana.org, gsstark@mit.edu, pg@rbt.ca, zhouqq@cs.toronto.edu, pgsql-hackers@postgresql.org
Date: 2006-01-03T16:48:01Z
Lists: pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes: > On Tue, Jan 03, 2006 at 11:26:51AM -0500, Tom Lane wrote: >> Such an ALTER would certainly require exclusive lock on the table, >> so I'm not sure that I see much use-case for doing it like that. >> You'd want to do the ALTER and commit so as not to lock other people >> out of the table entirely while doing the bulk data-pushing. > Maybe this just isn't clear, but would EXCLUSIVE block writes from all > other sessions then? I don't think it should (which implies that EXCLUSIVE is a bad name). My point is that ALTER RELIABILITY would have to gain exclusive lock for long enough to change the table's reliability marking --- you have to synchronize such a change with other transactions' activity on the table, and table-level locks are the only mechanism we have for that. It's not different from a schema change such as adding a column. regards, tom lane