| commit | 59122fa7f9f37d35dc3171b4f82c2d0f4d961f8d | [log] [tgz] |
|---|---|---|
| author | Ethan Lee <ethanalee@google.com> | Tue Feb 03 00:14:13 2026 +0000 |
| committer | Gopher Robot <gobot@golang.org> | Tue Feb 03 08:09:48 2026 -0800 |
| tree | 01f2e4ebce07007a130c74612e6026f504a948b0 | |
| parent | 550788255d99f0e9ee169f12bf65d16e1ede9f7b [diff] |
internal/postgres: optimize unit metadata lookup for unknown module paths When a user requests a package with a symbolic version (e.g., @master) and the module boundary is not yet known, pkgsite currently triggers a "greedy" index scan on the modules table's series_path index to find the best match. This change optimizes the lookup by explicitly providing candidate module paths using internal.CandidateModulePaths. This allows the Postgres optimizer to perform efficient point lookups on the module_path index rather than a linear scan. Fixes golang/go#77367 Change-Id: I072a72dc043ff7fb704977f07ba9fbd4ec821815 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/741300 kokoro-CI: kokoro <noreply+kokoro@google.com> Auto-Submit: Ethan Lee <ethanalee@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This repository hosts the source code of the pkg.go.dev website, and pkgsite, a documentation server program.
Pkg.go.dev is a website for discovering and evaluating Go packages and modules.
You can check it out at https://pkg.go.dev.
pkgsite program extracts and generates documentation for Go projects.
Example usage:
$ go install golang.org/x/pkgsite/cmd/pkgsite@latest $ cd myproject $ pkgsite -open .
For more information, see the pkgsite documentation.
If you want to report a bug or have a feature suggestion, please first check the known issues to see if your issue is already being discussed. If an issue does not already exist, feel free to file an issue.
For answers to frequently asked questions, see pkg.go.dev/about.
You can also chat with us on the #pkgsite Slack channel on the Gophers Slack.
We would love your help!
Our canonical Git repository is located at go.googlesource.com/pkgsite. There is a mirror of the repository at github.com/golang/pkgsite.
To contribute, please read our contributing guide.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.