Pergunta

This is probably of little importance, but it's possible in PostgreSQL to retrieve the transaction snapshot with pg_export_snapshot and restore it with set transaction to start a second transaction with the same level of visibility (see the documentation).

I'm interested to know if that works on a hot-standby or is specific to a single server? Could you export a snapshot on the standby and then use it with set transaction on the master? I doubt it.

Foi útil?

Solução

I just tried it, and it is not possible, because exported snapshots are not replicated.

Snapshots are persisted in the pg_snapshots subdirectory of the data directory, and you will see that they don't show up on the standby.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top