Skip to content

Commit

Permalink
increase memory for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Jul 11, 2024
1 parent 669b130 commit ec7368b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion store/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
image: store_pgsql
restart: always
build: ./postgres
# shm_size: '256MB' # if I'm going to increase work_mem in postgres, also increase this
shm_size: '512MB' # if I'm going to increase work_mem in postgres, also increase this
volumes:
- postgres_data:/var/lib/postgresql/data
expose:
Expand Down
5 changes: 5 additions & 0 deletions store/postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ RUN crontab /home/backup.txt
RUN service cron start
RUN dos2unix /home/pg_dump-to-s3.sh
RUN dos2unix /home/s3-autodelete.sh

COPY postgresql.conf /etc/postgresql/postgresql.conf

# Set PostgreSQL to use the custom configuration file
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
2 changes: 2 additions & 0 deletions store/postgres/postgresql.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shared_buffers = 512MB
work_mem = 64MB

0 comments on commit ec7368b

Please sign in to comment.