[9.1] 2 bugs with extensions

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: [9.1] 2 bugs with extensions
Date: 2012-07-18 10:13:17
Message-ID: CACMqXCJjauc9jPa64VxskRN67bYjuYmodz-Mgy-_aoZ6ErG3Yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I converted Skytools modules to extensions and found 2 problems:

1) Dumpable sequences are not supported - if sequence is tagged
with pg_catalog.pg_extension_config_dump(), the pg_dump tries
to run COPY on it.

2) If there is schema with functions, but nothing else,
then when later converting it to extension by adding
functions and schema to extension, later drop
of that extension fails to remove schema.
Proper CREATE EXT + DROP EXT works fine.

To reproduce, checkout 'master' branch and go directly
to module directory:

$ git clone --recursive git://github.com/markokr/skytools.git
$ cd skytools

1) $ cd sql/pgq && make install installcheck
..
pg_dump regression > test.dump
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: cannot copy from sequence
"batch_id_seq"
pg_dump: The command was: COPY pgq.batch_id_seq TO stdout;

2) $ cd sql/pgq_coop && make install installcheck
..
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
create extension pgq_coop;
ERROR: schema "pgq_coop" already exists

--
marko

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-07-18 12:26:02 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)
Previous Message Alexander Law 2012-07-18 08:51:34 Re: BUG #6742: pg_dump doesn't convert encoding of DB object names to OS encoding