Andrew Dunstan wrote:
>
> I did have a thought that it could be done lazily (on backend startup)
> on other databases and immediately on the current database. I guess it
> depends on the cost of checking for such things - wouldn't want to add
> greatly to startup time.
>
> That would leave a small window of orphanage for existing backends on
> other databases, but is arguably an improvement on the current situation.
>
> OTOH I'm not sure how much harm this causes, other than aesthetic.
>
Dropping a user could merely set a "dropped" flag to disable login, and
some VACUUM action could cleanup databases.
Regards,
Andreas