<role>.<branch id>), and
Midplane’s switch logs in as the role’s name alone. So use a read-only
role from PlanetScale’s dashboard instead of the role script.
1
Make a read-only role
On the branch you want, create a role with
pg_read_all_data as its
only permission, and copy its credentials
(PlanetScale’s roles).2
Write the connection string
Use the direct port, 5432, and the user as PlanetScale gives it:To read a replica, add
|replica to the user. sslrootcert shows as
Ignored, which is fine.3
Let Midplane in, if IP restrictions are on
Under Settings, IP restrictions, add both of your region’s
egress addresses
(PlanetScale’s IP restrictions).
If you connected with the default postgres role
If you connected with the default postgres role
Don’t run the role script: it makes a role Midplane can’t switch to.
Paste the read-only role’s string under Credentials and select
Test and replace.