Simon Riggs writes:
> It looks to me like the correct fix would be to use
> GetUserIdAndContext() instead, though I would suggest inventing
> GetUserIdIfAny() which would skip the assertion test for use in
> superuser().
You are thinking at the wrong abstraction level. Even to ask if
the user is
TRAP: BadState("!(((bool) ((CurrentUserId) != ((Oid) 0", File:
"miscinit.c", Line: 295)
Gabriele Bartolini originally reported this to me as a bug in Hot
Standby, though I have now been able to reproduce in CVS head. We were
just unlucky enough to hit it while doing thorough HS testing.
back