Skip to content

refactor(records): drop records_batch table 3/3#6126

Merged
TBonnin merged 5 commits into
masterfrom
tbonnin/may12/drop-records-seen-3
May 14, 2026
Merged

refactor(records): drop records_batch table 3/3#6126
TBonnin merged 5 commits into
masterfrom
tbonnin/may12/drop-records-seen-3

Conversation

@TBonnin
Copy link
Copy Markdown
Collaborator

@TBonnin TBonnin commented May 12, 2026

part 1: #6124
part 2: #6125

records_seen fully replaces records_batch for tracking seen record ids.

@TBonnin TBonnin requested review from a team and pfreixes May 12, 2026 20:45
@superagent-security superagent-security Bot added contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis. labels May 12, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-3 branch from 68ac5c8 to 27e3642 Compare May 12, 2026 20:58
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-2 branch 2 times, most recently from 75a644f to bcdddd8 Compare May 12, 2026 21:02
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-3 branch from 27e3642 to 30612db Compare May 12, 2026 21:03
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-2 branch from bcdddd8 to 0b8b9cb Compare May 12, 2026 21:05
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-3 branch from 30612db to 56f18fa Compare May 12, 2026 21:05
@TBonnin TBonnin changed the title refactor(records): drop records_batch table refactor(records): drop records_batch table 3/3 May 12, 2026
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-2 branch from 0b8b9cb to 570adc3 Compare May 13, 2026 17:27
pull Bot pushed a commit to admariner/Pizzly that referenced this pull request May 13, 2026
Introduce records_seen table (daily partitions) tracked alongside
records_batch
so removing expired entries doesn't require deleting entries which is an
expensive process that creates lots of dead tuples. Instead we can drop
old partitions which is a quick operation that doesn't mutate any
rows/indexes

Extend batchCleanup daemon to pre-create tomorrow's partition and drop
old ones on each tick.

Partition table isn't read yet.

part 2: NangoHQ#6125
part 3: NangoHQ#6126

<!-- Describe the problem and your solution --> 

<!-- Issue ticket number and link (if applicable) -->

<!-- Testing instructions (skip if just adding/editing providers) -->
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-2 branch from 570adc3 to a40cf11 Compare May 14, 2026 18:00
Base automatically changed from tbonnin/may12/drop-records-seen-2 to master May 14, 2026 18:15
TBonnin added a commit to calebcgates/25-pr-nango that referenced this pull request May 14, 2026
…goHQ#6125)

part 1: NangoHQ#6124

now using the records_seen partitioned table in deleteOutdatedRecords
and remove usage of the deprecated records_batch table
next PR will remove the table entirely

part 3: NangoHQ#6126
TBonnin added 5 commits May 14, 2026 15:01
…rrent partition management

Introduce records_seen table (daily partitions) tracked alongside records_batch
so removing expired entries doesn't require deleting entries which is
an expensive process that creates lots of dead tuples. Instead we can drop old partitions.
Extend batchCleanup daemon to pre-create tomorrow's partition and drop old ones on each tick.
Partition table isn't read yet.
Following PRs will modify the deleteOutdatedRecords to use the new
partitioned table and will remove the records_batch one
now using the records_seen partitioned table in deleteOutdatedRecords
and remove usage of the deprecated records_batch table
next PR will remove the table entirely
…rrent partition management

Introduce records_seen table (daily partitions) tracked alongside records_batch
so removing expired entries doesn't require deleting entries which is
an expensive process that creates lots of dead tuples. Instead we can drop old partitions.
Extend batchCleanup daemon to pre-create tomorrow's partition and drop old ones on each tick.
Partition table isn't read yet.
Following PRs will modify the deleteOutdatedRecords to use the new
partitioned table and will remove the records_batch one
now using the records_seen partitioned table in deleteOutdatedRecords
and remove usage of the deprecated records_batch table
next PR will remove the table entirely
records_seen fully replaces records_batch for tracking seen record ids.
@TBonnin TBonnin force-pushed the tbonnin/may12/drop-records-seen-3 branch from 56f18fa to f2487c2 Compare May 14, 2026 19:02
@TBonnin TBonnin enabled auto-merge May 14, 2026 19:05
@TBonnin TBonnin added this pull request to the merge queue May 14, 2026
Merged via the queue into master with commit e9d719a May 14, 2026
26 checks passed
@TBonnin TBonnin deleted the tbonnin/may12/drop-records-seen-3 branch May 14, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants