Creating this issue as a placeholder / reminder for a more detailed deep dive in the future into how we're using the DATABASE_SCHEMA env var and devops procedures we can anticipate that may be related to this env var.
FYI the database schema variable is mostly for ponder indexer to avoid clobbering each other (for example when deploying a new version of the indexer pointing to the same db, it should index to a new schema, and then the hosting provider can swap instances when the healthcheck is ready — that's why the default example is the RAILWAY_DEPLOYMENT_ID or whatever. we were also using schema to separate the different plugins, but now that we're unifying them we'll continue to use DATABASE_SCHEMA in the ponder-specific way
Please check the current PG database we have on Railway. You’ll see there’s multiple schemas already, and this number will just keep growing. Ponder is currently creating a new PG schema each time we push to the assigned branch based on the way we have Railway configured. There’s a number of opportunities for optimisation here. First, we lack garbage collection solutions for old schemas. We also ideally could decide which commits should trigger a full rebuild of Ponder’s state in a new schema. And related to this: We need a strategy to maintain uptime when we want to deploy updated indexer logic.
Creating this issue as a placeholder / reminder for a more detailed deep dive in the future into how we're using the
DATABASE_SCHEMAenv var and devops procedures we can anticipate that may be related to this env var.