Re: old_snapshot_threshold's interaction with hash index
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-05-03T15:45:05Z
Lists: pgsql-hackers
On Mon, May 2, 2016 at 04:02:35PM -0500, Kevin Grittner wrote: > On Sun, May 1, 2016 at 1:43 AM, Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Sun, May 1, 2016 at 12:05 PM, Amit Kapila <amit.kapila16@gmail.com> wrote: > >> > >> Currently we do the test for old snapshot (TestForOldSnapshot) for hash > >> indexes while scanning them. Does this test makes any sense for hash > >> indexes considering LSN on hash index will always be zero (as hash indexes > >> are not WAL-logged)? It seems to me that PageLSN check in > >> TestForOldSnapshot() will always return false which means that the error > >> "snapshot too old" won't be generated for hash indexes. > >> > >> Am I missing something here, if not, then I think we need a way to > >> prohibit pruning for hash indexes based on old_snapshot_threshold? > > > > What I mean to say here is prohibit pruning the relation which has hash > > index based on old_snapshot_threshold. > > Good spot; added to the open issues page. Uh, I have no idea how this would be fixed if the PageLSN is zero. Do you? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Commits
-
Avoid catalog lookups in RelationAllowsEarlyPruning().
- eeb68c1cddf3 10.11 landed
- b9c4ccfefca0 11.6 landed
- 8cc6016a8cd4 12.0 landed
- 720b59b55b84 13.0 landed