On 23 October 2017 at 08:30, John Lumby <johnlu...@hotmail.com> wrote:
> All works but not perfectly -- at COMMIT, resource_owner issues > relcache reference leak messages about relation scans not closed > and also about snapshot still active. I guess that the CREATE has > switched resource_owner and pushed a snapshot, but I did not > debug in detail. A lot more work is required than what's done pg PG_CATCH to return to a queryable state. I've been down this path myself, and it's not fun. Take a look at all the extra work done on the error handling path in PostgresMain. At some point I'd really like to expose that in a more general way so it can be used from background workers. Right now AFAICS most background workers have to cope with errors with a proc_exit(1) and getting restarted to try again. Not ideal. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers