Re: No long-lived transaction, still can't delete tuples - Mailing list pgsql-general

From Tom Lane
Subject Re: No long-lived transaction, still can't delete tuples
Date
Msg-id 19981.1019689154@sss.pgh.pa.us
Whole thread Raw
In response to Re: No long-lived transaction, still can't delete tuples  (Jeffrey Baker <jwbaker@acm.org>)
Responses Re: No long-lived transaction, still can't delete tuples  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
List pgsql-general
Jeffrey Baker <jwbaker@acm.org> writes:
> 04 begin
> 05 work
> 06 commit
> 07 begin    connect
> 08 work     begin
> 09 commit   delete everything
> 10 begin    commit
> 11 work     vacuum <= this should get rid of everything < t = 07
> 12 commit   disconnect

Actually that vacuum should get rid of everything older than t=10.
What I'm concerned about is this scenario:

client A            client B        you

begin;
work...
commit;
begin;
take a lunch break...

                begin;
                work...
                commit;


                            connect
                            vacuum;

Until client A returns from his lunch break, you'll not be able to
vacuum the trash that client B generated, even though B has committed
his changes.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: odd psql behaviour on OSX
Next
From: Glen Eustace
Date:
Subject: Equivalent of FULLTEXT in mySQL