pgsql: Some refactoring of logical/worker.c

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

pgsql: Some refactoring of logical/worker.c

Peter Eisentraut-3
Some refactoring of logical/worker.c

This moves the main operations of apply_handle_{insert|update|delete},
that of inserting, updating, deleting a tuple into/from a given
relation, into corresponding
apply_handle_{insert|update|delete}_internal functions.  This allows
performing those operations on relations that are not directly the
targets of replication, which is something a later patch will use for
targeting partitioned tables.

Author: Amit Langote <[hidden email]>
Reviewed-by: Rafia Sabih <[hidden email]>
Reviewed-by: Peter Eisentraut <[hidden email]>
Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/97ee604d9bcedf0066986521a7ee15e3aa87be34

Modified Files
--------------
src/backend/replication/logical/worker.c | 174 ++++++++++++++++++++-----------
1 file changed, 115 insertions(+), 59 deletions(-)

Reply | Threaded
Open this post in threaded view
|

Re: pgsql: Some refactoring of logical/worker.c

Erik Rijkers
On 2020-03-24 15:17, Peter Eisentraut wrote:

> Some refactoring of logical/worker.c
>
> Discussion:
> https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@...
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/97ee604d9bcedf0066986521a7ee15e3aa87be34
>
> Modified Files
> --------------
> src/backend/replication/logical/worker.c | 174
> ++++++++++++++++++++-----------
> 1 file changed, 115 insertions(+), 59 deletions(-)

gcc 9.3.0 mutters under its breath,

worker.c: In function ‘apply_handle_update_internal’:
worker.c:791:22: warning: unused variable ‘remoterel’
[-Wunused-variable]
   791 |  LogicalRepRelation *remoterel = &relmapentry->remoterel;
       |

Otherwise the build is fine (documentation build too, including .pdf,
thanks Tom)


Erik Rijkers




Reply | Threaded
Open this post in threaded view
|

Re: pgsql: Some refactoring of logical/worker.c

Peter Eisentraut-6
On 2020-03-24 15:39, Erik Rijkers wrote:
> worker.c: In function ‘apply_handle_update_internal’:
> worker.c:791:22: warning: unused variable ‘remoterel’
> [-Wunused-variable]
>     791 |  LogicalRepRelation *remoterel = &relmapentry->remoterel;
>         |

fixed

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services