Re: WORM and Read Only Tables (v0.1)
От | Simon Riggs |
---|---|
Тема | Re: WORM and Read Only Tables (v0.1) |
Дата | |
Msg-id | 1197387096.4255.1343.camel@ebony.site обсуждение исходный текст |
Ответ на | Re: WORM and Read Only Tables (v0.1) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Tue, 2007-12-11 at 10:19 -0500, Tom Lane wrote: > Simon Riggs <simon@2ndquadrant.com> writes: > > This command will place a ShareLock (only) on the table, preventing > > anybody from writing to the table while we freeze it. The ShareLock is > > incompatible with any transaction that has written to the table, so when > > we acquire the lock all writers to the table will have completed. We > > then run the equivalent of a VACUUM FREEZE which will then be able to > > freeze *all* rows in one pass (rather than all except the most > > recent). > > This breaks MVCC. The fact that a transaction has completed is not > license to discard tuple xmin immediately. Yeh, agreed. I knew I'd solved that bit, so I was focused elsewhere. Sloppy, so apologies. I was originally planning to put a wait in at the beginning, as is used by CREATE INDEX CONCURRENTLY, though I prefer Greg's variant because it's more forgiving. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com
В списке pgsql-hackers по дате отправления: