Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2020-02-21 Thread Masahiko Sawada
On Tue, 18 Feb 2020 at 00:40, Muhammad Usama wrote: > > Hi Sawada San, > > I have a couple of comments on > "v27-0002-Support-atomic-commit-among-multiple-foreign-ser.patch" > > 1- As part of the XLogReadRecord refactoring commit the signature of > XLogReadRecord was changed, > so the function

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2020-02-17 Thread Muhammad Usama
Hi Sawada San, I have a couple of comments on "v27-0002-Support-atomic-commit-among-multiple-foreign-ser.patch" 1- As part of the XLogReadRecord refactoring commit the signature of XLogReadRecord was changed, so the function call to XLogReadRecord() needs a small adjustment. i.e. In function

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-11-30 Thread Michael Paquier
On Wed, Sep 04, 2019 at 12:44:20PM +0900, Masahiko Sawada wrote: > I forgot to include some new header files. Attached the updated patches. No reviews since and the patch does not apply anymore. I am moving it to next CF, waiting on author. -- Michael signature.asc Description: PGP signature

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-09-03 Thread Alvaro Herrera
Hello Sawada-san, On 2019-Jul-02, Masahiko Sawada wrote: > On Mon, Jul 1, 2019 at 8:32 PM Thomas Munro wrote: > > Can we please have a fresh rebase? > > Thank you for the notice. Attached rebased patches. ... and again? -- Álvaro Herrerahttps://www.2ndQuadrant.com/

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-07-01 Thread Thomas Munro
On Wed, Apr 17, 2019 at 10:23 PM Masahiko Sawada wrote: > Sorry for the very late. Attached updated version patches. Hello Sawada-san, Can we please have a fresh rebase? Thanks, -- Thomas Munro https://enterprisedb.com

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-02-03 Thread Michael Paquier
On Thu, Jan 31, 2019 at 11:09:09AM +0100, Masahiko Sawada wrote: > Thanks. Actually I'm updating the patch set, changing API interface as > I proposed before and improving the document and README. I'll submit > the latest patch next week. Cool, I have moved the patch to next CF. -- Michael

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-01-31 Thread Masahiko Sawada
On Tue, Jan 29, 2019 at 5:47 PM Ildar Musin wrote: > > Hello, > > The patch needs rebase as it doesn't apply to the current master. I applied it > to the older commit to test it. It worked fine so far. Thank you for testing the patch! > > I found one bug though which would cause resolver to

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-01-29 Thread Ildar Musin
Hello, The patch needs rebase as it doesn't apply to the current master. I applied it to the older commit to test it. It worked fine so far. I found one bug though which would cause resolver to finish by timeout even though there are unresolved foreign transactions in the list. The

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-11-20 Thread Masahiko Sawada
On Thu, Nov 15, 2018 at 7:36 PM Masahiko Sawada wrote: > > On Mon, Oct 29, 2018 at 6:03 PM Masahiko Sawada wrote: > > > > On Mon, Oct 29, 2018 at 10:16 AM Masahiko Sawada > > wrote: > > > > > > On Wed, Oct 24, 2018 at 9:06 AM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, Oct 23, 2018

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-23 Thread Masahiko Sawada
On Tue, Oct 23, 2018 at 12:54 PM Kyotaro HORIGUCHI wrote: > > Hello. > > # It took a long time to come here.. > > At Fri, 19 Oct 2018 21:38:35 +0900, Masahiko Sawada > wrote in > > On Wed, Oct 10, 2018 at 1:34 PM Masahiko Sawada > > wrote: > ... > > * Updated docs, added the new section

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-22 Thread Kyotaro HORIGUCHI
Hello. # It took a long time to come here.. At Fri, 19 Oct 2018 21:38:35 +0900, Masahiko Sawada wrote in > On Wed, Oct 10, 2018 at 1:34 PM Masahiko Sawada wrote: ... > * Updated docs, added the new section "Distributed Transaction" at > Chapter 33 to explain the concept to users > > * Moved

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-09 Thread Masahiko Sawada
On Wed, Oct 3, 2018 at 6:02 PM Chris Travers wrote: > > > > On Wed, Oct 3, 2018 at 9:41 AM Chris Travers wrote: >> >> The following review has been posted through the commitfest application: >> make installcheck-world: tested, failed >> Implements feature: not tested >> Spec compliant:

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-03 Thread Chris Travers
On Wed, Oct 3, 2018 at 9:41 AM Chris Travers wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, failed > Implements feature: not tested > Spec compliant: not tested > Documentation:tested, failed > > I

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-03 Thread Chris Travers
On Wed, Oct 3, 2018 at 9:56 AM Chris Travers wrote: > > > On Wed, Oct 3, 2018 at 9:41 AM Chris Travers > wrote: > >> >> (errmsg("preparing foreign transactions > (max_prepared_foreign_transactions > 0) requires maX_foreign_xact_resolvers > > 0"))); > Two more critical notes here which I think

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-03 Thread Chris Travers
On Wed, Oct 3, 2018 at 9:41 AM Chris Travers wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, failed > Implements feature: not tested > Spec compliant: not tested > Documentation:tested, failed >

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-03 Thread Chris Travers
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:tested, failed I am hoping I am not out of order in writing this before the

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2018-10-02 Thread Michael Paquier
On Fri, Aug 03, 2018 at 05:52:24PM +0900, Masahiko Sawada wrote: > I attached the updated version patch as the previous versions conflict > with the current HEAD. Please note that the latest patch set does not apply anymore, so this patch is moved to next CF, waiting on author. -- Michael

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-06-05 Thread Masahiko Sawada
On Sat, May 26, 2018 at 12:25 AM, Robert Haas wrote: > On Fri, May 18, 2018 at 11:21 AM, Masahiko Sawada > wrote: >> Regarding to API design, should we use 2PC for a distributed >> transaction if both two or more 2PC-capable foreign servers and >> 2PC-non-capable foreign server are involved

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-25 Thread Robert Haas
On Fri, May 18, 2018 at 11:21 AM, Masahiko Sawada wrote: > Regarding to API design, should we use 2PC for a distributed > transaction if both two or more 2PC-capable foreign servers and > 2PC-non-capable foreign server are involved with it? Or should we end > up with an

