Re: [HACKERS] Logical Replication Helpers WIP for discussion
On Sun, Feb 15, 2015 at 11:25 PM, Petr Jelinek wrote: > On 13/02/15 14:04, Petr Jelinek wrote: > >> On 13/02/15 08:48, Michael Paquier wrote: >> >>> >>> Looking at this patch, I don't see what we actually gain much here >>> except a decoder plugin that speaks a special protocol for a special >>> background worker that has not been presented yet. What actually is the >>> value of that defined as a contrib/ module in-core. Note that we have >>> already test_decoding to basically test the logical decoding facility, >>> used at least at the SQL level to get logical changes decoded. >>> >>> Based on those reasons I am planning to mark this as rejected (it has no >>> documentation as well). So please speak up if you think the contrary, >>> but it seems to me that this could live happily out of core. >>> >> >> I think you are missing point of this, it's not meant to be committed in >> this form at all and even less as contrib module. It was meant as basis >> for in-core logical replication discussion, but sadly I didn't really >> have time to pursue it in this CF in the end. >> >> > That being said and looking at the size of February CF, I think I am fine > with dropping this in 9.5 cycle, it does not seem likely that there will be > anything useful done with this fast enough to get to 9.5 so there is no > point in spending committer resources on it in final CF. > > I will pick it up again after the CF is done. OK, thanks for the clarifications. Note that I am marking it as "rejected" in CF 2014-12 not because it is something that is not wanted, but just not to re-add it to CF 2015-02 which is what "returned with feedback" actually does... -- Michael
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On 13/02/15 14:04, Petr Jelinek wrote: On 13/02/15 08:48, Michael Paquier wrote: Looking at this patch, I don't see what we actually gain much here except a decoder plugin that speaks a special protocol for a special background worker that has not been presented yet. What actually is the value of that defined as a contrib/ module in-core. Note that we have already test_decoding to basically test the logical decoding facility, used at least at the SQL level to get logical changes decoded. Based on those reasons I am planning to mark this as rejected (it has no documentation as well). So please speak up if you think the contrary, but it seems to me that this could live happily out of core. I think you are missing point of this, it's not meant to be committed in this form at all and even less as contrib module. It was meant as basis for in-core logical replication discussion, but sadly I didn't really have time to pursue it in this CF in the end. That being said and looking at the size of February CF, I think I am fine with dropping this in 9.5 cycle, it does not seem likely that there will be anything useful done with this fast enough to get to 9.5 so there is no point in spending committer resources on it in final CF. I will pick it up again after the CF is done. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On 13/02/15 08:48, Michael Paquier wrote: On Mon, Dec 22, 2014 at 10:26 PM, Robert Haas mailto:robertmh...@gmail.com>> wrote: On Fri, Dec 19, 2014 at 8:40 AM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: > What I hope to get from this is agreement on the general approach and > protocol so that we can have common base which will both make it easier to > create external logical replication solutions and also eventually lead to > full logical replication inside core PostgreSQL. The protocol is a really important topic which deserves its own discussion. Andres has mentioned some of the ideas he has in mind - which I think are similar to what you did here - but there hasn't really been a thread devoted to discussing that topic specifically. I think that would be a good idea: lay out what you have in mind, and why, and solicit feedback. Looking at this patch, I don't see what we actually gain much here except a decoder plugin that speaks a special protocol for a special background worker that has not been presented yet. What actually is the value of that defined as a contrib/ module in-core. Note that we have already test_decoding to basically test the logical decoding facility, used at least at the SQL level to get logical changes decoded. Based on those reasons I am planning to mark this as rejected (it has no documentation as well). So please speak up if you think the contrary, but it seems to me that this could live happily out of core. I think you are missing point of this, it's not meant to be committed in this form at all and even less as contrib module. It was meant as basis for in-core logical replication discussion, but sadly I didn't really have time to pursue it in this CF in the end. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On Mon, Dec 22, 2014 at 10:26 PM, Robert Haas wrote: > On Fri, Dec 19, 2014 at 8:40 AM, Petr Jelinek > wrote: > > What I hope to get from this is agreement on the general approach and > > protocol so that we can have common base which will both make it easier > to > > create external logical replication solutions and also eventually lead to > > full logical replication inside core PostgreSQL. > > The protocol is a really important topic which deserves its own > discussion. Andres has mentioned some of the ideas he has in mind - > which I think are similar to what you did here - but there hasn't > really been a thread devoted to discussing that topic specifically. I > think that would be a good idea: lay out what you have in mind, and > why, and solicit feedback. > Looking at this patch, I don't see what we actually gain much here except a decoder plugin that speaks a special protocol for a special background worker that has not been presented yet. What actually is the value of that defined as a contrib/ module in-core. Note that we have already test_decoding to basically test the logical decoding facility, used at least at the SQL level to get logical changes decoded. Based on those reasons I am planning to mark this as rejected (it has no documentation as well). So please speak up if you think the contrary, but it seems to me that this could live happily out of core. -- Michael
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On Fri, Dec 19, 2014 at 8:40 AM, Petr Jelinek wrote: > What I hope to get from this is agreement on the general approach and > protocol so that we can have common base which will both make it easier to > create external logical replication solutions and also eventually lead to > full logical replication inside core PostgreSQL. The protocol is a really important topic which deserves its own discussion. Andres has mentioned some of the ideas he has in mind - which I think are similar to what you did here - but there hasn't really been a thread devoted to discussing that topic specifically. I think that would be a good idea: lay out what you have in mind, and why, and solicit feedback. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On 15/12/14 19:42, Robert Haas wrote: On Mon, Dec 15, 2014 at 12:57 AM, Petr Jelinek wrote: we've made few helper functions for making logical replication easier, I bundled it into contrib module as this is mainly for discussion at this time (I don't expect this to get committed any time soon, but it is good way to iron out protocol, etc). I created sample logical decoding plugin that uses those functions and which can be used for passing DML changes in platform/version independent (hopefully) format. I will post sample apply BG worker also once I get some initial feedback about this. It's hard to write tests for this as the binary changes contain transaction ids and timestamps so the data changes constantly. This is of course based on the BDR work Andres, Craig and myself have been doing. I can't understand, either from what you've written here or the rather sparse comments in the patch, what this might be good for. What I tried to achieve here is to provide solution to many of the common problems faced by logical replication solutions. I believe the first step in designing the logical replication (now that we have the logical decoding) is making the output plugin and the efficient protocol so I started with that. The code itself provides two main parts: First is the lrep_utils common utility functions that solve things like transporting DML statements, and more importantly the changed data in efficient manner, trying to not do any conversion if not needed (when architecture/version matches) but falling back to binary/textual IO representation of individual types so that the cross platform/version replication works too. I think those should eventually end up in core (ie not in contrib) as they are helper functions likely to be shared by multiple extensions, but for now I keep them with the rest of the contrib module as I feel better experimenting inside that module. There are also read functions that show how the other side could look like, but they are currently unused as the example apply worker is not part of the submission yet. The second part is extensible output plugin which serves both as an example of the intended use of those common utility functions and also as actual working solution that can be used as base for several replication solutions. It provides hooks for the replication solutions built on top of it that can be used for deciding if to replicate specific action on specific object and also injecting additional information to both BEGIN and COMMIT message - this can be useful for example when you are forwarding changes from another node and you wish to pass the information about the original node to the target one. What I hope to get from this is agreement on the general approach and protocol so that we can have common base which will both make it easier to create external logical replication solutions and also eventually lead to full logical replication inside core PostgreSQL. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logical Replication Helpers WIP for discussion
On Mon, Dec 15, 2014 at 12:57 AM, Petr Jelinek wrote: > we've made few helper functions for making logical replication easier, I > bundled it into contrib module as this is mainly for discussion at this time > (I don't expect this to get committed any time soon, but it is good way to > iron out protocol, etc). > > I created sample logical decoding plugin that uses those functions and which > can be used for passing DML changes in platform/version independent > (hopefully) format. > > I will post sample apply BG worker also once I get some initial feedback > about this. > > It's hard to write tests for this as the binary changes contain transaction > ids and timestamps so the data changes constantly. > > This is of course based on the BDR work Andres, Craig and myself have been > doing. I can't understand, either from what you've written here or the rather sparse comments in the patch, what this might be good for. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers