pgsql: Disallow deletion of CurrentExtensionObject while running extens

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Disallow deletion of CurrentExtensionObject while running extens
Date: 2011-11-29 00:14:04
Message-ID: E1RVBKm-0001qZ-FT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Disallow deletion of CurrentExtensionObject while running extension script.

While the deletion in itself wouldn't break things, any further creation
of objects in the script would result in dangling pg_depend entries being
added by recordDependencyOnCurrentExtension(). An example from Phil
Sorber convinced me that this is just barely likely enough to be worth
expending a couple lines of code to defend against. The resulting error
message might be confusing, but it's better than leaving corrupted catalog
contents for the user to deal with.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ec3e183ec51bb2d4032be6d5402ddc7b4c8acb71

Modified Files
--------------
src/backend/commands/extension.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-11-29 01:19:43 pgsql: Make some minor formatting improvements to what pgindent did.
Previous Message Bruce Momjian 2011-11-28 21:48:16 pgsql: Pgindent clauses.c, per request from Tom.