How can a standby read read transaction see a transient state?

In the PostgreSQL documentation on transaction isolation levels, we can read the following:

When performing all records of a persistent database as part of Serializable Transactions on the main server, make sure that all backups eventually reach a consistent state, a read-standby transaction can sometimes see a transient state that is incompatible with any sequential execution of serializable transactions on the master .

The above text is at the bottom of http://www.postgresql.org/docs/9.4/static/transaction-iso.html

In what circumstances could a repeat read transaction in standby mode see an inconsistent transient state?

+4
source share
2 answers

The answer from Geir Bostad is correct; I answer only to give an example and a possible workaround, as people often do not have enough heads. In addition to the Wiki page referenced by another answer, there is a separate Wiki page for an example that includes the “Deposit Report Example” , seeing the package as closed, but not yet able to see the final part for the batch.

, ; . , , . , , () . WAL , , DEFERRABLE START TRANSACTION; ( - ), , .

, ( , Oracle PostgreSQL 9.1), SELECT , "", , . , , , "" ( ) , , , , , ( , , ) .

, " " write-write. , " " deposit_total , ​​ AFTER, deposit_no , AFTER . , , .

+3

, .

wiki SSI postgresql-hackers, standbys.

post:

, ,   , .    , , .

     

[..]

     

, , ,    ,    .   , ,   , , , ,    .

     

[..]

     

SSI , .    ,    , ,    ,    . ,    -   , .   , - ,    ,    .

     

     .

+3

All Articles