[HACKERS] Access to transaction status

2003-06-19 Thread Christian Plattner
Hi all, I am currently implementing an experimental middleware based replicator for a set of fully replicated databases. Do be able to handle all sorts of failures I needed two functions: - A function to get the current XID - A function which I can use later to tell if a given XID

[HACKERS] Access to transaction status

2003-06-19 Thread Christian Plattner
Hi all, I am currently implementing an experimental middleware based replicator for a set of fully replicated databases. Do be able to handle all sorts of failures I needed two functions: - A function to get the current XID - A function which I can use later to tell if a given XID

Re: [HACKERS] Access to transaction status

2003-06-20 Thread Christian Plattner
- Original Message - From: Jeroen T. Vermeulen [EMAIL PROTECTED] I ran into the same need (Bruce, we discussed this at FOSDEM in Brussels this February) for libpqxx. My code tries to compensate for the possibility that the backend connection is lost while waiting for a reply to a

Re: [HACKERS] Access to transaction status

2003-06-20 Thread Christian Plattner
- Original Message - From: Tom Lane [EMAIL PROTECTED] How much later? clog is not kept forever. Due to my setup, I could assure, that for the XID I ask for always (ShmemVariableCache-nextXid - XID) C (and C is in my case something around 150). holds. A possible solution could be

Re: [HACKERS] Access to transaction status

2003-06-20 Thread Christian Plattner
- Original Message - From: Jeroen T. Vermeulen [EMAIL PROTECTED] I see a race condition in this approach: if you reconnect too fast, and the backend which actually should commit is still in progress (assume it takes a while to commit for whatever reasons) you get the impression

Re: [HACKERS] Access to transaction status

2003-06-20 Thread Christian Plattner
- Original Message - From: Tom Lane [EMAIL PROTECTED] How much later? clog is not kept forever. I took a deeper look into the source. Forget my last posting. As far as I understand your code there is only one chance that information in clog gets lost: If XIDs are reused then

Re: [HACKERS] Access to transaction status

2003-06-20 Thread Christian Plattner
- Original Message - From: Jeroen T. Vermeulen [EMAIL PROTECTED] btw: There could be also other reasons for the client to loose the connection (i.e. client process crashes). In that case the client would lose all its state as well, so not really a problem that can be handled

Re: [HACKERS] Access to transaction status

2003-06-22 Thread Christian Plattner
- Original Message - From: Jeroen T. Vermeulen [EMAIL PROTECTED] I ran into the same need (Bruce, we discussed this at FOSDEM in Brussels this February) for libpqxx. My code tries to compensate for the possibility that the backend connection is lost while waiting for a reply to a