Hi,
There is the PostgreSQL wiki page "Cgroups"[1] explaining the problem
statement and also potential issues for implementation.
Seems like nobody proposed any implementation for cgroups yet
Regards
Umar Hayat
[1] https://wiki.postgresql.org/wiki/Cgroups