Re: [PROPOSAL] Use SnapshotAny in get_actual_variable_range

From: Dmitriy Sarafannikov <dsarafannikov(at)yandex(dot)ru>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Borodin Vladimir <root(at)simply(dot)name>, Хомик Кирилл <khomikki(at)yandex-team(dot)ru>
Subject: Re: [PROPOSAL] Use SnapshotAny in get_actual_variable_range
Date: 2017-05-08 14:23:47
Message-ID: 7E8788BF-CEE3-4419-8AE0-6D7DCEDE701C@yandex.ru
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers


> + else \
> + (snapshotdata).xmin = \
> + TransactionIdLimitedForOldSnapshots(RecentGlobalDataXmin, \
> + relation); \
>
> I think we don't need to use TransactionIdLimitedForOldSnapshots() as
> that is required to override xmin for table vacuum/pruning purposes.
>
>> Maybe we need
>> to use GetOldestXmin()?
>
> It is a costly call as it needs ProcArrayLock, so I don't think it
> makes sense to use it here.

Ok, i agree. Patch is attached.

Attachment Content-Type Size
snapshot_non_vacuumable_v3.patch application/octet-stream 6.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-05-08 15:26:19 Re: Logical replication ApplyContext bloat
Previous Message Masahiko Sawada 2017-05-08 13:52:58 Re: PG 10 release notes