# How to disable JIT in Postgres for Swarmica installation
## Instructions

1. Connect to the Swarmica server via SSH as the root user.

2. Go to the /root/swarmica directory and add `-c jit=off` to the command for starting the postgres service in the docker-compose.yml file. So instead of:

```yaml
  postgres:
    image: postgres:14.2-bullseye
    container_name: swarmica-postgres
    shm_size: 1gb
    command: postgres -N 200 -c work_mem=8MB -c temp_buffers=16MB -c shared_buffers=1GB -c track_activity_query_size=16384
    <...>
```

it should become:

```yaml
  postgres:
    image: postgres:14.2-bullseye
    container_name: swarmica-postgres
    shm_size: 1gb
    command: postgres -N 200 -c work_mem=8MB -c temp_buffers=16MB -c shared_buffers=1GB -c track_activity_query_size=16384 -c jit=off          # <----- added '-c jit=off'
    <...>
```

3. Connect to the database:

```txt
cd /root/swarmica
source .env
docker exec -ti --env-file .env swarmica-postgres psql -U$POSTGRES_USER $POSTGRES_DB
```

4. Execute the commands:

```sql
ALTER DATABASE swarmica_app SET jit = off;
SET jit = off;
```