On 6/8/17 23:53, Tom Lane wrote:
> --- 155,161 ----
>   
>   SET search_path = mvtest_mvschema, public;
>   \d+ mvtest_tvm
> ! ERROR:  publication "addr_pub" does not exist
>   -- modify the underlying table data
>   INSERT INTO mvtest_t VALUES (6, 'z', 13);
>   -- confirm pre- and post-refresh contents of fairly simple materialized 
> views
> 
> This appears to have something to do with the concurrently-running
> object_address test script, which creates and then drops a publication
> named "addr_pub".  However, there is no visible connection between
> mvtest_tvm (or any of the objects it depends on) and addr_pub or any
> of the objects it is told to publish.  So what happened here, and
> isn't this a bug?

The \d+ command attempts to print out any publications that the relation
is part of.  To find the publications it is part of, it runs this query:

    "SELECT pub.pubname\n"
    " FROM pg_catalog.pg_publication pub,\n"
    "      pg_catalog.pg_get_publication_tables(pub.pubname)\n"
    "WHERE relid = '%s'\n"
    "ORDER BY 1;",

pg_get_publication_tables() calls GetPublicationByName(), which throws
this error.

So I suppose that if a publication is dropped between the time
pg_publication is read and the function is called, you could get this error.

How could we improve that?

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to