Re: pg_background (and more parallelism infrastructure patches) - Mailing list pgsql-hackers
From | Robert Haas |
---|---|
Subject | Re: pg_background (and more parallelism infrastructure patches) |
Date | |
Msg-id | CA+TgmobPiT_3Qgjeh3_v+8Cq2nMczkPyAYernF_7_W9a-6T1PA@mail.gmail.com Whole thread Raw |
In response to | Re: pg_background (and more parallelism infrastructure patches) (Andres Freund <andres@2ndquadrant.com>) |
Responses |
Re: pg_background (and more parallelism infrastructure
patches)
|
List | pgsql-hackers |
So, summarizing the state of this patch set: - Patches 1, 2, 3, and 5 are committed. - Patch 4 has had some review and really, as far as I can tell, the only really major issue that has cropped up is the possibility that the GUC settings that are legal in backend A aren't legal in backend B for some reason; in that case, restoring the GUC settings there will probably fail. While this is a legitimate concern, I think what it really boils down to is that there's a possibility that there are libraries loaded in the user backend that are not loaded in the postmaster and therefore won't get loaded into the background worker. That's an issue to which we may need to engineer some solution, but not in this patch. Overall, the patch's architecture is modeled closely on the way we synchronize GUCs to new backends when using EXEC_BACKEND, and I don't think we're going do any better than stating with that and working to file down the rough edges as we go. So I'd like to go ahead and commit this. - Patch 6, pg_background itself, has a number of outstanding issues. Some people aren't sure it's useful enough to really be worth bothering with; other people seem quite excited about it, even to the point of wanting to push it all the way into core. Whatever we ultimately decide to do there, the patch as it stands today is clearly not ready for commit. The issues I know of are: -- I still haven't written documentation for it. -- There's some code duplication with exec_simple_query() that doesn't feel great, but it's not clear that there's a superior alternative. I think we certainly don't want to complicate exec_simple_query() to make pg_background happy. -- We should add REVOKE to the SQL script that installs it so that non-superusers can't use it unless the superuser decides to grant them rights. -- It doesn't handle types without send/receive functions. I thought that was tolerable since the functions without such types seem like mostly edge cases, but Andres doesn't like it. Apparently, BDR is makes provisions to either ship the tuple as one big blob - if all built-in types - or else use binary format where supported and text format otherwise. Since this issue is common to BDR, parallelism, and pg_background, we might want to introduce some common infrastructure for it, but it's not too clear to me right now what that should look like. -- Evil things can happen if the background process changes client_encoding. -- Even if I fix all that stuff, it's not entirely clear that there's a consensus in favor of the patch at all. I certainly think that as far as this CommitFest is concerned, patch 6 ought to be considered Returned with Feedback. Many thanks to Andres and all for reviewing. What I am less certain about is whether it makes sense to spend the energy fixing the above issues in the short-term. I wrote pg_background mostly a demonstration that the rest of these patches work and can be used to accomplish useful stuff, whether as part of parallelism or otherwise; and there's a lot of work left to be done on parallelism proper that won't necessarily benefit from polishing pg_background first. So, questions: 1. Any other opinions for or against pg_background as a concept? I thought the ability to kick of vacuums (or other stuff with PreventTransactionChain) asynchronously was pretty cool, as we as the ability to use it as an authentication-free loopback dblink. But opinions obviously vary. 2. Is anyone sufficiently interested in pg_background as a concept that they'd be willing to take over the patch and work on the TODO list mentioned above? Thanks, -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
pgsql-hackers by date: