I was debugging the GIN index issue today and noticed my postgresqlsession which I used to run amcheck eats too much memory. PFA fix.
-- Best regards,Kirill Reshke