|From:||Shay Rojansky <roji(at)roji(dot)org>|
|Subject:||UNLISTEN, DISCARD ALL and readonly standby|
|Views:||Raw Message | Whole Thread | Download mbox|
The documentation for DISCARD ALL state that it is equivalent to a
series of commands which includes UNLISTEN *. On the other hand, the docs
for hot standby mode, state that UNLISTEN * is unsupported while DISCARD
is (although the docs don't specify whether this includes DISCARD ALL). I
haven't done a test, but this seems to indicate that while DISCARD ALL is
supported in hot standby mode, UNLISTEN is not, although its functionality
is included in the former.
If this is indeed the case, is there any specific reason UNLISTEN can't be
supported? This is actually quite important in the case of Npgsql (.NET
driver). When a connection is returned to the connection pool, its state is
reset - usually with a DISCARD ALL. However, if prepared statements exist,
we avoid DISCARD ALL since it destroys those (the DEALLOCATE ALL component
of DISCARD ALL), and we want to keep prepared statements across connection
lifecycles for performance. So instead of issuing DISCARD ALL, Npgsql sends
the equivalent commands excluding DEALLOCATE ALL - but UNLISTEN * fails
when in recovery.
So ideally UNLISTEN would be made to work in standby model, just like
DISCARD ALL. If DISCARD ALL is in fact unsupported in hot standby mode,
then the docs should probably be updated to reflect that.
Thanks for any information or advice on this!
|Next Message||Fabien COELHO||2018-10-25 08:16:03||Re: Online verification of checksums|
|Previous Message||Richard Guo||2018-10-25 07:42:05||Re: Pull up sublink of type 'NOT NOT (expr)'|