Program received signal SIGSEGV, Segmentation fault.
0x000000000064e6fc in advance_transition_function (aggstate=0x11405c0, peraggstate=0x1143540, pergroupstate=0x8) at nodeAgg.c:465
465                     if (pergroupstate->noTransValue)
(gdb) bt
#0  0x000000000064e6fc in advance_transition_function (aggstate=0x11405c0, peraggstate=0x1143540, pergroupstate=0x8) at nodeAgg.c:465
#1  0x000000000064eb0e in advance_aggregates (aggstate=0x11405c0, pergroup=0x8) at nodeAgg.c:621
#2  0x00000000006502a7 in agg_fill_hash_table (aggstate=0x11405c0) at nodeAgg.c:1584
#3  0x000000000064fc3f in ExecAgg (node=0x11405c0) at nodeAgg.c:1289
#4  0x000000000063c754 in ExecProcNode (node=0x11405c0) at execProcnode.c:476
#5  0x000000000063a483 in ExecutePlan (estate=0x11404a8, planstate=0x11405c0, operation=CMD_SELECT, sendTuples=1 '\001', numberTuples=0, direction=ForwardScanDirection, dest=0xd487c0 <donothingDR>) at execMain.c:1475
#6  0x0000000000638675 in standard_ExecutorRun (queryDesc=0x113e658, direction=ForwardScanDirection, count=0) at execMain.c:308
#7  0x000000000063850d in ExecutorRun (queryDesc=0x113e658, direction=ForwardScanDirection, count=0) at execMain.c:256
#8  0x00000000005d7fab in ExplainOnePlan (plannedstmt=0x113e5c0, into=0x0, es=0x7fffbb7a4d50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0, 
    planduration=0x7fffbb7a4cd0) at explain.c:481
#9  0x00000000005d7c98 in ExplainOneQuery (query=0x10fcc10, into=0x0, es=0x7fffbb7a4d50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0) at explain.c:336
#10 0x00000000005d791c in ExplainQuery (stmt=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0, dest=0x10fcb40) at explain.c:227
#11 0x00000000007a0ceb in standard_ProcessUtility (parsetree=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, 
    dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at utility.c:651
#12 0x00000000007a0499 in ProcessUtility (parsetree=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, 
    dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at utility.c:311
#13 0x000000000079f5b2 in PortalRunUtility (portal=0x112e2d8, utilityStmt=0x10e4b50, isTopLevel=1 '\001', dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at pquery.c:1187
#14 0x000000000079f316 in FillPortalStore (portal=0x112e2d8, isTopLevel=1 '\001') at pquery.c:1061
#15 0x000000000079ec3a in PortalRun (portal=0x112e2d8, count=9223372036854775807, isTopLevel=1 '\001', dest=0x10a5658, altdest=0x10a5658, completionTag=0x7fffbb7a5180 "") at pquery.c:785
#16 0x0000000000798d9a in exec_simple_query (query_string=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;") at postgres.c:1045
#17 0x000000000079cf40 in PostgresMain (argc=1, argv=0x108bd30, dbname=0x108bb98 "test", username=0x108bb78 "tomas") at postgres.c:4010
#18 0x0000000000725a48 in BackendRun (port=0x10ab1e0) at postmaster.c:4113
#19 0x0000000000725184 in BackendStartup (port=0x10ab1e0) at postmaster.c:3787
#20 0x0000000000721a51 in ServerLoop () at postmaster.c:1566
#21 0x00000000007210fe in PostmasterMain (argc=3, argv=0x108a910) at postmaster.c:1219
#22 0x0000000000683fef in main (argc=3, argv=0x108a910) at main.c:219
(gdb) 
#0  0x000000000064e6fc in advance_transition_function (aggstate=0x11405c0, peraggstate=0x1143540, pergroupstate=0x8) at nodeAgg.c:465
#1  0x000000000064eb0e in advance_aggregates (aggstate=0x11405c0, pergroup=0x8) at nodeAgg.c:621
#2  0x00000000006502a7 in agg_fill_hash_table (aggstate=0x11405c0) at nodeAgg.c:1584
#3  0x000000000064fc3f in ExecAgg (node=0x11405c0) at nodeAgg.c:1289
#4  0x000000000063c754 in ExecProcNode (node=0x11405c0) at execProcnode.c:476
#5  0x000000000063a483 in ExecutePlan (estate=0x11404a8, planstate=0x11405c0, operation=CMD_SELECT, sendTuples=1 '\001', numberTuples=0, direction=ForwardScanDirection, dest=0xd487c0 <donothingDR>) at execMain.c:1475
#6  0x0000000000638675 in standard_ExecutorRun (queryDesc=0x113e658, direction=ForwardScanDirection, count=0) at execMain.c:308
#7  0x000000000063850d in ExecutorRun (queryDesc=0x113e658, direction=ForwardScanDirection, count=0) at execMain.c:256
#8  0x00000000005d7fab in ExplainOnePlan (plannedstmt=0x113e5c0, into=0x0, es=0x7fffbb7a4d50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0, 
    planduration=0x7fffbb7a4cd0) at explain.c:481
#9  0x00000000005d7c98 in ExplainOneQuery (query=0x10fcc10, into=0x0, es=0x7fffbb7a4d50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0) at explain.c:336
#10 0x00000000005d791c in ExplainQuery (stmt=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", params=0x0, dest=0x10fcb40) at explain.c:227
#11 0x00000000007a0ceb in standard_ProcessUtility (parsetree=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, 
    dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at utility.c:651
#12 0x00000000007a0499 in ProcessUtility (parsetree=0x10e4b50, queryString=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, 
    dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at utility.c:311
#13 0x000000000079f5b2 in PortalRunUtility (portal=0x112e2d8, utilityStmt=0x10e4b50, isTopLevel=1 '\001', dest=0x10fcb40, completionTag=0x7fffbb7a4f90 "") at pquery.c:1187
#14 0x000000000079f316 in FillPortalStore (portal=0x112e2d8, isTopLevel=1 '\001') at pquery.c:1061
#15 0x000000000079ec3a in PortalRun (portal=0x112e2d8, count=9223372036854775807, isTopLevel=1 '\001', dest=0x10a5658, altdest=0x10a5658, completionTag=0x7fffbb7a5180 "") at pquery.c:785
#16 0x0000000000798d9a in exec_simple_query (query_string=0x10e3668 "explain analyze select fk_id, count(*) from table_b where val_a < 50 and val_b < 50 group by 1;") at postgres.c:1045
#17 0x000000000079cf40 in PostgresMain (argc=1, argv=0x108bd30, dbname=0x108bb98 "test", username=0x108bb78 "tomas") at postgres.c:4010
#18 0x0000000000725a48 in BackendRun (port=0x10ab1e0) at postmaster.c:4113
#19 0x0000000000725184 in BackendStartup (port=0x10ab1e0) at postmaster.c:3787
#20 0x0000000000721a51 in ServerLoop () at postmaster.c:1566
#21 0x00000000007210fe in PostmasterMain (argc=3, argv=0x108a910) at postmaster.c:1219
#22 0x0000000000683fef in main (argc=3, argv=0x108a910) at main.c:219