Skip to content

Improve PostgreSQL config - #1214

Merged
wxing1292 merged 1 commit into
temporalio:masterfrom
wxing1292:pg-application-name
Jan 22, 2021
Merged

Improve PostgreSQL config#1214
wxing1292 merged 1 commit into
temporalio:masterfrom
wxing1292:pg-application-name

Conversation

@wxing1292

@wxing1292 wxing1292 commented Jan 22, 2021

Copy link
Copy Markdown
Contributor

What changed?

  • Include connectAttributes as part of connection string

Why?
connectAttributes was not used

Closes #1208

How did you test it?
Manual test locally

persistence:
  defaultStore: postgres-default
  visibilityStore: postgres-visibility
  numHistoryShards: 4
  datastores:
    postgres-default:
      sql:
        pluginName: "postgres"
        databaseName: "temporal"
        connectAddr: "127.0.0.1:5432"
        connectProtocol: "tcp"
        connectAttributes:
          application_name: temporaltest
    postgres-visibility:
      sql:
        pluginName: "postgres"
        databaseName: "temporal_visibility"
        connectAddr: "127.0.0.1:5432"
        connectProtocol: "tcp"
        connectAttributes:
          application_name: temporaltest
postgres=# SELECT application_name FROM pg_stat_activity limit 1;
 application_name 
------------------
 temporaltest
(1 row)

Potential risks
N/A

@wxing1292
wxing1292 requested review from a team and alexshtin January 22, 2021 18:45
* Include connectAttributes as part of connection string
@wxing1292
wxing1292 merged commit d2fc34b into temporalio:master Jan 22, 2021
@wxing1292
wxing1292 deleted the pg-application-name branch January 22, 2021 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set application_name in Postgres connection string

2 participants