Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint
Date: 2013-05-06 21:16:35
Message-ID: CA+TgmobeOicvCweH1u_w8vhaYFEPOrhD5pYfTdidg7bevdhAkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, May 1, 2013 at 6:27 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Fix permission tests for views/tables proven empty by constraint exclusion.

I believe that this commit is responsible for the fact that the
following test case now crashes the server:

rhaas=# create or replace view foo (x) AS (select 1 union all select 2);
CREATE VIEW
rhaas=# select * from foo where false;
The connection to the server was lost. Attempting reset: Failed.

(gdb) bt
#0 is_dummy_plan (plan=0x0) at planner.c:1850
#1 0x000000010bd44c3e in create_append_plan [inlined] () at
/Users/rhaas/pgsql/src/backend/optimizer/plan/createplan.c:706
#2 0x000000010bd44c3e in create_plan_recurse (root=0x7fff54080e60,
best_path=0x7f9d4b109270) at createplan.c:247
#3 0x000000010bd3f4bd in create_plan (root=0x7f9d4b0389d0,
best_path=0x7f9d4b109270) at createplan.c:201
#4 0x000000010bd4aa64 in grouping_planner (root=0x7f9d4b0389d0,
tuple_fraction=6.9532132623547611e-310) at planner.c:1294
#5 0x000000010bd4c74e in subquery_planner (glob=0x7f9d4b0389d0,
parse=0x7fff54081290, parent_root=0x7f9d4b107838,
tuple_fraction=6.9532132623808478e-310, subroot=0x7fff54081290,
hasRecursion=0 '\0') at planner.c:558
#6 0x000000010bd4ca0c in standard_planner (parse=0x7f9d4b038020,
cursorOptions=0, boundParams=0x7f9d4b038020) at planner.c:209
#7 0x000000010bdc4ba3 in pg_plan_query (querytree=0x7f9d4b037ce8,
cursorOptions=1258519784, boundParams=0x7f9d4b109470) at
postgres.c:753
#8 0x000000010bdc746c in pg_plan_queries [inlined] () at
/Users/rhaas/pgsql/src/backend/tcop/postgres.c:812
#9 0x000000010bdc746c in exec_simple_query [inlined] () at
/Users/rhaas/pgsql/src/backend/tcop/postgres.c:977
#10 0x000000010bdc746c in PostgresMain (dbname=0x7f9d4b01f028 "rhaas",
argc=1, argv=0x10bf11824, username=0x7f9d4b037a58 "?\002") at
postgres.c:3985
#11 0x000000010bd754b3 in PostmasterMain (argc=1409820832,
argv=0x7fff540828a0) at postmaster.c:3985
#12 0x000000010bd09f18 in main (argc=1, argv=0x7f9d4ac04050) at main.c:196

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-05-06 21:28:37 Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint
Previous Message Tom Lane 2013-05-06 20:58:23 pgsql: Stamp 9.3beta1.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-05-06 21:28:37 Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint
Previous Message Tom Lane 2013-05-06 21:13:11 Re: pg_dump --snapshot