Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-21 Thread Ivan Sergio Borgonovo
On Tue, 20 May 2008 17:04:25 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Tue, May 20, 2008 at 08:56:41PM +0200, Ivan Sergio Borgonovo wrote: I just would like to have a coherent snapshot of some tables. If you have a multi-statement transaction, then if you are in READ COMMITTED

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-20 Thread Andrew Sullivan
On Sun, May 18, 2008 at 02:04:56PM +0200, Ivan Sergio Borgonovo wrote: What is the effect of having nested functions all declared SERIALIZABLE? You can't do that. You have to declare SERIALIZABLE right at the beginning of the transaction, or it won't work (and, IIRC, it throws an error).

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-20 Thread Ivan Sergio Borgonovo
On Fri, 16 May 2008 09:55:56 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Fri, May 16, 2008 at 09:06:11AM +0200, Ivan Sergio Borgonovo wrote: Is BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE what I'm looking for? Yes. OK... What if I want to avoid the rollback problem and avoid

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-20 Thread Andrew Sullivan
On Tue, May 20, 2008 at 08:56:41PM +0200, Ivan Sergio Borgonovo wrote: I just would like to have a coherent snapshot of some tables. If you have a multi-statement transaction, then if you are in READ COMMITTED you can see changes, and if you are in SERIALIZABLE you can't. You can't of course

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-20 Thread Simon Riggs
On Tue, 2008-05-20 at 17:04 -0400, Andrew Sullivan wrote: On Tue, May 20, 2008 at 08:56:41PM +0200, Ivan Sergio Borgonovo wrote: I just would like to have a coherent snapshot of some tables. If you have a multi-statement transaction, then if you are in READ COMMITTED you can see changes,

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-18 Thread Ivan Sergio Borgonovo
On Fri, 16 May 2008 09:55:56 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Fri, May 16, 2008 at 09:06:11AM +0200, Ivan Sergio Borgonovo wrote: Is BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE what I'm looking for? Yes. Perfect, thanks. What is the effect of having nested

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-18 Thread Douglas McNaught
On Sun, May 18, 2008 at 8:04 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: What is the effect of having nested functions all declared SERIALIZABLE? What if just the outermost is declared SERIALIZABLE? SERIALIZABLE applies to the entire transaction, not to individual function calls.

[GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-16 Thread Ivan Sergio Borgonovo
My target is to take a snapshot of a slice of some tables and put the result in a log, regardless of writes made after I started to take the snapshot. something like: create or replace function snapshot(out stats int) as $$ begin -- prepare stuff from t1, t2, t3 -- save it in other tables

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-16 Thread Andrew Sullivan
On Fri, May 16, 2008 at 09:06:11AM +0200, Ivan Sergio Borgonovo wrote: Is BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE what I'm looking for? Yes. A -- Andrew Sullivan [EMAIL PROTECTED] +1 503 667 4564 x104 http://www.commandprompt.com/ -- Sent via pgsql-general mailing list