Warning
This plugin has been deprecated in favor of our Postgres destination for batch exports.
Export PostHog events to a PostgreSQL instance on ingestion.
Wherever your instance is hosted, make sure it is set to accept incoming connections so that we can connect to the database and insert events. If this is not possible in your case, you should consider using our S3 plugin and then setting up your own system for getting data into your Postgres instance.
We need to create a new table to store events and execute INSERT
queries. You can and should block us from doing anything else on any other tables. Giving us table creation permissions should be enough to ensure this:
CREATE USER posthog WITH PASSWORD '123456yZ';
GRANT CREATE ON DATABASE your_database TO posthog;