aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2018-02-01 15:21:13 -0500
committerRobert Haas <rhaas@postgresql.org>2018-02-01 15:31:31 -0500
commitb94988fad56167915231d3d2b275c471914301fe (patch)
treebd959e04d0a499c3277ebba9e6e2a7000b0f8477 /src
parent94a2b075779b599c6ee21f04cfafdd68cd84797d (diff)
downloadpostgresql-b94988fad56167915231d3d2b275c471914301fe.tar.gz
postgresql-b94988fad56167915231d3d2b275c471914301fe.zip
Fix possible failure to mark hash metapage dirty.
Report and suggested fix by Lixian Zou. Amit Kapila put it in the form of a patch and reviewed. Discussion: http://postgr.es/m/151739848647.1239.12528851873396651946@wrigleys.postgresql.org
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/hash/hashovfl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c
index c206e704d4d..912e38ca71e 100644
--- a/src/backend/access/hash/hashovfl.c
+++ b/src/backend/access/hash/hashovfl.c
@@ -341,9 +341,10 @@ found:
metap->hashm_mapp[metap->hashm_nmaps] = BufferGetBlockNumber(newmapbuf);
metap->hashm_nmaps++;
metap->hashm_spares[splitnum]++;
- MarkBufferDirty(metabuf);
}
+ MarkBufferDirty(metabuf);
+
/*
* for new overflow page, we don't need to explicitly set the bit in
* bitmap page, as by default that will be set to "in use".