diff options
author | Amit Kapila <akapila@postgresql.org> | 2019-03-01 07:38:47 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2019-03-01 07:38:47 +0530 |
commit | 9c32e4c35026bd52aaf340bfe7594abc653e42f0 (patch) | |
tree | 852d49369f2dcfb933ea4035430b06dc53f0269d /src/backend/access | |
parent | 0f3cdf873e7d81fbf61965e13685595c8a23c322 (diff) | |
download | postgresql-9c32e4c35026bd52aaf340bfe7594abc653e42f0.tar.gz postgresql-9c32e4c35026bd52aaf340bfe7594abc653e42f0.zip |
Clear the local map when not used.
After commit b0eaa4c51b, we use a local map of pages to find the required
space for small relations. We do clear this map when we have found a block
with enough free space, when we extend the relation, or on transaction
abort so that it can be used next time. However, we miss to clear it when
we didn't find any pages to try from the map which leads to an assertion
failure when we later tried to use it after relation extension.
In the passing, I have improved some comments in this area.
Reported-by: Tom Lane based on buildfarm results
Author: Amit Kapila
Reviewed-by: John Naylor
Tested-by: Kuntal Ghosh
Discussion: https://postgr.es/m/32368.1551114120@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/heap/hio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index a9c8ec43a7b..69a7a23874f 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -675,10 +675,7 @@ loop: */ RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer)); - /* - * In case we used an in-memory map of available blocks, reset it for next - * use. - */ + /* This should already be cleared by now, but make sure it is. */ FSMClearLocalMap(); return buffer; |