1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Rename GUC logical_decoding_mode to logical_replication_mode.

Rename the developer option 'logical_decoding_mode' to the more flexible
name 'logical_replication_mode' because doing so will make it easier to
extend this option in the future to help test other areas of logical
replication.

Currently, it is used on the publisher side to allow streaming or
serializing each change in logical decoding. In the upcoming patch, we are
planning to use it on the subscriber. On the subscriber, it will allow
serializing the changes to file and notifies the parallel apply workers to
read and apply them at the end of the transaction.

We discussed exposing this parameter as a subscription option but
it did not seem advisable since it is primarily used for testing/debugging
and there is no other such parameter. We also discussed having separate
GUCs for publisher and subscriber but for current testing/debugging
requirements, one GUC is sufficient.

Author: Hou Zhijie
Reviewed-by: Peter Smith, Kuroda Hayato, Sawada Masahiko, Amit Kapila
Discussion: https://postgr.es/m/CAD21AoAy2c=Mx=FTCs+EwUsf2kQL5MmU3N18X84k0EmCXntK4g@mail.gmail.com
Discussion: https://postgr.es/m/CAA4eK1+wyN6zpaHUkCLorEWNx75MG0xhMwcFhvjqm2KURZEAGw@mail.gmail.com
This commit is contained in:
Amit Kapila
2023-01-30 08:02:08 +05:30
parent 8d2c1913ed
commit 1e8b61735c
9 changed files with 30 additions and 29 deletions

View File

@ -17,15 +17,16 @@
#include "utils/snapshot.h"
#include "utils/timestamp.h"
/* GUC variables */
extern PGDLLIMPORT int logical_decoding_work_mem;
extern PGDLLIMPORT int logical_decoding_mode;
extern PGDLLIMPORT int logical_replication_mode;
/* possible values for logical_decoding_mode */
/* possible values for logical_replication_mode */
typedef enum
{
LOGICAL_DECODING_MODE_BUFFERED,
LOGICAL_DECODING_MODE_IMMEDIATE
} LogicalDecodingMode;
LOGICAL_REP_MODE_BUFFERED,
LOGICAL_REP_MODE_IMMEDIATE
} LogicalRepMode;
/* an individual tuple, stored in one chunk of memory */
typedef struct ReorderBufferTupleBuf