Thomas Munro <thomas.mu...@gmail.com> writes: > However, I noticed in passing that RemoveLocalLock() accesses > *locallock after removing it from the hash table (in assertion builds > only). So one question I have is whether it's actually a programming > rule that you can't do that (at most you can compare the pointer > against NULL), or whether it's supposed to be > safe-if-you-know-what-you're-doing, as the existing comments hints.
I'd say it's, at best, unwarranted familiarity with the dynahash implementation ... > Here also is a patch that does wipe_mem on removed elements, as > threatened last time this topic came up[1], which reveals the problem. ... one good reason being that it'll fail under this sort of entirely-reasonable debugging aid. Can we get rid of the unsafe access easily? regards, tom lane