Skip to content

use table definition cache#12

Merged
emicklei merged 6 commits intomainfrom
feature/table-cache
Aug 19, 2025
Merged

use table definition cache#12
emicklei merged 6 commits intomainfrom
feature/table-cache

Conversation

@emicklei
Copy link
Owner

No description provided.

@emicklei emicklei requested a review from Copilot August 19, 2025 13:14

This comment was marked as outdated.

emicklei and others added 4 commits August 19, 2025 15:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@emicklei emicklei requested a review from Copilot August 19, 2025 13:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a table definition cache mechanism to improve performance by avoiding database queries when table metadata is available from a cached file.

  • Adds a -cache command line flag to specify a cache file for table metadata
  • Implements cache loading and saving functionality using JSON serialization
  • Refactors database connection logic to only connect when cache is unavailable

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/Makefile Adds cache file parameter to the test generation command
cmd/pgtalk-gen/main.go Implements caching functionality with load/save operations and restructures main flow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@emicklei emicklei marked this pull request as ready for review August 19, 2025 17:21
@emicklei emicklei merged commit 93ada1c into main Aug 19, 2025
@emicklei emicklei deleted the feature/table-cache branch August 19, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants