Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range
| От | Dmitriy Sarafannikov |
|---|---|
| Тема | Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range |
| Дата | |
| Msg-id | FA966664-92C1-4923-B70D-D1F00B13C838@yandex.ru обсуждение исходный текст |
| Ответ на | Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range (Amit Kapila <amit.kapila16@gmail.com>) |
| Ответы |
Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range
|
| Список | pgsql-hackers |
Amit, thanks for comments!
> 1.
> +#define InitNonVacuumableSnapshot(snapshotdata) \
> + do { \
> + (snapshotdata).satisfies = HeapTupleSatisfiesNonVacuumable; \
> + (snapshotdata).xmin = RecentGlobalDataXmin; \
> + } while(0)
> +
>
> Can you explain and add comments why you think RecentGlobalDataXmin is
> the right to use it here? As of now, it seems to be only used for
> pruning non-catalog tables.
Can you explain me, what value for xmin should be used there?
> 2.
> +bool
> +HeapTupleSatisfiesNonVacuumable(HeapTuple htup, Snapshot snapshot,
> + Buffer buffer)
> +{
> + return HeapTupleSatisfiesVacuum(htup, snapshot->xmin, buffer)
> + != HEAPTUPLE_DEAD;
> +}
> +
>
> Add comments on top of this function and for the sake of consistency
> update the file header as well (Summary of visibility functions:)
Yes, i will add comments and send new patch.
В списке pgsql-hackers по дате отправления: