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

Re: patch for pg_autovacuum 8.0.x prevent segv for dropped

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: daveg <daveg(at)sonic(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: patch for pg_autovacuum 8.0.x prevent segv for dropped
Date: 2005-10-20 16:33:48
Message-ID: 4357C6EC.6020000@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches

Tom Lane wrote:

>daveg <daveg(at)sonic(dot)net> writes:
>  
>
>>Below is a patch for this that should apply against any 8.0.x. The change
>>verifies that the catalog query returned some rows before accessing the row
>>data.
>>    
>>
>
>Surely this is completely broken?  AFAICT you are testing the result
>from a VACUUM or ANALYZE command, which is not going to return any
>tuples.
>  
>

I guess he should change

    if (PQntuples(res))

to

    if (|PQresultStatus|(res) == PGRES_COMMAND_OK)

?

cheers

andrew



In response to

pgsql-patches by date

Next:From: davegDate: 2005-10-20 19:38:42
Subject: Re: patch for pg_autovacuum 8.0.x prevent segv for dropped tables
Previous:From: Tom LaneDate: 2005-10-20 16:30:27
Subject: Re: patch for pg_autovacuum 8.0.x prevent segv for dropped tables

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