The following bug has been logged online: Bug reference: 4793 Logged by: Dennis Noordsij Email address: dennis.noord...@helsinki.fi PostgreSQL version: snapshot/beta1 Operating system: 64bit arch Linux Description: Segmentation fault when doing vacuum analyze Details:
Seen on both 8.4beta1 and daily snapshot downloaded 5 May 2009. Table used (effects also seen on similar tables): osm=# \d way_tags Table "public.way_tags" Column | Type | Modifiers --------+--------+----------- way | bigint | not null key | text | not null value | text | Indexes: "way_tags_pkey" PRIMARY KEY, btree (way, key) "way_tag_kv_idx" btree (key, value) "way_tag_wkv_idx" btree (way, key, value) osm=# select count(*) from way_tags; count --------- 4154315 (1 row) osm=# select count(*) from (select distinct key from way_tags) as foo; count ------- 322 (1 row) osm=# select count(*) from (select distinct value from way_tags) as foo; count --------- 1124909 (1 row) Statement: alter table way_tags alter column way set statistics 5000; alter table way_tags alter column key set statistics 5000; vacuum analyze; results in a segmentation fault with the following backtrace: (gdb) bt #0 0x00000000004eecf7 in compute_scalar_stats (stats=0x1abd878, fetchfunc=0x4f0f30 <std_fetch_func>, samplerows=<value optimized out>, totalrows=4154315) at analyze.c:2321 #1 0x00000000004efbf5 in analyze_rel (relid=16484, vacstmt=0x1aaf140, bstrategy=<value optimized out>, update_reltuples=1 '\001') at analyze.c:433 #2 0x0000000000538681 in vacuum (vacstmt=0x1aaf140, relid=<value optimized out>, do_toast=1 '\001', bstrategy=<value optimized out>, for_wraparound=0 '\0', isTopLevel=<value optimized out>) at vacuum.c:466 #3 0x00000000005e8bc7 in PortalRunUtility (portal=0x1ae00c0, utilityStmt=0x1aaf140, isTopLevel=64 '@', dest=0xabc160, completionTag=0x7fff39e7f0e0 "") at pquery.c:1192 #4 0x00000000005e9d0d in PortalRunMulti (portal=0x1ae00c0, isTopLevel=<value optimized out>, dest=0xabc160, altdest=0xabc160, completionTag=0x7fff39e7f0e0 "") at pquery.c:1297 #5 0x00000000005ea482 in PortalRun (portal=0x1ae00c0, count=9223372036854775807, isTopLevel=1 '\001', dest=0xabc160, altdest=0xabc160, completionTag=0x7fff39e7f0e0 "") at pquery.c:823 #6 0x00000000005e5807 in exec_simple_query (query_string=0x1aae880 "vacuum analyze way_tags;\n") at postgres.c:991 #7 0x00000000005e6dc7 in PostgresMain (argc=1, argv=<value optimized out>, username=0x1a07560 "dennis") at postgres.c:3606 #8 0x00000000005676af in main (argc=5, argv=0x1a05b70) at main.c:186 Note if I vacuum analyze between the alter table statements then everything completes fine. After the segfault, restarting and then running "vacuum analyze way_tags" is enough to trigger the segfault again. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs