Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?
Date
Msg-id 9598.1238510154@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> I can't remember having seen bugs of this type before.

> If we had had this defense in place, it would have been obvious that
> reindex and cluster were buggy.  The code to skip temp tables was not
> there from the beginning.

I thought my memory was probably failing me (excuse: no caffeine yet).

> (We already have rel->rd_istemp, but it's not what we need here.)

Yeah.  I was considering converting that into a three-state flag, but
it might be simpler to remove it altogether and look to the new pg_class
field; only after we've gone down the path into localbuf.c would we
check relnamespace == our temp namespace before permitting a read or write.

Barring objections, I'll go make that happen.  (And fix the contrib bugs
too, but not till after ... I'll need a test case ;-))
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage?
Next
From: Sam Mason
Date:
Subject: Re: [GENERAL] string_to_array with empty input