Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: >>> Right. This is expected. VACUUM cannot remove them because the >>> serializable transaction might still want to see those rows. > Joseph S wrote: >> The serializable transaction *can't* see those rows, they were created >> and obsoleted after the

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Alvaro Herrera
> Alvaro Herrera wrote: > >Joseph S wrote: > >>I realize this thread is old, but I just conducted an experiment with pg > >>8.0.10 and a transaction with a SERIALIZABLE isolation level does > >>prevent VACUUM from reclaiming rows that were created and then obsoleted > >> in a subsequent transact

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Joseph S
The serializable transaction *can't* see those rows, they were created and obsoleted after the start of the transaction. The point of make the transaction serializable in the first place was to allow VACUUM to reclaim those rows. Alvaro Herrera wrote: Joseph S wrote: I realize this thread i

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Alvaro Herrera
Joseph S wrote: > I realize this thread is old, but I just conducted an experiment with pg > 8.0.10 and a transaction with a SERIALIZABLE isolation level does > prevent VACUUM from reclaiming rows that were created and then obsoleted > in a subsequent transaction. Right. This is expected. VA

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Joseph S
I realize this thread is old, but I just conducted an experiment with pg 8.0.10 and a transaction with a SERIALIZABLE isolation level does prevent VACUUM from reclaiming rows that were created and then obsoleted in a subsequent transaction. Martijn van Oosterhout wrote: On Thu, Oct 19, 2006

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/19/06 15:22, Martijn van Oosterhout wrote: > On Thu, Oct 19, 2006 at 04:18:50PM -0400, Joseph Shraibman wrote: >> I'm running postgres 8.0.8. I have a table that is updated very >> rapidly, so I vacuum it every 10 minutes. The problem is that

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Tom Lane
Joseph S writes: > But if the tuple in question was created and then deleted after the > transaction, the transaction should still not need to see it. No, because it might have taken a snapshot during the interval where the tuple was good. regards, tom lane

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Joseph S
But if the tuple in question was created and then deleted after the transaction, the transaction should still not need to see it. Martijn van Oosterhout wrote: On Thu, Oct 19, 2006 at 04:25:09PM -0400, Joseph S wrote: The problem is that the "old" transaction can see effects of later started t

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Martijn van Oosterhout
On Thu, Oct 19, 2006 at 04:25:09PM -0400, Joseph S wrote: > >The problem is that the "old" transaction can see effects of later > >started transactions, so VACUUM can't delete the later stuff either... > > How can it see effects of transactions that started after it? Check the documentation for t

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Joseph S
Martijn van Oosterhout wrote: Sure, don't keep transactions open for so long. Is there a particular reason you do that? Because I have a leak somewhere? Even if the transaction isn't that old it will still cause me some table bloat in the meantime. The problem is that the "old" transaction

Re: [GENERAL] VACUUM and open transactions

2006-10-19 Thread Martijn van Oosterhout
On Thu, Oct 19, 2006 at 04:18:50PM -0400, Joseph Shraibman wrote: > I'm running postgres 8.0.8. I have a table that is updated very > rapidly, so I vacuum it every 10 minutes. The problem is that I > sometimes have transactions that hang out for a long time without doing > anything. These tra

[GENERAL] VACUUM and open transactions

2006-10-19 Thread Joseph Shraibman
I'm running postgres 8.0.8. I have a table that is updated very rapidly, so I vacuum it every 10 minutes. The problem is that I sometimes have transactions that hang out for a long time without doing anything. These transactions are preventing VACUUM from cleaning up tuples that were created