pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Allow notifications to bgworkers without database connections. 2+ messages / 1 participants [nested] [flat]
* pgsql: Allow notifications to bgworkers without database connections. @ 2015-09-01 20:32 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2015-09-01 20:32 UTC (permalink / raw) To: pgsql-committers Allow notifications to bgworkers without database connections. Previously, if one background worker registered another background worker and set bgw_notify_pid while for the second background worker, it would not receive notifications from the postmaster unless, at the time the "parent" was registered, BGWORKER_BACKEND_DATABASE_CONNECTION was set. To fix, instead instead of including only those background workers that requested database connections in the postmater's BackendList, include them all. There doesn't seem to be any reason not do this, and indeed it removes a significant amount of duplicated code. The other option is to make PostmasterMarkPIDForWorkerNotify look at BackgroundWorkerList in addition to BackendList, but that adds more code duplication instead of getting rid of it. Patch by me. Review and testing by Ashutosh Bapat. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/b8a439b650c4791575720dec847be61467a710a4 Modified Files -------------- src/backend/postmaster/postmaster.c | 136 +++++++---------------------------- 1 file changed, 25 insertions(+), 111 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Allow notifications to bgworkers without database connections. @ 2015-09-01 20:32 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2015-09-01 20:32 UTC (permalink / raw) To: pgsql-committers Allow notifications to bgworkers without database connections. Previously, if one background worker registered another background worker and set bgw_notify_pid while for the second background worker, it would not receive notifications from the postmaster unless, at the time the "parent" was registered, BGWORKER_BACKEND_DATABASE_CONNECTION was set. To fix, instead instead of including only those background workers that requested database connections in the postmater's BackendList, include them all. There doesn't seem to be any reason not do this, and indeed it removes a significant amount of duplicated code. The other option is to make PostmasterMarkPIDForWorkerNotify look at BackgroundWorkerList in addition to BackendList, but that adds more code duplication instead of getting rid of it. Patch by me. Review and testing by Ashutosh Bapat. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/8a02b3d732cf3ec13e089768bf9ce9abbdcc8a3e Modified Files -------------- src/backend/postmaster/postmaster.c | 136 +++++++---------------------------- 1 file changed, 25 insertions(+), 111 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-09-01 20:32 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-01 20:32 pgsql: Allow notifications to bgworkers without database connections. Robert Haas <rhaas@postgresql.org> 2015-09-01 20:32 pgsql: Allow notifications to bgworkers without database connections. Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox