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-05 07:58:48 |
Message-ID: | FA966664-92C1-4923-B70D-D1F00B13C838@yandex.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2017-05-05 08:02:09 | Re: password_encryption, default and 'plain' support |
Previous Message | Amit Kapila | 2017-05-05 07:49:57 | Re: [PROPOSAL] Use SnapshotAny in get_actual_variable_range |