Skip to content

Commit

Permalink
Remove unneccesary attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Apr 5, 2022
1 parent 03f5505 commit d59e5d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pipelinewise/fastsync/commons/tap_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def __init__(self, connection_config, tap_type_to_target_type, target_quote=None
self.tap_type_to_target_type = tap_type_to_target_type
self.target_quote = target_quote
self.conn = None
self.curr = None
self.primary_host_conn = None
self.primary_host_curr = None
self.version = None

@staticmethod
Expand Down Expand Up @@ -194,7 +192,6 @@ def open_connection(self):
self.conn = self.get_connection(
self.connection_config, prioritize_primary=False
)
self.curr = self.conn.cursor()

def close_connection(self):
"""
Expand Down Expand Up @@ -326,7 +323,6 @@ def fetch_current_log_pos(self):
self.primary_host_conn = self.get_connection(
self.connection_config, prioritize_primary=True
)
self.primary_host_curr = self.primary_host_conn.cursor()

# Make sure PostgreSQL version is 9.4 or higher
result = self.primary_host_query(
Expand Down Expand Up @@ -567,4 +563,5 @@ def copy_table(
)

with gzip_splitter as split_gzip_files:
self.curr.copy_expert(sql, split_gzip_files, size=131072)
with self.conn.cursor() as cur:
cur.copy_expert(sql, split_gzip_files, size=131072)

0 comments on commit d59e5d5

Please sign in to comment.