Skip to content

Commit ca06061

Browse files
kamilogoreksoedirgo
authored andcommitted
ref: Add 'postgres-meta <version>' application_name to defaults
1 parent fc69684 commit ca06061

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/server/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import crypto from 'crypto'
22
import { PoolConfig } from 'pg'
33
import { getSecret } from '../lib/secrets.js'
44
import { AccessControl } from './templates/swift.js'
5+
import pkg from '#package.json' assert { type: 'json' }
56

67
export const PG_META_HOST = process.env.PG_META_HOST || '0.0.0.0'
78
export const PG_META_PORT = Number(process.env.PG_META_PORT || 1337)
@@ -49,6 +50,7 @@ export const DEFAULT_POOL_CONFIG: PoolConfig = {
4950
max: 1,
5051
connectionTimeoutMillis: PG_CONN_TIMEOUT_SECS * 1000,
5152
ssl: PG_META_DB_SSL_ROOT_CERT ? { ca: PG_META_DB_SSL_ROOT_CERT } : undefined,
53+
application_name: `postgres-meta ${pkg.version}`,
5254
}
5355

5456
export const PG_META_REQ_HEADER = process.env.PG_META_REQ_HEADER || 'request-id'

0 commit comments

Comments
 (0)