The discovery tool is open source and available on GitHub. Essential setup steps are below. Advanced usage, troubleshooting, and detailed reference are available in the full documentation.
What it discovers
Database analysis:- PostgreSQL version, configuration, and installed extensions
- Schema structure, including schemas, tables, columns, indexes, constraints, and sizes
- Performance statistics such as cache hit ratios, table/index usage, and active locks
- Security configuration: roles, permissions, and SSL settings
- Feature usage: foreign data wrappers, partitioning, PostGIS, and more
- Database instances, clusters, and their configurations
- Supabase, Heroku Postgres, and Neon project metadata
- VPC networking, subnets, security groups, and firewall rules
- Performance metrics from cloud monitoring services
- High availability and replica configurations
Installation
The discovery tool requires Python 3.10 or later.1
Download and extract
Download the latest release from GitHub and extract it:
2
Run setup
The setup script verifies your Python version, creates a virtual environment, installs dependencies, and writes a starter
config.yaml:3
Configure credentials
Edit the generated configuration file to include your database and cloud provider credentials:At a minimum, configure your database connection. See Configuration below for the full format.
Database user setup
Create a dedicated read-only user for the discovery tool. Connect to your PostgreSQL database as a superuser or privileged role and run the following:If your database has additional schemas beyond
public, repeat the GRANT USAGE ON SCHEMA and GRANT SELECT ON ALL TABLES IN SCHEMA statements for each schema you want analyzed.PostgreSQL cleanup
Configuration
The discovery tool uses a YAML configuration file. Running./ps-discovery loads ./config.yaml by default. Configure the database block for database discovery and enable any cloud providers you want included:
Running discovery
Run discovery with the generatedconfig.yaml:
planetscale_discovery_results_20260708T072229.json. Upload this report to the migration assessment tool for instant feedback, or share it with PlanetScale for migration planning assistance.
Once PostgreSQL discovery is complete, remember to clean up the
planetscale_discovery user you created on your source database.Cloud provider setup
Each cloud provider requires specific credentials and permissions. Below is a summary of what you need for each. For detailed instructions including IAM policies and API enablement steps, see the provider documentation. For third-party hosted Postgres providers, the discovery tool supports Supabase, Heroku, and Neon.AWS (RDS / Aurora)
The tool discovers RDS instances, Aurora clusters, VPC networking, security groups, and CloudWatch metrics. Authentication (choose one):- IAM instance profile (recommended when running on EC2)
- Access key and secret key
- IAM role assumption (for cross-account access)
- RDS:
DescribeDBInstances,DescribeDBClusters,DescribeDBSubnetGroups - EC2:
DescribeVpcs,DescribeSubnets,DescribeSecurityGroups,DescribeRouteTables - CloudWatch:
GetMetricStatistics,ListMetrics
Google Cloud (Cloud SQL / AlloyDB)
The tool discovers Cloud SQL instances, AlloyDB clusters, VPC networks, firewall rules, and Cloud Monitoring metrics. Authentication (choose one):- Application Default Credentials (recommended)
- Service account key file
- Cloud SQL Admin API
- Compute Engine API
- Cloud Monitoring API
- AlloyDB API (if using AlloyDB)
Supabase
The tool discovers project metadata, database configuration, PgBouncer settings, and connection details. Authentication:- Personal Access Token (recommended, read-only)
Neon
The tool discovers Neon project metadata, branch topology, compute endpoints, autoscaling configuration, connection pooling, and database names. Authentication:- API key from Neon. See Manage API keys in the Neon docs.
- Or the
NEON_API_KEYenvironment variable
Heroku
The tool discovers Heroku Postgres add-ons across all your apps, including plan details, database sizes, replica configurations, and connection pooling. Authentication:- API key from the Heroku dashboard
- Or a Heroku CLI authorization token
Performance and safety
The default database analyzers are safe to run against production databases. They use read-only queries against system catalogs and statistics views, with very low performance impact.Privacy and security
The discovery tool runs entirely on your infrastructure. No data is sent to external services during analysis. Collected: Schema metadata, database configuration, usage statistics, infrastructure topology, and role names. Not collected: Table contents, row data, application queries, passwords, or secrets. Passwords are used only to establish the database connection and are never included in the output.Get an instant migration assessment
Once you have your discovery report, upload it to our migration assessment tool for immediate feedback. The tool analyzes your report and provides:- An overview of your existing database and optionally hosting provider
- Extension compatibility issues, schema defects, and any migration blockers
- A recommended migration path with main steps involved and the estimated duration

