Re: autovacuum crash due to null pointer - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: autovacuum crash due to null pointer
Date
Msg-id 20080717171753.GI3934@alvh.no-ip.org
Whole thread Raw
In response to Re: autovacuum crash due to null pointer  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: autovacuum crash due to null pointer  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > I'm having a hard time reproducing this problem; I added a pg_usleep()
> > just before get_rel_name to have the chance to drop the table, but
> > strangely enough it doesn't return NULL.  It seems that the cache entry
> > is not getting invalidated.  Maybe there's something else that's needed
> > to reproduce the crash.
>
> I think cache invals would get noticed at points where we had to open
> some relation, so you probably need the sleep somewhere earlier than
> that.  Or just throw in an AcceptInvalidationMessages() after the sleep.

AcceptInvalidationMessages did the trick.

Patches for 8.3 and HEAD attached.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0 v4
Next
From: "Jonah H. Harris"
Date:
Subject: Re: [PATCH]-hash index improving