[GH-ISSUE #1026] How to set up default_transaction_read_only=off by default? #237

Closed
opened 2026-03-07 20:46:39 +03:00 by kerem · 2 comments
Owner

Originally created by @makarov-m on GitHub (Aug 5, 2022).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1026

Hello,

I'm trying to use cloudbeaver in Docker. Unfortunately, I can't edit my database by default. Only after
set default_transaction_read_only = off; everything goes well. Could you provide where I should add this param in docker-compose.yml

Now it looks like this:

# The docker-compose.yml file describes the services that make your app. 
# In this those services are Postgres DB + cloudbeaver

version: "3.8"

services:
  database:
    image: postgres:latest
    command:
      - "postgres"
      - "-c"
      - "max_connections=10"
      - "-c"
      - "shared_buffers=1GB"
      - "-c"
      - "effective_cache_size=4GB"
      - "-c"
      - "work_mem=16MB"
      - "-c"
      - "maintenance_work_mem=512MB"
      - "-c"
      - "random_page_cost=1.1"
      - "-c"
      - "temp_file_limit=10GB"
      - "-c"
      - "log_min_duration_statement=200ms"
      - "-c"
      - "idle_in_transaction_session_timeout=10s"
      - "-c"
      - "lock_timeout=1s"
      - "-c"
      - "statement_timeout=60s"
      - "-c"
      - "shared_preload_libraries=pg_stat_statements"
      - "-c"
      - "pg_stat_statements.max=10000"
      - "-c"
      - "pg_stat_statements.track=all"
      - "-c"
      - "default_transaction_read_only=off"
    container_name: postgresql
    restart: always
    hostname: postgres
    environment:
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "postgres"
      POSTGRES_DB: "world"
      PGDATA: "/var/lib/postgresql/data/pgdata"
    volumes:
      - .:/docker-entrypoint-initdb.d/
      - .:/var/lib/postgresql/data
    ports:
      - '5432:5432'
    healthcheck:
      test: /usr/bin/pg_isready --dbname=$${POSTGRES_DB} --username=$${POSTGRES_USER}  # linux
      #test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]      # win
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s
    restart: unless-stopped
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: 4G
  
  db_client:
    image: dbeaver/cloudbeaver:latest
    container_name: cloudbeaver
    depends_on:
      - database
    restart: always
    hostname: localhost
    ports:
      - '8080:8978'
    volumes: 
      - cloudbeaver:/opt/cloudbeaver/workspace 

volumes:
  cloudbeaver:
Originally created by @makarov-m on GitHub (Aug 5, 2022). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1026 Hello, I'm trying to use cloudbeaver in Docker. Unfortunately, I can't edit my database by default. Only after `set default_transaction_read_only = off;` everything goes well. Could you provide where I should add this param in docker-compose.yml Now it looks like this: ``` # The docker-compose.yml file describes the services that make your app. # In this those services are Postgres DB + cloudbeaver version: "3.8" services: database: image: postgres:latest command: - "postgres" - "-c" - "max_connections=10" - "-c" - "shared_buffers=1GB" - "-c" - "effective_cache_size=4GB" - "-c" - "work_mem=16MB" - "-c" - "maintenance_work_mem=512MB" - "-c" - "random_page_cost=1.1" - "-c" - "temp_file_limit=10GB" - "-c" - "log_min_duration_statement=200ms" - "-c" - "idle_in_transaction_session_timeout=10s" - "-c" - "lock_timeout=1s" - "-c" - "statement_timeout=60s" - "-c" - "shared_preload_libraries=pg_stat_statements" - "-c" - "pg_stat_statements.max=10000" - "-c" - "pg_stat_statements.track=all" - "-c" - "default_transaction_read_only=off" container_name: postgresql restart: always hostname: postgres environment: POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "postgres" POSTGRES_DB: "world" PGDATA: "/var/lib/postgresql/data/pgdata" volumes: - .:/docker-entrypoint-initdb.d/ - .:/var/lib/postgresql/data ports: - '5432:5432' healthcheck: test: /usr/bin/pg_isready --dbname=$${POSTGRES_DB} --username=$${POSTGRES_USER} # linux #test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] # win interval: 10s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped deploy: resources: limits: cpus: '1' memory: 4G db_client: image: dbeaver/cloudbeaver:latest container_name: cloudbeaver depends_on: - database restart: always hostname: localhost ports: - '8080:8978' volumes: - cloudbeaver:/opt/cloudbeaver/workspace volumes: cloudbeaver: ```
kerem 2026-03-07 20:46:39 +03:00
Author
Owner

@alexander-skoblikov commented on GitHub (Aug 10, 2022):

Hi! if I understand you correctly, you want to have a pre-installed datasource in read-only mode when you raise a beaver?

<!-- gh-comment-id:1210645749 --> @alexander-skoblikov commented on GitHub (Aug 10, 2022): Hi! if I understand you correctly, you want to have a pre-installed datasource in read-only mode when you raise a beaver?
Author
Owner

@kseniaguzeeva commented on GitHub (Sep 7, 2022):

I've noticed there is no updates during for a long time in this ticket. Feel free to contact me to reopen the issue if it's still actual for you.

<!-- gh-comment-id:1239062534 --> @kseniaguzeeva commented on GitHub (Sep 7, 2022): I've noticed there is no updates during for a long time in this ticket. Feel free to contact me to reopen the issue if it's still actual for you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#237
No description provided.