Skip to content

Refactoring - #635

Merged
artemgavrilov merged 2 commits into
mainfrom
refactoring
Jun 4, 2026
Merged

Refactoring#635
artemgavrilov merged 2 commits into
mainfrom
refactoring

Conversation

@artemgavrilov

@artemgavrilov artemgavrilov commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Description

Some refactoring:

  1. Remove redundant argument from pgsm_create_hash_entry function
  2. Move declarations that used in one place to that place (in the same file)
  3. Little cleanup of main header file

Links

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.46%. Comparing base (a396cda) to head (11c8f12).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #635      +/-   ##
==========================================
- Coverage   86.47%   86.46%   -0.02%     
==========================================
  Files           3        3              
  Lines        1346     1345       -1     
  Branches      217      217              
==========================================
- Hits         1164     1163       -1     
  Misses         86       86              
  Partials       96       96              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@artemgavrilov
artemgavrilov marked this pull request as ready for review March 25, 2026 13:13

@AndersAstrand AndersAstrand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sence->sense in the first commit message.

I think the second commit is an improvement, but I think we should introduce guc.h and hash_query.h to make things even better than having those "sections" in the one h-file.

If you don't feel like doing that we should commit this as is though.

@artemgavrilov

Copy link
Copy Markdown
Contributor Author

sence->sense in the first commit message.

I think the second commit is an improvement, but I think we should introduce guc.h and hash_query.h to make things even better than having those "sections" in the one h-file.

If you don't feel like doing that we should commit this as is though.

Adding separate header files it's what I planned to suggest next 😄

Also what do you think about moving C sources to /src directory?

@artemgavrilov
artemgavrilov marked this pull request as draft March 27, 2026 16:20
Everywhere where we invoke this function we pass just zero. This
argument has no sense as we always fill bucket id later.
Move declarations that used in single file to that file. No need to have
them in main project header file.
@artemgavrilov
artemgavrilov marked this pull request as ready for review June 4, 2026 17:02

@jeltz jeltz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pretty sure there is more stuff in the pg_stat_monitor.h which could be moved into pg_stat_monitor.c but this is an iprovement on its own.

@artemgavrilov
artemgavrilov merged commit 9ecb420 into main Jun 4, 2026
69 of 74 checks passed
@artemgavrilov
artemgavrilov deleted the refactoring branch June 4, 2026 20:50
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.

3 participants