Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] select * from ..;vacuum crashes

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: t-ishii(at)sra(dot)co(dot)jp, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] select * from ..;vacuum crashes
Date: 1998-10-06 04:06:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> (I have changed the subject "delete from" to "select * from" )
> As I reported,
> 	select * from getting; vacuum;
> does crash the backend with included test data.
> This time I have tried:
> begin;
> select * from getting;
> vacuum;
> end;

I am attaching the original test script that will crash the backend. 
The backtrace is:

    exceptionP=0x8152500, detail=0x0, fileName=0x8113761 "heapam.c", 
    lineNumber=1055) at assert.c:74
#6  0x805a3ea in heap_fetch (relation=0x8187310, snapshot=0x0, tid=0x82f1128, 
    userbuf=0x8045430) at heapam.c:1055
#7  0x8081986 in vc_updstats (relid=141974, num_pages=0, num_tuples=0, 
    hasindex=1 '\001', vacrelstats=0x8186890) at vacuum.c:1767
#8  0x807ef8d in vc_vacone (relid=141974, analyze=0, va_cols=0x0)
    at vacuum.c:579
#9  0x807e6f1 in vc_vacuum (VacRelP=0x0, analyze=0 '\000', va_cols=0x0)
    at vacuum.c:257
#10 0x807e5ce in vacuum (vacrel=0x0, verbose=0, analyze=0 '\000', va_spec=0x0)
    at vacuum.c:160
#11 0x80e2d07 in ProcessUtility (parsetree=0x8185950, dest=Debug)
    at utility.c:644
#12 0x80e0745 in pg_exec_query_dest (query_string=0x80455f8 "vacuum;\n", 
    dest=Debug, aclOverride=0) at postgres.c:758
#13 0x80e0664 in pg_exec_query (query_string=0x80455f8 "vacuum;\n")
    at postgres.c:699
#14 0x80e1708 in PostgresMain (argc=4, argv=0x8047644, real_argc=4, 
    real_argv=0x8047644) at postgres.c:1622
#15 0x809ae39 in main (argc=4, argv=0x8047644) at main.c:103
#16 0x804a96c in __start ()

Something in the heap fetch it does not like.  I am kind of lost in this
part of the code.

The Assert line is:


which is checking for:

    (bool) (((itemId)->lp_flags & LP_USED) != 0)

which is saying the disk identifer should be in use, but is not during
the vacuum, for some reason.

You must enable Assert to see the crash.

The cause may be because you are doing a vacuum INSIDE a transaction.  I
think that also explains the psql -e thing, because that does both
commands in the same transaction.

Perhaps we need to disable vacuum inside transactions.  Vadim?

  Bruce Momjian                        |
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-hackers by date

Next:From: Gene Selkov Jr.Date: 1998-10-06 04:11:30
Subject: Re: [ADMIN] COPY slows down; is it normal?
Previous:From: Bruce MomjianDate: 1998-10-06 03:58:05
Subject: Re: [HACKERS] too many pfree in large object

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group