An OID can represent a lot of things. So, instead of suggesting the OID type by parameter name, I wonder if it is better do that with the function name, like TerminateBgWorkersByDbOid(Oid oid)
After receiving your comment, I checked other functions and there is no other examples like XXOid function in the code. If this function use only here, original code is using databaseId in argument and it clear what Oid is. I think original name is fine because it's not a function that's called much elsewhere.
By searching for “ByOid”, we can get some existing examples:
The function name indicates ResultRel, so the oid is a result oid.
AccessMethodInfo*
findAccessMethodByOid(Oidoid)
The function name tells to find access method, the the oid is an access method’s OID.
You can find more …
But in this patch, the function name only indeeds “terminate background workers”, while the oid is a database oid. Maybe we can rename the function to “TerminateDatabaseBgWorkersByOid()”.
Best regards,
--
Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/