BUG #16703: pg-dump fails to process recursive view definition

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: exclusion(at)gmail(dot)com
Subject: BUG #16703: pg-dump fails to process recursive view definition
Date: 2020-11-05 12:00:01
Message-ID: 16703-e348f58aab3cf6cc@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16703
Logged by: Alexander Lakhin
Email address: exclusion(at)gmail(dot)com
PostgreSQL version: 13.0
Operating system: Ubuntu 20.04
Description:

The following recursive views (borrowed from regress/sql/lock.sql, see
"detecting infinite recursions in view definitions"):
CREATE VIEW lock_view2(a) AS SELECT NULL::integer;
CREATE VIEW lock_view3 AS SELECT * from lock_view2;
CREATE OR REPLACE VIEW lock_view2 AS SELECT * from lock_view3;
can be created successfully, but make a subsequent pg_dump fail:
pg_dump: error: query failed: ERROR: infinite recursion detected in rules
for relation "lock_view2"
pg_dump: error: query was: LOCK TABLE public.lock_view2 IN ACCESS SHARE
MODE

The offending commit is 64fc3e03.

Thanks to Andrew Bille for discovering this.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-11-05 12:07:38 BUG #16704: Segmentation Problem - SSL SYSCALL error: EOF detected
Previous Message Magnus Hagander 2020-11-05 09:16:24 Re: BUG #16701: PostGreSQL Error : could not open relation with OID 2610