-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Closed as not planned
Copy link
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
Spring Boot 3.2.5
Logs
$ docker compose logs db -f
...
db-1 | 2024-05-16 10:18:14.746 UTC [37] LOG: connection received: host=192.168.65.1 port=42395
db-1 | 2024-05-16 10:18:14.766 UTC [37] LOG: connection authenticated: identity="test" method=scram-sha-256 (/var/lib/postgresql/data/pg_hba.conf:128)
db-1 | 2024-05-16 10:18:14.766 UTC [37] LOG: connection authorized: user=test database=test
db-1 | 2024-05-16 10:18:14.769 UTC [37] LOG: execute <unnamed>: SET extra_float_digits = 3
db-1 | 2024-05-16 10:18:14.770 UTC [37] LOG: execute <unnamed>: SET application_name = 'PostgreSQL JDBC Driver'
Setup
application.yaml
spring:
application:
name: application-name-test
compose.yaml
services:
db:
image: postgres
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
command: ["postgres", "-c", "log_statement=all", "-c", "log_connections=true"]
Currently one has to explicitly configure the application name via org.springframework.boot.jdbc.parameters
:
services:
db:
image: postgres
...
labels:
org.springframework.boot.jdbc.parameters: 'ApplicationName=application-name-test'
⇓
db-1 | 2024-05-16 10:21:53.323 UTC [39] LOG: execute <unnamed>: SET application_name = 'application-name-test'
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement