BF failure: could not open relation with OID XXXX while querying pg_views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

BF failure: could not open relation with OID XXXX while querying pg_views

Thomas Munro-5
Hi,

Here are three strange recent failures in the "rules" test:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=blenny&dt=2019-08-13%2022:19:27
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=alewife&dt=2019-07-27%2009:39:05
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dory&dt=2019-07-18%2003:00:27

They all raised "ERROR:  could not open relation with OID <varies>"
while running:

 SELECT viewname, definition FROM pg_views
 WHERE schemaname IN ('pg_catalog', 'public')
 ORDER BY viewname;

--
Thomas Munro
https://enterprisedb.com


Reply | Threaded
Open this post in threaded view
|

Re: BF failure: could not open relation with OID XXXX while querying pg_views

Tom Lane-2
Thomas Munro <[hidden email]> writes:
> Here are three strange recent failures in the "rules" test:
> ...
> They all raised "ERROR:  could not open relation with OID <varies>"
> while running:
>  SELECT viewname, definition FROM pg_views
>  WHERE schemaname IN ('pg_catalog', 'public')
>  ORDER BY viewname;

I think the problem is probably that Peter ignored this bit of advice
in parallel_schedule:

# rules cannot run concurrently with any test that creates
# a view or rule in the public schema

when he inserted "collate.linux.utf8" concurrently with "rules".

(I suspect BTW that the point is not so much that you better not
*create* such an object, as that you better not *drop* it concurrently
with that query.)

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
|

Re: BF failure: could not open relation with OID XXXX while querying pg_views

Peter Eisentraut-6
On 2019-08-14 05:52, Tom Lane wrote:

> Thomas Munro <[hidden email]> writes:
>> Here are three strange recent failures in the "rules" test:
>> ...
>> They all raised "ERROR:  could not open relation with OID <varies>"
>> while running:
>>  SELECT viewname, definition FROM pg_views
>>  WHERE schemaname IN ('pg_catalog', 'public')
>>  ORDER BY viewname;
>
> I think the problem is probably that Peter ignored this bit of advice
> in parallel_schedule:
>
> # rules cannot run concurrently with any test that creates
> # a view or rule in the public schema
>
> when he inserted "collate.linux.utf8" concurrently with "rules".

This test file is set up to create everything in the "collate_tests"
schema.  Is that not working correctly?

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Reply | Threaded
Open this post in threaded view
|

Re: BF failure: could not open relation with OID XXXX while querying pg_views

Tom Lane-2
Peter Eisentraut <[hidden email]> writes:
> On 2019-08-14 05:52, Tom Lane wrote:
>> Thomas Munro <[hidden email]> writes:
>>> They all raised "ERROR:  could not open relation with OID <varies>"
>>> while running:
>>> SELECT viewname, definition FROM pg_views
>>> WHERE schemaname IN ('pg_catalog', 'public')
>>> ORDER BY viewname;

>> I think the problem is probably that Peter ignored this bit of advice
>> in parallel_schedule:
>> # rules cannot run concurrently with any test that creates
>> # a view or rule in the public schema
>> when he inserted "collate.linux.utf8" concurrently with "rules".

> This test file is set up to create everything in the "collate_tests"
> schema.  Is that not working correctly?

Oh, hmm --- yeah, that should mean it's safe.  Maybe somebody incautiously
changed one of the other tests that run concurrently with "rules"?

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
|

Re: BF failure: could not open relation with OID XXXX while querying pg_views

Thomas Munro-5
On Wed, Aug 14, 2019 at 5:06 PM Tom Lane <[hidden email]> wrote:
> Oh, hmm --- yeah, that should mean it's safe.  Maybe somebody incautiously
> changed one of the other tests that run concurrently with "rules"?

Looks like stats_ext.sql could be the problem.  It creates and drops
priv_test_view, not in a schema.  Adding Dean, author of commit
d7f8d26d.

--
Thomas Munro
https://enterprisedb.com


Reply | Threaded
Open this post in threaded view
|

Re: BF failure: could not open relation with OID XXXX while querying pg_views

Tomas Vondra-4
On Wed, Aug 14, 2019 at 05:24:26PM +1200, Thomas Munro wrote:
>On Wed, Aug 14, 2019 at 5:06 PM Tom Lane <[hidden email]> wrote:
>> Oh, hmm --- yeah, that should mean it's safe.  Maybe somebody incautiously
>> changed one of the other tests that run concurrently with "rules"?
>
>Looks like stats_ext.sql could be the problem.  It creates and drops
>priv_test_view, not in a schema.  Adding Dean, author of commit
>d7f8d26d.
>

Yeah, that seems like it might be the cause. I'll take a look at fixing
this, probably by creating the view in a different schema.

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services