Session SQL databases survive server restarts
Databases created with the SQL database capability lived only in one server process’s memory, so a restart lost them and other server instances never saw them.
The server now keeps an in-memory SQLite cache per database and, after every
write, stores only the changed 4 KB pages in PostgreSQL in one transaction. A
server that does not have the database cached rebuilds it from the stored
pages, and each commit is a compare-and-set so concurrent writers cannot
overwrite each other. Agents keep using sql_execute, sql_query and
sql_schema as before.
See SQL database and #4553.