Re: [HACKERS] redolog - for discussion - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] redolog - for discussion
Date
Msg-id 3677B71D.C67462B3@krs.ru
Whole thread Raw
In response to redolog - for discussion  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] redolog - for discussion
List pgsql-hackers
Jan Wieck wrote:
> 
>     RECOVER DATABASE {ALL | UNTIL 'datetime' | RESET};
> 
...
>
>         For  the  others, the backend starts the recovery program
>         which  reads  the  redolog  files,  establishes  database
>         connections  as  required  and reruns all the commands in
^^^^^^^^^^^^^^^^^^^^^^^^^^
>         them. If a required logfile isn't  found,  it  tells  the         ^^^^^

I foresee problems with using _commands_ logging for
recovery/replication -:((

Let's consider two concurrent updates in READ COMMITTED mode:

update test set x = 2 where y = 1;
and

update test set x = 3 where y = 1;

The result of both committed transaction will be x = 2
if the 1st transaction updated row _after_ 2nd transaction
and x = 3 if the 2nd transaction gets row after 1st one.
Order of updates is not defined by order in which commands
begun and so order in which commands should be rerun
will be unknown...

Comments?

Vadim


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] 'pgsql/src/backend/storage/ipc shmem.c'
Next
From: Vadim Mikheev
Date:
Subject: MVCC works in serialized mode!