Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pglogrepl
✓ github.com/jackc/pglogrepl
Connects to PostgreSQL and retrieves the system identifier using logical replication.
package main
import (
"context"
"fmt"
"github.com/jackc/pgconn"
"github.com/jackc/pglogrepl"
)
func main() {
conn, err := pgconn.Connect(context.Background(), "postgres://user:pass@localhost/db")
if err != nil {
panic(err)
}
defer conn.Close(context.Background())
sysident, err := pglogrepl.IdentifySystem(context.Background(), conn)
if err != nil {
panic(err)
}
fmt.Println("System ID:", sysident.SystemID)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20231111135425-1627ab1b5780latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.