Skip to content

Multi-Schema Postgres DB #58643

@ioripov98

Description

@ioripov98

Feature request

Is your feature request related to a problem?

Yes

Please describe.

The postgres connection in PostHog (Sync to Warehouse) currently allows one schema per connection. If a postgres DB has multiple schemas, users have to set up a separate connection in PostHog for each schema. Our database is designed to have one schema for each of our clients and we have 1000+ schemas in our database. It is super manual and not scalable to create 1000+ connections in PostHog to bring data from all the schemas.

Describe the solution you'd like

The Ideal solution: the Postgres connnection in PostHog allows users to select all the schemas or multiple schemas. Once the connection is set up, users can query data from any or all schemas inside PostHog.

It would be great if there is an automated way to consolidate (union all) tables from all schemas into master tables

Describe alternatives you've considered

Airbyte + Snowflake + dbt to consolidate (union all) tables from all schemas into master tables and then bringing those master tables into PostHog. But this creates additonal steps, layers and costs

Additional context

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions