Program terminated with signal SIGSEGV, Segmentation fault. warning: Section `.reg-xstate/1569550' in core file too small. #0 VARATT_IS_EXTENDED (PTR=0x0) at ../../../../src/include/varatt.h:412 412 return !VARATT_IS_4B_U(PTR); (gdb) bt #0 VARATT_IS_EXTENDED (PTR=0x0) at ../../../../src/include/varatt.h:412 #1 pg_detoast_datum (datum=0x0) at fmgr.c:1798 #2 0x00005570aa359cf4 in DatumGetNumeric (X=0) at ../../../../src/include/utils/numeric.h:66 #3 numeric_avg_accum (fcinfo=0x5570b3cd0100) at numeric.c:5052 #4 0x00005570aa0cf318 in ExecAggPlainTransBatch (state=state@entry=0x5570b3cd0258, op=op@entry=0x5570b3cd0950, econtext=econtext@entry=0x5570b3cb4718) at execExprInterp.c:6171 #5 0x00005570aa0cb0aa in ExecInterpExpr (state=0x5570b3cd0258, econtext=0x5570b3cb4718, isnull=0x0) at execExprInterp.c:2338 #6 0x00005570aa0e73aa in ExecEvalExprNoReturn (state=0x5570b3cd0258, econtext=0x5570b3cb4718) at ../../../src/include/executor/executor.h:431 #7 ExecEvalExprNoReturnSwitchContext (state=0x5570b3cd0258, econtext=0x5570b3cb4718) at ../../../src/include/executor/executor.h:472 #8 advance_aggregates_batch (aggstate=0x5570b3cb4300, b=) at nodeAgg.c:834 #9 agg_retrieve_direct_batch (aggstate=0x5570b3cb4300) at nodeAgg.c:2696 #10 0x00005570aa0e6864 in ExecAgg (pstate=0x5570b3cb4300) at nodeAgg.c:2289 #11 0x00005570aa0ee7e2 in ExecProcNode (node=0x5570b3cb4300) at ../../../src/include/executor/executor.h:317 #12 gather_getnext (gatherstate=0x5570b3cb3ff0) at nodeGather.c:294 #13 ExecGather (pstate=0x5570b3cb3ff0) at nodeGather.c:229 #14 0x00005570aa0e9037 in ExecProcNode (node=0x5570b3cb3ff0) at ../../../src/include/executor/executor.h:317 #15 fetch_input_tuple (aggstate=aggstate@entry=0x5570b3cb3878) at nodeAgg.c:562 #16 0x00005570aa0e7c08 in agg_retrieve_direct (aggstate=0x5570b3cb3878) at nodeAgg.c:2477 #17 0x00005570aa0e6864 in ExecAgg (pstate=0x5570b3cb3878) at nodeAgg.c:2289 #18 0x00005570aa108565 in ExecProcNode (node=0x5570b3cb3878) at ../../../src/include/executor/executor.h:317 #19 ExecSetParamPlan (node=0x5570b3cf4778, econtext=econtext@entry=0x5570b3cf4cd0) at nodeSubplan.c:1116 #20 0x00005570aa108a3b in ExecSetParamPlanMulti (params=params@entry=0x7ff33d3e2a08, econtext=0x5570b3cf4cd0) at nodeSubplan.c:1263 #21 0x00005570aa0d523f in ExecInitParallelPlan (planstate=0x5570b3cd2f48, estate=estate@entry=0x5570b3cb3588, sendParams=0x7ff33d3e2a08, nworkers=4, tuples_needed=-1) at execParallel.c:636 #22 0x00005570aa0eece2 in ExecGatherMerge (pstate=0x5570b3cd2c38) at nodeGatherMerge.c:210 #23 0x00005570aa104056 in ExecProcNode (node=0x5570b3cd2c38) at ../../../src/include/executor/executor.h:317 #24 ExecNestLoop (pstate=0x5570b3cd2a28) at nodeNestloop.c:108 #25 0x00005570aa0e9037 in ExecProcNode (node=0x5570b3cd2a28) at ../../../src/include/executor/executor.h:317 #26 fetch_input_tuple (aggstate=aggstate@entry=0x5570b3cd22f8) at nodeAgg.c:562 #27 0x00005570aa0e7c08 in agg_retrieve_direct (aggstate=aggstate@entry=0x5570b3cd22f8) at nodeAgg.c:2477 #28 0x00005570aa0e694d in ExecAgg (pstate=0x5570b3cd22f8) at nodeAgg.c:2292 #29 0x00005570aa0f95e0 in ExecProcNode (node=0x5570b3cd22f8) at ../../../src/include/executor/executor.h:317 #30 ExecLimit (pstate=0x5570b3cd1fe8) at nodeLimit.c:95 #31 0x00005570aa0d26ed in ExecProcNode (node=0x5570b3cd1fe8) at ../../../src/include/executor/executor.h:317 #32 ExecutePlan (queryDesc=0x5570b3cba668, operation=CMD_SELECT, sendTuples=true, numberTuples=0, direction=, dest=0x7ff33d3e42a0) at execMain.c:1697 #33 standard_ExecutorRun (queryDesc=0x5570b3cba668, direction=, count=0) at execMain.c:366 #34 0x00005570aa2a3ccb in PortalRunSelect (portal=portal@entry=0x5570b3c1cda8, forward=, count=0, count@entry=9223372036854775807, dest=dest@entry=0x7ff33d3e42a0) at pquery.c:921 #35 0x00005570aa2a392d in PortalRun (portal=portal@entry=0x5570b3c1cda8, count=count@entry=9223372036854775807, isTopLevel=true, dest=dest@entry=0x7ff33d3e42a0, altdest=altdest@entry=0x7ff33d3e42a0, qc=qc@entry=0x7ffd38218570) at pquery.c:765 #36 0x00005570aa2a2b26 in exec_simple_query ( query_string=query_string@entry=0x5570b3b9b0d8 "select\r\n\tcntrycode,\r\n\tcount(*) as numcust,\r\n\tsum(c_acctbal) as totacctbal\r\nfrom\r\n\t(\r\n\t\tselect\r\n\t\t\tsubstring(c_phone from 1 for 2) as cntrycode,\r\n\t\t\tc_acctbal\r\n\t\tfrom\r\n\t\t\tcustomer\r\n\t\twhere\r\n\t\t\tsubstrin"...) at postgres.c:1278 #37 0x00005570aa2a04cd in PostgresMain (dbname=, username=) at postgres.c:4770 --Type for more, q to quit, c to continue without paging-- #38 0x00005570aa29b81b in BackendMain (startup_data=, startup_data_len=) at backend_startup.c:124 #39 0x00005570aa1f85a1 in postmaster_child_launch (child_type=, child_slot=1, startup_data=startup_data@entry=0x7ffd38218988, startup_data_len=startup_data_len@entry=24, client_sock=client_sock@entry=0x7ffd382188f8) at launch_backend.c:268 #40 0x00005570aa1fcb0c in BackendStartup (client_sock=0x7ffd382188f8) at postmaster.c:3590 #41 ServerLoop () at postmaster.c:1705 #42 0x00005570aa1fa70d in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5570b3b95920) at postmaster.c:1403 #43 0x00005570aa1286aa in main (argc=3, argv=0x5570b3b95920) at main.c:231 (gdb) warning: Section `.reg-xstate/1569551' in core file too small. #0 VARATT_IS_EXTENDED (PTR=0x0) at ../../../../src/include/varatt.h:412 412 return !VARATT_IS_4B_U(PTR); (gdb) bt #0 VARATT_IS_EXTENDED (PTR=0x0) at ../../../../src/include/varatt.h:412 #1 pg_detoast_datum (datum=0x0) at fmgr.c:1798 #2 0x00005570aa359cf4 in DatumGetNumeric (X=0) at ../../../../src/include/utils/numeric.h:66 #3 numeric_avg_accum (fcinfo=0x5570b3c9f718) at numeric.c:5052 #4 0x00005570aa0cf318 in ExecAggPlainTransBatch (state=state@entry=0x5570b3c9a440, op=op@entry=0x5570b3c9f978, econtext=econtext@entry=0x5570b3c6b0a0) at execExprInterp.c:6171 #5 0x00005570aa0cb0aa in ExecInterpExpr (state=0x5570b3c9a440, econtext=0x5570b3c6b0a0, isnull=0x0) at execExprInterp.c:2338 #6 0x00005570aa0e73aa in ExecEvalExprNoReturn (state=0x5570b3c9a440, econtext=0x5570b3c6b0a0) at ../../../src/include/executor/executor.h:431 #7 ExecEvalExprNoReturnSwitchContext (state=0x5570b3c9a440, econtext=0x5570b3c6b0a0) at ../../../src/include/executor/executor.h:472 #8 advance_aggregates_batch (aggstate=0x5570b3c6b330, b=) at nodeAgg.c:834 #9 agg_retrieve_direct_batch (aggstate=0x5570b3c6b330) at nodeAgg.c:2696 #10 0x00005570aa0e6864 in ExecAgg (pstate=0x5570b3c6b330) at nodeAgg.c:2289 #11 0x00005570aa0d26ed in ExecProcNode (node=0x5570b3c6b330) at ../../../src/include/executor/executor.h:317 #12 ExecutePlan (queryDesc=0x5570b3c679d8, operation=CMD_SELECT, sendTuples=true, numberTuples=0, direction=, dest=0x5570b3c26ee8) at execMain.c:1697 #13 standard_ExecutorRun (queryDesc=0x5570b3c679d8, direction=, count=0) at execMain.c:366 #14 0x00005570aa0d6857 in ParallelQueryMain (seg=seg@entry=0x5570b3bcfc30, toc=toc@entry=0x7ff33de00000) at execParallel.c:1499 #15 0x00005570a9f7fce3 in ParallelWorkerMain (main_arg=) at parallel.c:1563 #16 0x00005570aa1f5d8e in BackgroundWorkerMain (startup_data=, startup_data_len=) at bgworker.c:843 #17 0x00005570aa1f85a1 in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, child_slot=239, startup_data=startup_data@entry=0x5570b3bd5d30, startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:268 #18 0x00005570aa1fb2e3 in StartBackgroundWorker (rw=0x5570b3bd5d30) at postmaster.c:4160 #19 maybe_start_bgworkers () at postmaster.c:4326 #20 0x00005570aa1fce85 in LaunchMissingBackgroundProcesses () at postmaster.c:3400 #21 ServerLoop () at postmaster.c:1720 #22 0x00005570aa1fa70d in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5570b3b95920) at postmaster.c:1403 #23 0x00005570aa1286aa in main (argc=3, argv=0x5570b3b95920) at main.c:231