Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it to register them only once, as all other users of cache callbacks already take care to do.
This has been broken all along, so back-patch to all supported branches. Shi Yu Discussion: https://postgr.es/m/oszpr01mb631004a78d743d68921ffad3fd...@oszpr01mb6310.jpnprd01.prod.outlook.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/44dbc960f6711e32118a8da71f251d65e0630caa Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
