MeltanoLabs / MeltanoLabs/target-postgres

We should use pooling properly and commit individual groups

Open
#140 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13
Forks
23
Avg merge
4h 45m
Merged PRs (30d)
4

Description

Right now we're using self.connection directly and not worrying about when to (or not to) commit things to the database. Instead we should be more explicit. Specifically we should create a temp table, do the upsert, and remove the temp table in the same commit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the code that uses self.connection and performs the temporary-table upsert, then trace how pooled connections and commits are currently handled. The change is complete when each group creates the temporary table, performs the upsert, and removes the table within the same database commit; verify the relevant target behavior with the existing test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
backend, databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.