In geospatial applications, mapping coordinates to IANA time zones in real time
is a common and performance-critical task.
Built on the pgrx framework and my previous Rust library
tzf-rs, I developed and released
tzf-pg, a PostgreSQL extension that
enables microsecond-level lat/lon to time zone queries.
For installation instructions, please refer to the project README. Example usage:
|
|
When randomly invoked using pgbench
on a GitHub Actions runner, the
single-node throughput peaked at 17,000 qps. Given the intense CPU
contention on Actions runners, actual performance in a self-hosted environment
would be even better—sufficient for most bulk import and high-concurrency
real-time query scenarios.
Feel free to try it out, and submit issues or PRs to the repository to share feedback or feature requests!