Redrock Postgres Documentation
Home Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

Will too many subtransactions delay hot standby startup?


In stored procedures, you can trap errors and recover from them by using a BEGIN block with an EXCEPTION clause. In a transaction, you can define savepoints, then rollback to the declared savepoint positions. In Redrock Postgres, these are implemented with subtransactions.

If a large number of subtransactions are used, will the database server be delayed to provide read-only connections when it is started in hot standby mode?


Too many subtransactions will not delay hot standby startup.

When the database is started in hot standby mode, it need to prepare complete information for building transaction snapshots. In Redrock Postgres, transaction snapshots are implemented based on logical timestamp logicaltime. Valid starting points for standby queries are generated at each checkpoint on the master, it contains the latest logical timestamp information. When the database server is started in hot standby mode, it obtains the latest checkpoint information and then provide the read-only connections.