• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cybertec-postgresql / pgwatch / 20603117210
74%

Build:
DEFAULT BRANCH: master
Ran 30 Dec 2025 06:25PM UTC
Jobs 1
Files 46
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Dec 2025 06:21PM UTC coverage: 73.923% (+0.3%) from 73.651%
20603117210

push

github

pashagolub
[!] support parsing remote logs, closes #1070 (#1072)

Add support for parsing PostgreSQL CSV logs both locally and remotely via
pg_read_file(). The implementation includes robust error handling, privilege
checking, and proper log rotation handling.

Key Changes:
- Implemented remote log parsing using pg_read_file() function
- Added local log parsing support for same-host deployments
- Created LogParser struct to encapsulate parsing logic and state
- Added privilege checking (pg_monitor role and pg_read_file execute rights)
- Implemented proper handling of log rotation, deleted/renamed files
- Set 10MB max chunk size for interval-based reading
- Ensured sink writes occur every interval even without log updates

Testing:
- Added unit tests for remote and local parsing modes
- Added integration tests with PostgreSQL container using CSV logging
- Added tests for error_total and warning_total metrics
- Added privilege checking tests

Refactoring:
- Consolidated logparse package into reaper package
- Split parsing logic into parse_remote.go and parse_local.go
- Replaced direct function calls with LogParser methods

Documentation:
- Updated log parsing documentation
- Added notes about interval adjustment recommendations
- Documented preference for local mode when on same host

303 of 408 new or added lines in 5 files covered. (74.26%)

3861 of 5223 relevant lines covered (73.92%)

0.84 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
97.66
internal/reaper/logparser.go
9
9.76
-0.18% internal/reaper/reaper.go
29
70.1
internal/reaper/logparser_remote.go
64
58.44
internal/reaper/logparser_local.go
Jobs
ID Job ID Ran Files Coverage
1 20603117210.1 30 Dec 2025 06:25PM UTC 46
73.92
GitHub Action Run
Source Files on build 20603117210
  • Tree
  • List 46
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20603117210
  • 9f61b355 on github
  • Prev Build on master (#20582123480)
  • Next Build on master (#20603467394)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc