From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Alfred Perlstein" <bright(at)wintelcom(dot)net>, <pgsql-hackers(at)hub(dot)org> |
Subject: | RE: Orphaned locks in 7.0? |
Date: | 2000-05-26 03:16:06 |
Message-ID: | 000501bfc6c0$bade1400$2801007e@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Hiroshi Inoue
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> >
> > Anyway, it sounds like we agree that this is the approach to pursue.
> > Do you have time to chase down the details?
>
> OK,I will examine a little though I'm a little busy this week.
>
Sorry,I'm so late and haven't so much time to examin the details.
I'm afraid another point now.
Woundn't this change waste XIDs in case of abort loop ?
Anyway,I examied the loop in PostgresMain()
(;;)
{
..
StartTransactionCommand()
..
pg_exec_query()
..
CommitTransactionCommand()(/AbortCurrentTrabsaction())
..
}
In my thoughts,the follwoing commands preceded by +?
would be added,ones preceded by -? would be removed.
StartTransactionCommand()
TBLOCK_DEFAULT StartTransaction() ->
TBLOCK_BEGIN -> TBLOCK_INPROGRESS
TBLOCK_INPROGRES ->
TBLOCK_END CommitTransaction() ->
StartTransaction() -> TBLOCK_DEFAULT
TBLOCK_ABORT ->
TBLOCK_ENDABORT ->
CommitTransactionCommand()
TBLOCK_DEFAULT CommitTransaction() ->
TBLOCK_BEGIN -> TBLOCK_INPROGRESS
TBLOCK_INPROGRESS CommandCounterIncrement() ->
TBLOCK_END CommitTransaction() -> TBLOCK_DEFAULT
TBLOCK_ABORT +? AbortTransaction()
+? StartTransaction() ->
TBLOCK_ENDABORT +? AbortTransaction() -> TBLOCK_DEFAULT
BeginTransactionBlock() ( <- BEGIN command )
TRANS_DISABLED ->
otherwise -> TBLOCK_BEGIN -> TBLOCK_INPROGRESS
UserAbortTransaction() ( <- ROLLBACK command )
TRANS_DISABLED ->
TBLOCK_INPROGRESS -? AbortTransaction() -> TBLOCK_ENDABORT
TBLOCK_ABORT -> TBLOCK_ENDABORT
otherwise -? AbortTransaction() -> TBLOCK_ENDABORT
EndTransactionBlock() ( <- COMMIT command )
TRANS_DISABLED ->
TBLOCK_INPROGRESS -> TBLOCK_END
TBLOCK_ABORT -> TBLOCK_ENDABORT
otherwise -> TBLOCK_ENDABORT
AbortCurrentTransaction() ( elog(ERROR/FATAL) )
TBLOCK_DEFAULT AbortTransaction() ->
TBLOCK_BEGIN AbortTransaction()
+? StartTransaction() -> TBLOCK_ABORT
TBLOCK_INGRESS AbortTransaction()
+? StartTransaction() -> TBLOCK_ABORT
TBLOCK_END AbortTransaction() -> TBLOCK_DEFAULT
TBLOCK_ABORT +? AbortTransaction()
+? StartTransaction() ->
TBLOCK_ENDABORT +? AbortTransaction() -> TBLOCK_DEFAULT
AbortOutAnyTransaction() ( Async_UnlistenOnExit() )
TRANS_DEFAULT -> TBLOCK_DEFAULT
otherwise AbortTransaction() -> TBLOCK_DEFAULT
Regards.
Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-05-26 03:17:18 | smgrwrite() without LockBuffer(was RE: Shouldn't flush dirty buffers at shutdown ?) |
Previous Message | Joseph Shraibman | 2000-05-26 03:11:44 | aliases break my query |