RE: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-23 Thread Tsunakawa, Takayuki
From: Masahiko Sawada [mailto:sawada.m...@gmail.com] > > I'm for the latter. That is, COMMIT or PREPARE TRANSACTION statement > issued from an application reports an error. > > I'm not sure that we should end up with an error in such case, but if > we want then we can raise an error when the

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-22 Thread Masahiko Sawada
On Mon, May 21, 2018 at 10:42 AM, Tsunakawa, Takayuki wrote: > From: Masahiko Sawada [mailto:sawada.m...@gmail.com] >> Regarding to API design, should we use 2PC for a distributed >> transaction if both two or more 2PC-capable foreign servers and >> 2PC-non-capable

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-21 Thread Ashutosh Bapat
On Fri, May 11, 2018 at 12:27 AM, Robert Haas wrote: > On Tue, Feb 27, 2018 at 2:21 AM, Masahiko Sawada > wrote: >> I might be missing your point. As for API breaking, this patch doesn't >> break any existing FDWs. All new APIs I proposed are

RE: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-20 Thread Tsunakawa, Takayuki
From: Masahiko Sawada [mailto:sawada.m...@gmail.com] > Regarding to API design, should we use 2PC for a distributed > transaction if both two or more 2PC-capable foreign servers and > 2PC-non-capable foreign server are involved with it? Or should we end > up with an error? the 2PC-non-capable

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-18 Thread Masahiko Sawada
On Fri, May 11, 2018 at 9:56 AM, Masahiko Sawada wrote: > Thank you for the comment. > > On Fri, May 11, 2018 at 3:57 AM, Robert Haas wrote: >> On Tue, Feb 27, 2018 at 2:21 AM, Masahiko Sawada >> wrote: >>> I might be missing

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-10 Thread Robert Haas
On Tue, Feb 27, 2018 at 2:21 AM, Masahiko Sawada wrote: > I might be missing your point. As for API breaking, this patch doesn't > break any existing FDWs. All new APIs I proposed are dedicated to 2PC. > In other words, FDWs that work today can continue working after this >

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-03-28 Thread Masahiko Sawada
On Thu, Mar 29, 2018 at 2:27 AM, David Steele wrote: > On 2/27/18 2:21 AM, Masahiko Sawada wrote: >> >> Hmm, although I've thought concern in case where we don't consider >> local xids of un-resolved fdwxact in GetOldestXmin, I could not find >> problem. Could you share your

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-03-28 Thread David Steele
On 2/27/18 2:21 AM, Masahiko Sawada wrote: > > Hmm, although I've thought concern in case where we don't consider > local xids of un-resolved fdwxact in GetOldestXmin, I could not find > problem. Could you share your concern if you have? I'll try to find a > possibility based on it. It appears

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-26 Thread Masahiko Sawada
On Wed, Feb 21, 2018 at 6:07 AM, Robert Haas wrote: > On Tue, Feb 13, 2018 at 5:42 AM, Masahiko Sawada > wrote: >>> The fdw-transactions section of the documentation seems to imply that >>> henceforth every FDW must call

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-20 Thread Robert Haas
On Tue, Feb 13, 2018 at 5:42 AM, Masahiko Sawada wrote: >> The fdw-transactions section of the documentation seems to imply that >> henceforth every FDW must call FdwXactRegisterForeignServer, which I >> think is an unacceptable API break. >> >> It doesn't seem advisable to

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-13 Thread Masahiko Sawada
On Sat, Feb 10, 2018 at 4:08 AM, Robert Haas wrote: > On Thu, Feb 8, 2018 at 3:58 AM, Masahiko Sawada wrote: >>> Overall, what's the status of this patch? Are we hung up on this >>> issue only, or are there other things? >> >> AFAIK there is no more

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-09 Thread Robert Haas
On Thu, Feb 8, 2018 at 3:58 AM, Masahiko Sawada wrote: >> Overall, what's the status of this patch? Are we hung up on this >> issue only, or are there other things? > > AFAIK there is no more technical issue in this patch so far other than > this issue. The patch has tests

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-07 Thread Robert Haas
On Tue, Jan 9, 2018 at 9:49 AM, Masahiko Sawada wrote: >> If I understand correctly, XactLastRecEnd can be set by, for example, >> a HOT cleanup record, so that doesn't seem like a good thing to use. > > Yes, that's right. > >> Whether we need to use 2PC across remote nodes

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-01-09 Thread Robert Haas
On Wed, Dec 27, 2017 at 9:40 PM, Tsunakawa, Takayuki wrote: > (1) > Why don't you use the existing global variable MyXactFlags instead of the new > TransactionDidWrite? Or, how about using XactLastRecEnd != 0 to determine > the transaction did any writes? When

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-01-08 Thread Masahiko Sawada
On Mon, Jan 1, 2018 at 7:12 PM, Ashutosh Bapat wrote: > On Thu, Dec 28, 2017 at 11:08 AM, Masahiko Sawada > wrote: >> >>> (1) >>> Why don't you use the existing global variable MyXactFlags instead of the >>> new TransactionDidWrite? Or,

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-01-01 Thread Ashutosh Bapat
On Thu, Dec 28, 2017 at 11:08 AM, Masahiko Sawada wrote: > >> (1) >> Why don't you use the existing global variable MyXactFlags instead of the >> new TransactionDidWrite? Or, how about using XactLastRecEnd != 0 to >> determine the transaction did any writes? When the

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-27 Thread Masahiko Sawada
On Thu, Dec 28, 2017 at 11:40 AM, Tsunakawa, Takayuki wrote: > From: Masahiko Sawada [mailto:sawada.m...@gmail.com] >> I've updated documentation of patches, and fixed some bugs. I did some >> failure tests of this feature using a fault simulation tool[1] for >>

