Обсуждение: synchronous_commit and mvcc
Hello,
We have synchronous_commit=off in our postgresql.conf file. Does this setting affect mvcc? For instance if I have two connections from processes on different machines that do the following:
c1 begins transaction
c1 inserts rows into table
c1 commits transaction
c2 begins transaction
c2 queries table
At this point, is it possible that c2 is not able to see the rows from connection 1 that were inserted and committed prior to the c2 transaction starting?
Thanks,
-K
We have synchronous_commit=off in our postgresql.conf file. Does this setting affect mvcc? For instance if I have two connections from processes on different machines that do the following:
c1 begins transaction
c1 inserts rows into table
c1 commits transaction
c2 begins transaction
c2 queries table
At this point, is it possible that c2 is not able to see the rows from connection 1 that were inserted and committed prior to the c2 transaction starting?
Thanks,
-K
On Wed, Aug 12, 2009 at 8:28 PM, Kelly Burkhart<kelly.burkhart@gmail.com> wrote: > Hello, > > We have synchronous_commit=off in our postgresql.conf file. Does this > setting affect mvcc? If you don't have a crash then there is absolutely no difference from the clients' point of view (besides speed). If you have a crash you could lose the last 200ms of commits but if that happens you'll lose them in a "consistent" way. You can't find the results of one transaction committed afterwards but not some other transaction which came earlier. -- greg http://mit.edu/~gsstark/resume.pdf
Kelly Burkhart wrote: > Hello, > > We have synchronous_commit=off in our postgresql.conf file. Does this > setting affect mvcc? For instance if I have two connections from > processes on different machines that do the following: > > c1 begins transaction > c1 inserts rows into table > c1 commits transaction > c2 begins transaction > c2 queries table > > At this point, is it possible that c2 is not able to see the rows from > connection 1 that were inserted and committed prior to the c2 > transaction starting? > > Thanks, > > -K > Does this setting affect mvcc? No, only how its saved to disk. Clients will see no difference. But transaction isolation can mess with it: http://www.postgresql.org/docs/8.3/static/transaction-iso.html -Andy