Skip to content

Commit 171b40c

Browse files
rueiyhuangtimm4205
authored andcommitted
refactor: remove unsupported postgresql replication
1 parent 3665a45 commit 171b40c

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

redshift_connector/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def connect(
133133
tcp_keepalive_interval: typing.Optional[int] = None,
134134
tcp_keepalive_count: typing.Optional[int] = None,
135135
application_name: typing.Optional[str] = None,
136-
replication: typing.Optional[str] = None,
137136
idp_host: typing.Optional[str] = None,
138137
db_user: typing.Optional[str] = None,
139138
app_id: typing.Optional[str] = None,
@@ -218,8 +217,6 @@ def connect(
218217
Number of failed probes before connection is considered dead. Defaults to None (system default).
219218
application_name : Optional[str]
220219
Sets the application name. The default value is None.
221-
replication : Optional[str]
222-
Used to run in `streaming replication mode <https://www.postgresql.org/docs/12/protocol-replication.html>`_.
223220
idp_host : Optional[str]
224221
The hostname of the IdP.
225222
db_user : Optional[str]
@@ -353,7 +350,6 @@ def connect(
353350
info.put("profile", profile)
354351
info.put("provider_name", provider_name)
355352
info.put("region", region)
356-
info.put("replication", replication)
357353
info.put("role_arn", role_arn)
358354
info.put("role_session_name", role_session_name)
359355
info.put("scope", scope)
@@ -455,7 +451,6 @@ def connect(
455451
tcp_keepalive_interval=info.tcp_keepalive_interval,
456452
tcp_keepalive_count=info.tcp_keepalive_count,
457453
application_name=info.application_name,
458-
replication=info.replication,
459454
client_protocol_version=info.client_protocol_version,
460455
database_metadata_current_db_only=info.database_metadata_current_db_only,
461456
credentials_provider=info.credentials_provider,

redshift_connector/core.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ def __init__(
422422
tcp_keepalive_interval: typing.Optional[int] = None,
423423
tcp_keepalive_count: typing.Optional[int] = None,
424424
application_name: typing.Optional[str] = None,
425-
replication: typing.Optional[str] = None,
426425
client_protocol_version: int = DEFAULT_PROTOCOL_VERSION,
427426
database_metadata_current_db_only: bool = True,
428427
credentials_provider: typing.Optional[str] = None,
@@ -468,8 +467,6 @@ def __init__(
468467
Maximum number of TCP keepalive probes to send before dropping the connection if no response is received. Defaults to None (system default).
469468
application_name : Optional[str]
470469
Sets the application name. The default value is None.
471-
replication : Optional[str]
472-
Used to run in `streaming replication mode <https://www.postgresql.org/docs/12/protocol-replication.html>`_.
473470
client_protocol_version : int
474471
The requested server protocol version. The default value is 1 representing `EXTENDED_RESULT_METADATA`. If the requested server protocol cannot be satisfied, a warning will be displayed to the user.
475472
database_metadata_current_db_only : bool
@@ -552,7 +549,6 @@ def get_calling_module() -> str:
552549
"user": "",
553550
"database": database,
554551
"application_name": application_name,
555-
"replication": replication,
556552
"client_protocol_version": str(self._client_protocol_version),
557553
"driver_version": DriverInfo.driver_full_name(),
558554
"os_version": self.client_os_version,
@@ -774,7 +770,7 @@ def get_calling_module() -> str:
774770
protocol: int = 196608
775771
val: bytearray = bytearray(i_pack(protocol))
776772

777-
# Message include parameters name and value (user, database, application_name, replication)
773+
# Message include parameters name and value (user, database, application_name)
778774
for k, v in init_params.items():
779775
val.extend(k.encode("ascii") + NULL_BYTE + typing.cast(bytes, v) + NULL_BYTE)
780776
val.append(0)

redshift_connector/redshift_property.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ def __init__(self: "RedshiftProperty", **kwargs):
9494
self.profile: typing.Optional[str] = None
9595
# The AWS region where the cluster specified by cluster_identifier is located.
9696
self.region: typing.Optional[str] = None
97-
# Used to run in streaming replication mode. If your server character encoding is not ascii or utf8,
98-
# then you need to provide values as bytes
99-
self.replication: typing.Optional[str] = None
10097
self.role_arn: typing.Optional[str] = None
10198
self.role_session_name: typing.Optional[str] = None
10299
# The secret access key for the IAM role or IAM user configured for IAM database authentication

redshift_connector/utils/logging_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def mask_secure_info_in_props(info: "RedshiftProperty") -> "RedshiftProperty":
5858
"profile",
5959
"provider_name",
6060
"region",
61-
"replication",
6261
"role_arn",
6362
"role_session_name",
6463
"scope",

0 commit comments

Comments
 (0)