pgsql: In GIN recompression code, use mmemove rather than memcpy, for v

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: In GIN recompression code, use mmemove rather than memcpy, for v
Date: 2014-01-24 08:49:10
Message-ID: E1W6cRq-0002po-4v@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-24 09:19:02 pgsql: Fix off-by-one in newly-introdcued GIN assertion.
Previous Message Stephen Frost 2014-01-24 04:56:54 pgsql: ALTER TABLESPACE ... MOVE ... OWNED BY