pgsql: In GIN recompression code, use mmemove rather than memcpy, for v - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: In GIN recompression code, use mmemove rather than memcpy, for v
Date
Msg-id E1W6cRq-0002po-4v@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
In GIN recompression code, use mmemove rather than memcpy, for vacuum.

When vacuuming a data leaf page, any compressed posting lists that are not
modified, are copied back to the buffer from a later location in the same
buffer rather than from  a palloc'd copy. IOW, they are just moved
downwards in the same buffer. Because the source and destination addresses
can overlap, we must use memmove rather than memcpy.

Report and fix by Alexander Korotkov.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/398cf255ad50db86ca665b75582317d4e795242a

Modified Files
--------------
src/backend/access/gin/gindatapage.c |   15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: ALTER TABLESPACE ... MOVE ... OWNED BY
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix off-by-one in newly-introdcued GIN assertion.