Re: Fixing invalid owners on pg_toast tables in 8.3.5 - Mailing list pgsql-general

From Tom Lane
Subject Re: Fixing invalid owners on pg_toast tables in 8.3.5
Date
Msg-id 27066.1235236825@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixing invalid owners on pg_toast tables in 8.3.5  (Cott Lang <cott@internetstaff.com>)
Responses Re: Fixing invalid owners on pg_toast tables in 8.3.5
List pgsql-general
Cott Lang <cott@internetstaff.com> writes:
> I fiddled around a while, found the problem, and I can repeat it at
> will. It's actually related to type changes we've made over the months
> since the restore.

[ scratches head... ]  That example fails to misbehave for me in 8.3.6,
and I'm pretty certain there have been no relevant bugfixes since 8.3.5.
Can anyone else duplicate a change of toast table owner?

Are you by any chance using a nondefault block_size?  It strikes me that
at block_size 32K, the example would involve enlarging the varchar's
width across the boundary where a toast table would be created.  However
that still doesn't explain the results, since in that case the first
"select typowner" shouldn't have found any row.

Are both instances of the select finding the same pg_type row?  You've
phrased the select to hide all the evidence, but what we'd need to
figure out is whether reltoastrelid changed or the pg_type row itself
got updated.

            regards, tom lane

pgsql-general by date:

Previous
From: decibel
Date:
Subject: Re: NOVALIDATE in postgresql?
Next
From: Will Harrower
Date:
Subject: Pointers in custom types