Hi Jesper, > However (master / WAL v7 / MV v4), > > --- ddl.sql --- > CREATE TABLE test AS SELECT generate_series(1, 10) AS id, 0 AS val; > CREATE INDEX IF NOT EXISTS idx_id ON test USING hash (id); > CREATE INDEX IF NOT EXISTS idx_val ON test USING hash (val); > ANALYZE; > --- ddl.sql --- > > --- test.sql --- > \set id random(1,10) > \set val random(0,10) > BEGIN; > DELETE FROM test WHERE id = :id; > INSERT INTO test VALUES (:id, :val); > COMMIT; > --- test.sql --- > > gives > > #9 0x000000000098a83e in elog_finish (elevel=20, fmt=0xb6ea92 "incorrect > local pin count: %d") at elog.c:1378 > #10 0x00000000007f0b33 in LockBufferForCleanup (buffer=1677) at > bufmgr.c:3605 > #11 0x0000000000549390 in XLogReadBufferForRedoExtended (record=0x2afced8, > block_id=1 '\001', mode=RBM_NORMAL, get_cleanup_lock=1 '\001', > buf=0x7ffe3ee27c8c) at xlogutils.c:394 > #12 0x00000000004c5026 in hash_xlog_vacuum_one_page (record=0x2afced8) at > hash_xlog.c:1109 > #13 0x00000000004c5547 in hash_redo (record=0x2afced8) at hash_xlog.c:1214 > #14 0x000000000053a361 in StartupXLOG () at xlog.c:6975 > #15 0x00000000007a4ca0 in StartupProcessMain () at startup.c:216 > > on the slave instance in a master-slave setup.
Thanks for reporting this problem. It is basically coming because i forgot to unpin the bucketbuf in hash_xlog_vacuum_one_page(). Please find the attached v5 patch that fixes the issue. > > Also, the src/backend/access/README file should be updated with a > description of the changes which this patch provides. okay, I have updated the insertion algorithm in the README file. -- With Regards, Ashutosh Sharma EnterpriseDB: http://www.enterprisedb.com
microvacuum_hash_index_v5.patch
Description: invalid/octet-stream
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers