https://github.com/postgres/postgres/blob/master/src/backend/catalog/namespace.c#L3313
/*
- GetTempNamespaceBackendId - if the given namespace is a temporary-table
- namespace (either my own, or another backend's), return the BackendId
- that owns it. Temporary-toast-table namespaces are included, too.
- If it isn't a temp namespace, return InvalidBackendId.
*/
int
GetTempNamespaceBackendId(Oid namespaceId)
{