Have you considered having many databases (e.g. 100) and possibly many postgresql servers (e.g. 10) started on different ports?This would give you 1000x less tables per db.
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных