BUG #13800: There is no UNLOAD command

Started by Daniel Migowskiover 10 years ago4 messagesbugs
Jump to latest
#1Daniel Migowski
dmigowski@ikoffice.de

The following bug has been logged on the website:

Bug reference: 13800
Logged by: Daniel Migowski
Email address: dmigowski@ikoffice.de
PostgreSQL version: 9.1.19
Operating system: Windows
Description:

Hello,

from the documentation i read that LOAD loads a shared library.

While creating extensions in C it is very cumbersome to disconnect, restart,
connect everytime I recompile my C stuff.

A reload option wouldn't help also because on Windows I cannot overwrite the
DLL while it is opened in Postgres, so I need an UNLOAD command.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Daniel Migowski (#1)
Re: BUG #13800: There is no UNLOAD command

dmigowski@ikoffice.de writes:

While creating extensions in C it is very cumbersome to disconnect, restart,
connect everytime I recompile my C stuff.

Why would you need to restart? Just starting a fresh connection ought to
be enough.

There's pretty much no chance UNLOAD will ever happen, so don't hold your
breath waiting. We lack any defined method, for example, for extensions
to disconnect from function hooks once they've inserted something in them.
(Reversing what was done at LOAD time wouldn't work, since it'd break any
subsequent attachments to the same hook.) Custom GUCs would be another
big problem to reverse out, and if I'd consumed any caffeine yet today
I could probably name several other trouble spots. It's not insoluble,
perhaps, but the amount of work required seems far out of proportion to
the benefits.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#3Daniel Migowski
dmigowski@ikoffice.de
In reply to: Tom Lane (#2)
Re: BUG #13800: There is no UNLOAD command

Thanks for that explanation.

I need to restart the server because on Windows I can't overwrite the DLL while it is loaded. So I have to restart the server every time. And because of my paying customers I have to do coding on Windows.

Regards,
Daniel Migowski

-----Ursprüngliche Nachricht-----
Von: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Gesendet: Sonntag, 6. Dezember 2015 16:58
An: Daniel Migowski <dmigowski@ikoffice.de>
Cc: pgsql-bugs@postgresql.org
Betreff: Re: [BUGS] BUG #13800: There is no UNLOAD command

dmigowski@ikoffice.de writes:

While creating extensions in C it is very cumbersome to disconnect,
restart, connect everytime I recompile my C stuff.

Why would you need to restart? Just starting a fresh connection ought to be enough.

There's pretty much no chance UNLOAD will ever happen, so don't hold your breath waiting. We lack any defined method, for example, for extensions to disconnect from function hooks once they've inserted something in them.
(Reversing what was done at LOAD time wouldn't work, since it'd break any subsequent attachments to the same hook.) Custom GUCs would be another big problem to reverse out, and if I'd consumed any caffeine yet today I could probably name several other trouble spots. It's not insoluble, perhaps, but the amount of work required seems far out of proportion to the benefits.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#4John R Pierce
pierce@hogranch.com
In reply to: Daniel Migowski (#3)
Re: BUG #13800: There is no UNLOAD command

On 12/6/2015 9:42 PM, Daniel Migowski wrote:

Thanks for that explanation.

I need to restart the server because on Windows I can't overwrite the DLL while it is loaded. So I have to restart the server every time. And because of my paying customers I have to do coding on Windows.

when you close a connection, the postgres process servicing that
connection closes, this should close any DLL's it has open. naturally,
you'd need to close ALL the connections to the database that has the dll
loaded ...

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs