Re: Extension Packaging
От | Daniele Varrazzo |
---|---|
Тема | Re: Extension Packaging |
Дата | |
Msg-id | BANLkTinHZyf0MDT9m4DLRerOmVJ_CKpf8Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Extension Packaging (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Extension Packaging
|
Список | pgsql-hackers |
On Thu, Apr 21, 2011 at 4:16 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "David E. Wheeler" <david@kineticode.com> writes: >> * Another, minor point: If I release a new version with no changes to the code (as I've done today, just changing themake stuff and documentation), it's kind of annoying that I'd need to have a migration script from the old version tothe new version that's…empty. But I dunno, maybe not such a big deal. It's useful to have it there with a comment in it:“No changes.” > > If you did not actually change the contents of the install script, you > should not change its version number either. Sorry, I'm not entirely convinced. If I release an extension 1.0, then find a bug in the C code and fix it in 1.0.1, arguably "make install" will put the .so in the right place and the 1.0.1 code will be picked up by new sessions. But pg_extension still knows 1.0 as extension version, and ALTER EXTENSION ... UPGRADE fails because no update path is knows. There is also a dangerous asymmetry: If I'm not mistaken the library .so has no version number, so there can be only one version in the system: an update changing code and sql requires ALTER EXTENSION to be run as soon as possible, or some sql function from the old extension may try to call non-existing functions in the library - or worse the wrong ones or with wrong parameters. OTOH library-only changes don't strictly require ALTER EXTENSION - and trying to issue the command would fail if no path to the default version is available (leaving the admin puzzled about whether he installed the upgrade properly). Is an empty upgrade file the only way to get the extension metadata right? I wouldn't find it particularly bad, but better have it that have library-metadata mismatches or inconsistencies in the upgrade procedures I think. -- Daniele
В списке pgsql-hackers по дате отправления: