[HACKERS] segfault in hot standby for hash indexes - Mailing list pgsql-hackers

From Jeff Janes
Subject [HACKERS] segfault in hot standby for hash indexes
Date
Msg-id CAMkU=1w-9Qe=Ff1o6bSaXpNO9wqpo7_9GL8_CVhw4BoVVHasqg@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] segfault in hot standby for hash indexes  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Against an unmodified HEAD (17fa3e8), I got a segfault in the hot standby.

Using the attached files, I start the test case like this:

nice sh do_nocrash_sr.sh >& do_nocrash_sr.err &

And start the replica like:

rm -r /tmp/data2_replica/ ; 
psql -p 9876 -c "select pg_create_physical_replication_slot('foo')"; 
~/pgsql/pure_origin/bin/pg_basebackup -p 9876 -D /tmp/data2_replica -R -S foo;
~/pgsql/pure_origin/bin/pg_ctl start -D /tmp/data2_replica/ -o "--port=9874"
 
After less than a minute, the replica fails.

#0  0x00000000004b85fe in hash_xlog_vacuum_get_latestRemovedXid (record=0x1925418) at hash_xlog.c:1006
1006                    iitemid = PageGetItemId(ipage, unused[i]);
(gdb) bt
#0  0x00000000004b85fe in hash_xlog_vacuum_get_latestRemovedXid (record=0x1925418) at hash_xlog.c:1006
#1  0x00000000004b881f in hash_xlog_vacuum_one_page (record=0x1925418) at hash_xlog.c:1113
#2  0x00000000004b8bed in hash_redo (record=0x1925418) at hash_xlog.c:1217
#3  0x000000000051a96c in StartupXLOG () at xlog.c:7152
#4  0x0000000000789ffb in StartupProcessMain () at startup.c:216
#5  0x000000000052d617 in AuxiliaryProcessMain (argc=2, argv=0x7fffe7661500) at bootstrap.c:421
#6  0x00000000007890cf in StartChildProcess (type=StartupProcess) at postmaster.c:5256
#7  0x000000000078419d in PostmasterMain (argc=4, argv=0x18fc300) at postmaster.c:1329
#8  0x00000000006cd78e in main (argc=4, argv=0x18fc300) at main.c:228

'unused' is NULL at that point.

Cheers,

Jeff
Attachment

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags
Next
From: Antonin Houska
Date:
Subject: Re: [HACKERS] Partition-wise aggregation/grouping