pgsql: Fix segment_bins corruption in dsa.c.

2018-09-19 Thread Thomas Munro
Fix segment_bins corruption in dsa.c. If a segment has been freed by dsa.c because it is entirely empty, other backends must make sure to unmap it before following links to new segments that might happen to have the same index number, or they could finish up looking at a defunct segment and then c

pgsql: Fix segment_bins corruption in dsa.c.

2018-09-19 Thread Thomas Munro
Fix segment_bins corruption in dsa.c. If a segment has been freed by dsa.c because it is entirely empty, other backends must make sure to unmap it before following links to new segments that might happen to have the same index number, or they could finish up looking at a defunct segment and then c

pgsql: Fix segment_bins corruption in dsa.c.

2018-09-19 Thread Thomas Munro
Fix segment_bins corruption in dsa.c. If a segment has been freed by dsa.c because it is entirely empty, other backends must make sure to unmap it before following links to new segments that might happen to have the same index number, or they could finish up looking at a defunct segment and then c