pg 10 crashes on int8_avg_combine

From: Dingyuan Wang <gumblex(at)aosc(dot)io>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: pg 10 crashes on int8_avg_combine
Date: 2017-11-14 16:18:12
Message-ID: 57cad0c7-1e97-2532-927c-98e36d5cb933@aosc.io
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

PostgreSQL constantly crashes on this query:

select dategrid, category, sum(cnt) from v_crime_grid group by dategrid,
category;

Where v_crime_grid is a materialized view, have columns "dategrid" int4,
"category" int4, and "cnt" int8.

Version is:

PostgreSQL 10.0 on x86_64-pc-linux-gnu, compiled by gcc (Debian 7.2.0-8)
7.2.0, 64-bit

GDB bt says:

(gdb) bt
#0 int8_avg_combine (fcinfo=0x55bdb92472d8) at
./build/../src/backend/utils/adt/numeric.c:4285
#1 0x000055bdb73b2e4d in advance_combine_function
(pergroupstate=0x55bdb92481b8, pertrans=0x55bdb92471a8,
aggstate=0x55bdb9239378) at ./build/../src/backend/executor/nodeAgg.c:1233
#2 combine_aggregates (aggstate=0x55bdb9239378, pergroup=<optimized
out>) at ./build/../src/backend/executor/nodeAgg.c:1167
#3 0x000055bdb73b36bd in agg_retrieve_direct (aggstate=0x55bdb9239378)
at ./build/../src/backend/executor/nodeAgg.c:2407
#4 ExecAgg (pstate=0x55bdb9239378) at
./build/../src/backend/executor/nodeAgg.c:2124
#5 0x000055bdb73a555d in ExecProcNode (node=0x55bdb9239378) at
./build/../src/include/executor/executor.h:250
#6 ExecutePlan (execute_once=<optimized out>, dest=0x55bdb9238dd8,
direction=<optimized out>, numberTuples=0, sendTuples=<optimized out>,
operation=CMD_SELECT, use_parallel_mode=<optimized out>,
planstate=0x55bdb9239378, estate=0x55bdb9239138) at
./build/../src/backend/executor/execMain.c:1721
#7 standard_ExecutorRun (queryDesc=0x55bdb9202f48, direction=<optimized
out>, count=0, execute_once=<optimized out>) at
./build/../src/backend/executor/execMain.c:363
#8 0x00007f5e48c1a0c5 in pgss_ExecutorRun (queryDesc=0x55bdb9202f48,
direction=ForwardScanDirection, count=0, execute_once=<optimized out>)
at ./build/../contrib/pg_stat_statements/pg_stat_statements.c:889
#9 0x000055bdb74dc456 in PortalRunSelect
(portal=portal(at)entry=0x55bdb918a7a8, forward=forward(at)entry=1 '\001',
count=0, count(at)entry=9223372036854775807, dest=dest(at)entry=0x55bdb9238dd8)
at ./build/../src/backend/tcop/pquery.c:932
#10 0x000055bdb74dda40 in PortalRun (portal=portal(at)entry=0x55bdb918a7a8,
count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=1
'\001', run_once=run_once(at)entry=1 '\001',
dest=dest(at)entry=0x55bdb9238dd8,
altdest=altdest(at)entry=0x55bdb9238dd8, completionTag=0x7ffd7dd99cd0 "")
at ./build/../src/backend/tcop/pquery.c:773
#11 0x000055bdb74d9580 in exec_simple_query (query_string=0x55bdb9153348
"select dategrid, category, sum(cnt) from v_crime_grid group by
dategrid, category;")
at ./build/../src/backend/tcop/postgres.c:1099
#12 0x000055bdb74db551 in PostgresMain (argc=<optimized out>,
argv=argv(at)entry=0x55bdb9188c50, dbname=<optimized out>,
username=<optimized out>) at ./build/../src/backend/tcop/postgres.c:4090
#13 0x000055bdb721cd23 in BackendRun (port=0x55bdb91818b0) at
./build/../src/backend/postmaster/postmaster.c:4357
#14 BackendStartup (port=0x55bdb91818b0) at
./build/../src/backend/postmaster/postmaster.c:4029
#15 ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1753
#16 0x000055bdb746b7bf in PostmasterMain (argc=5, argv=0x55bdb9133e40)
at ./build/../src/backend/postmaster/postmaster.c:1361
#17 0x000055bdb721e834 in main (argc=5, argv=0x55bdb9133e40) at
./build/../src/backend/main/main.c:228

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vikas Sharma 2017-11-14 16:22:57 PGPool in Master-Master mode, is it possible?
Previous Message rakeshkumar464 2017-11-14 16:09:07 pg_basebackup running from a remote machine