Re: ALTER TABLE lock strength reduction patch is unsafe

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: ALTER TABLE lock strength reduction patch is unsafe
Дата
Msg-id CA+U5nMJk99ogge2ouWh-8nYZz9Fjr7mhWgNLbR78pTo98vdC6A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE lock strength reduction patch is unsafe  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jan 2, 2012 at 7:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch <noah@leadboat.com> wrote:
>>> On Mon, Jan 02, 2012 at 05:09:16PM +0000, Simon Riggs wrote:
>>>> Attached patch makes SnapshotNow into an MVCC snapshot,
>
>>> That's a neat trick.  However, if you start a new SnapshotNow scan while one is
>>> ongoing, the primordial scan's snapshot will change mid-stream.
>
>> Do we ever do that?
>
> Almost certainly yes.  For example, a catcache load may invoke catcache
> or relcache reload operations on its way to opening the table or index
> needed to fetch the desired row.

Ah, of course. I was thinking they would be rare by design.

> I think you can only safely do this if each caller has its own snapshot
> variable, a la SnapshotDirty, and that's going to be hugely more
> invasive.

OK, will look into it.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: ALTER TABLE lock strength reduction patch is unsafe
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: ALTER TABLE lock strength reduction patch is unsafe