I encountered the following segfault when running against a PG 12 beta1
during a analyze against a table.
#0 0x000056008ad0c826 in update_attstats (vacattrstats=0x0,
natts=2139062143, inh=false,
relid=<error reading variable: Cannot access memory at address
0x40>) at analyze.c:572
#1 do_analyze_rel (onerel=onerel@entry=0x7f0bc59a7a38,
params=params@entry=0x7ffe06aeabb0, va_cols=va_cols@entry=0x0,
acquirefunc=<optimized out>, relpages=8, inh=inh@entry=false,
in_outer_xact=false, elevel=13) at analyze.c:572
#2 0x000056008ad0d2e0 in analyze_rel (relid=<optimized out>,
relation=<optimized out>,
params=params@entry=0x7ffe06aeabb0, va_cols=0x0,
in_outer_xact=<optimized out>, bstrategy=<optimized out>)
at analyze.c:260
#3 0x000056008ad81300 in vacuum (relations=0x56008c4d1110,
params=params@entry=0x7ffe06aeabb0,
bstrategy=<optimized out>, bstrategy@entry=0x0,
isTopLevel=isTopLevel@entry=true) at vacuum.c:413
#4 0x000056008ad8197f in ExecVacuum
(pstate=pstate@entry=0x56008c5c2688, vacstmt=vacstmt@entry=0x56008c3e0428,
isTopLevel=isTopLevel@entry=true) at vacuum.c:199
#5 0x000056008af0133b in standard_ProcessUtility (pstmt=0x56008c982e50,
queryString=0x56008c3df368 "select
\"_disorder_replica\".finishTableAfterCopy(3); analyze
\"disorder\".\"do_inventory\"; ", context=<optimized out>, params=0x0,
queryEnv=0x0, dest=0x56008c9831d8, completionTag=0x7ffe06aeaef0 "")
at utility.c:670
#6 0x000056008aefe112 in PortalRunUtility (portal=0x56008c4515f8,
pstmt=0x56008c982e50, isTopLevel=<optimized out>,
setHoldSnapshot=<optimized out>, dest=<optimized out>,
completionTag=0x7ffe06aeaef0 "") at pquery.c:1175
#7 0x000056008aefec91 in PortalRunMulti
(portal=portal@entry=0x56008c4515f8, isTopLevel=isTopLevel@entry=true,
setHoldSnapshot=setHoldSnapshot@entry=false,
dest=dest@entry=0x56008c9831d8, altdest=altdest@entry=0x56008c9831d8,
completionTag=completionTag@entry=0x7ffe06aeaef0 "") at pquery.c:1328
#8 0x000056008aeff9e9 in PortalRun (portal=portal@entry=0x56008c4515f8,
count=count@entry=9223372036854775807,
isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true,
dest=dest@entry=0x56008c9831d8,
altdest=altdest@entry=0x56008c9831d8, completionTag=0x7ffe06aeaef0
"") at pquery.c:796
#9 0x000056008aefb6bb in exec_simple_query (
query_string=0x56008c3df368 "select
\"_disorder_replica\".finishTableAfterCopy(3); analyze
\"disorder\".\"do_inventory\"; ") at postgres.c:1215
With master from today(aa087ec64f703a52f3c48c) I still get segfaults
under do_analyze_rel
compute_index_stats (onerel=0x7f84bf1436a8, col_context=0x55a5d3d56640,
numrows=<optimized out>, rows=0x55a5d4039520,
nindexes=<optimized out>, indexdata=0x3ff0000000000000,
totalrows=500) at analyze.c:711
#1 do_analyze_rel (onerel=onerel@entry=0x7f84bf1436a8,
params=0x7ffdde2b5c40, params@entry=0x3ff0000000000000,
va_cols=va_cols@entry=0x0, acquirefunc=<optimized out>,
relpages=11, inh=inh@entry=false, in_outer_xact=true,
elevel=13) at analyze.c:552