server_db_pool_t *server_db_pool_lookup(char *id)
Returns a pool when successful, or NULL on failure.
The module must get the identifier somehow. This is usually done by adding a database identifier string in the modules configuration option list.
It's NOT recommended to hard-code database identifiers.
Also note that this is not a fast path, the list of configured pools is not indexed or hashed or anything special. It's simply a list and a lookup consists of walking it comparing the id to the pool titles.
This means you should not call this function frequently. It doesnt make sense for you to ever call it frequently anyways, because the configuration cannot change during module operation.
So if your module uses databases perform your pool lookups in the prestart or beginning of the operator, not in a worker or main event loop.