Skip to content

Commit

Permalink
source-postgres: Set application_name param
Browse files Browse the repository at this point in the history
This means we show up like this in pg_stat_replication:

    postgres=> SELECT * FROM pg_stat_replication;
    -[ RECORD 1 ]----+------------------------------
    pid              | 36917
    usesysid         | 16540
    usename          | flow_capture
    application_name | estuary_flow
    client_addr      | 99.27.226.225
    client_hostname  |
    client_port      | 40560
    backend_start    | 2025-02-25 16:40:03.981342+00
    [...]

Currently the `application_name` field is entirely blank, so it
seems like having anything at all there is a clear win. We might
consider making it customizable or filing in the capture task
name in the future, but for now this is better than nothing.
  • Loading branch information
willdonnelly committed Feb 25, 2025
1 parent d54473b commit c3c7053
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source-postgres/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func (c *Config) ToURI() string {
uri.Path = "/" + c.Database
}
var params = make(url.Values)
params.Set("application_name", "estuary_flow")
if c.Advanced.SSLMode != "" {
params.Set("sslmode", c.Advanced.SSLMode)
}
Expand Down

0 comments on commit c3c7053

Please sign in to comment.