Re: Segfault on ANALYZE in SERIALIZABLE isolation

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Joe Wildish <joe-postgresql(dot)org(at)elusive(dot)cx>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Segfault on ANALYZE in SERIALIZABLE isolation
Date: 2019-05-18 14:31:25
Message-ID: 10610671558189885@iva2-e9bddb4e925f.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I can reproduce with:

set default_transaction_isolation TO serializable ;
analyze ;

Here is backtrace:

#0 SerializationNeededForRead (snapshot=0x0, relation=0x7f53e9a525f8) at predicate.c:530
#1 PredicateLockRelation (relation=relation(at)entry=0x7f53e9a525f8, snapshot=snapshot(at)entry=0x0) at predicate.c:2507
#2 0x0000562395b78a14 in heap_beginscan (relation=0x7f53e9a525f8, snapshot=0x0, nkeys=0, key=0x0, parallel_scan=0x0, allow_strat=<optimized out>,
allow_sync=false, allow_pagemode=true, is_bitmapscan=false, is_samplescan=true, temp_snap=false) at heapam.c:1180
#3 0x0000562395c782d7 in table_beginscan_analyze (rel=0x7f53e9a525f8) at ../../../src/include/access/tableam.h:786
#4 acquire_sample_rows (onerel=onerel(at)entry=0x7f53e9a525f8, elevel=elevel(at)entry=13, rows=rows(at)entry=0x562396f01dd0, targrows=targrows(at)entry=30000,
totalrows=totalrows(at)entry=0x7ffd0603e498, totaldeadrows=totaldeadrows(at)entry=0x7ffd0603e490) at analyze.c:1032
#5 0x0000562395c790f2 in do_analyze_rel (onerel=onerel(at)entry=0x7f53e9a525f8, params=params(at)entry=0x7ffd0603e6a0, va_cols=va_cols(at)entry=0x0,
acquirefunc=0x562395c781fa <acquire_sample_rows>, relpages=0, inh=inh(at)entry=false, in_outer_xact=false, elevel=13) at analyze.c:502
#6 0x0000562395c79930 in analyze_rel (relid=<optimized out>, relation=0x0, params=params(at)entry=0x7ffd0603e6a0, va_cols=0x0,
in_outer_xact=<optimized out>, bstrategy=<optimized out>) at analyze.c:260
#7 0x0000562395cf6f90 in vacuum (relations=0x562396ecbf80, params=params(at)entry=0x7ffd0603e6a0, bstrategy=<optimized out>, bstrategy(at)entry=0x0,
isTopLevel=isTopLevel(at)entry=true) at vacuum.c:413
#8 0x0000562395cf759d in ExecVacuum (pstate=pstate(at)entry=0x562396df69f8, vacstmt=vacstmt(at)entry=0x562396dd54c0, isTopLevel=isTopLevel(at)entry=true)
at vacuum.c:199
#9 0x0000562395e84863 in standard_ProcessUtility (pstmt=0x562396dd5820, queryString=0x562396dd4ad8 "analyze ;", context=PROCESS_UTILITY_TOPLEVEL,
params=0x0, queryEnv=0x0, dest=0x562396dd5918, completionTag=0x7ffd0603ea10 "") at utility.c:670
#10 0x0000562395e84dba in ProcessUtility (pstmt=pstmt(at)entry=0x562396dd5820, queryString=<optimized out>, context=<optimized out>,
params=<optimized out>, queryEnv=<optimized out>, dest=dest(at)entry=0x562396dd5918, completionTag=0x7ffd0603ea10 "") at utility.c:360
#11 0x0000562395e811a1 in PortalRunUtility (portal=portal(at)entry=0x562396e3a178, pstmt=pstmt(at)entry=0x562396dd5820, isTopLevel=isTopLevel(at)entry=true,
setHoldSnapshot=setHoldSnapshot(at)entry=false, dest=dest(at)entry=0x562396dd5918, completionTag=completionTag(at)entry=0x7ffd0603ea10 "") at pquery.c:1175
#12 0x0000562395e81e0e in PortalRunMulti (portal=portal(at)entry=0x562396e3a178, isTopLevel=isTopLevel(at)entry=true,
setHoldSnapshot=setHoldSnapshot(at)entry=false, dest=dest(at)entry=0x562396dd5918, altdest=altdest(at)entry=0x562396dd5918,
completionTag=completionTag(at)entry=0x7ffd0603ea10 "") at pquery.c:1321
#13 0x0000562395e82b99 in PortalRun (portal=portal(at)entry=0x562396e3a178, count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=true,
run_once=run_once(at)entry=true, dest=dest(at)entry=0x562396dd5918, altdest=altdest(at)entry=0x562396dd5918, completionTag=0x7ffd0603ea10 "")
at pquery.c:796
#14 0x0000562395e7ee14 in exec_simple_query (query_string=query_string(at)entry=0x562396dd4ad8 "analyze ;") at postgres.c:1215
#15 0x0000562395e80cfc in PostgresMain (argc=<optimized out>, argv=argv(at)entry=0x562396e00320, dbname=<optimized out>, username=<optimized out>)
at postgres.c:4249
#16 0x0000562395df6358 in BackendRun (port=port(at)entry=0x562396df7d30) at postmaster.c:4431
#17 0x0000562395df9477 in BackendStartup (port=port(at)entry=0x562396df7d30) at postmaster.c:4122
#18 0x0000562395df969a in ServerLoop () at postmaster.c:1704
#19 0x0000562395dfabdb in PostmasterMain (argc=3, argv=<optimized out>) at postmaster.c:1377
#20 0x0000562395d59083 in main (argc=3, argv=0x562396dcf200) at main.c:228

regards, Sergei

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2019-05-18 15:12:31 Re: Segfault on ANALYZE in SERIALIZABLE isolation
Previous Message David Rowley 2019-05-18 14:26:48 Re: PostgreSQL 12: Feature Highlights