RE: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-27 Thread Tsunakawa, Takayuki
From: Masahiko Sawada [mailto:sawada.m...@gmail.com] > I've updated documentation of patches, and fixed some bugs. I did some > failure tests of this feature using a fault simulation tool[1] for > PostgreSQL that I created. > > 0001 patch adds a mechanism to track of writes on local server. This

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-12 Thread Masahiko Sawada
On Wed, Dec 13, 2017 at 12:03 AM, Robert Haas wrote: > On Mon, Dec 11, 2017 at 5:20 AM, Masahiko Sawada > wrote: >>> The question I have is how would we deal with a foreign server that is >>> not available for longer duration due to crash, longer

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-12 Thread Robert Haas
On Mon, Dec 11, 2017 at 5:20 AM, Masahiko Sawada wrote: >> The question I have is how would we deal with a foreign server that is >> not available for longer duration due to crash, longer network outage >> etc. Example is the foreign server crashed/got disconnected after >>

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-11 Thread Masahiko Sawada
On Tue, Nov 28, 2017 at 12:31 PM, Ashutosh Bapat wrote: > On Tue, Nov 28, 2017 at 3:04 AM, Masahiko Sawada > wrote: >> On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: >>> Masahiko Sawada

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Antonin Houska
Masahiko Sawada wrote: > On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: > > Masahiko Sawada wrote: > > > >> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat > >> wrote: > >> > On Thu, Oct

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Ashutosh Bapat
On Tue, Nov 28, 2017 at 3:04 AM, Masahiko Sawada wrote: > On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: >> Masahiko Sawada wrote: >> >>> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat >>>

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Robert Haas
On Mon, Nov 27, 2017 at 4:35 PM Masahiko Sawada wrote: > What I'd like to guarantee is that the subsequent read can see the > committed result of previous writes if the transaction involving > multiple foreign servers is committed without cancellation by user. In > other

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Masahiko Sawada
On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: > Masahiko Sawada wrote: > >> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat >> wrote: >> > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-24 Thread Antonin Houska
Masahiko Sawada wrote: > On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat > wrote: > > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada > > wrote: > >> > >> Because I don't want to break the current user semantics.