On Wed, Jun 5, 2024 at 8:01 PM Heikki Linnakangas <hlinn...@iki.fi> wrote: > I'm very much in favor of a runtime toggle. To be precise, a > PGC_POSTMASTER setting. We'll get a lot more testing if you can easily > turn it on/off, and so far I haven't seen anything that would require it > to be a compile time option.
I was thinking about global variable annotations. If someone wants to build without multithreading, I think that they won't want to still end up with a ton of variables being changed to thread-local. So I think there has to be a build-time option controlling whether this build supports threading. I suspect there will be other people who want to just shut all of this experimental code off, which is probably going to be a second driver for a build-time toggle. But even with that, we can still have a GUC controlling whether threading is actually used. Does that make sense to you? Supposing it does, then how does the extension-marking system need to work? I suppose in this world we don't want any build failures: you're allowed to build a non-thread-aware extension against a threading-capable PostgreSQL; you're just not allowed to load the resulting extension when the server is in threading mode. -- Robert Haas EDB: http://www.enterprisedb.com