Verified Commit 9be76205 authored by Tulio Ruiz's avatar Tulio Ruiz
Browse files

[IMP] Add dev image to be used in the test servers.

It have very agressive optimizations, not suitable for production environments, that's why the extra tag dev.
parent b716b1b2
Pipeline #150466 passed with stage
in 13 seconds
......@@ -21,3 +21,13 @@ build_10_ci:
PSQL_TYPE: 'ci'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-ci --docker-image vauxoo/docker-postgresql
build_10_dev:
stage: build
tags:
- build
variables:
PSQL_VERSION: '10'
PSQL_TYPE: 'ci'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-dev --docker-image vauxoo/docker-postgresql
### PGHero config
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.track = all
pg_stat_statements.max = 10000
track_activity_query_size = 2048
### PGBadger config
logging_collector=on
log_destination='stderr'
log_directory='/var/log/pg_log'
log_filename='postgresql-10-main.log'
log_rotation_age=0
log_checkpoints=on
log_hostname=on
log_line_prefix='%t [%p]: [%l-1] db=%d,user=%u '
lc_messages='C'
log_timezone='UTC'
FROM postgres:10-alpine
ENV LC_COLLATE "C"
RUN mkdir -p /etc/postgresql/conf.d \
&& mkdir -p /var/log/pg_log
COPY ./postgresql.conf /etc/postgresql/postgresql.conf
COPY ./pg_hba.conf /etc/postgresql/pg_hba.conf
COPY ./10-pgbadger_pre.conf /etc/postgresql/conf.d/10-pgbadger_pre.conf
COPY ./entry_point.sh /entry_point.sh
VOLUME ["/var/log/pg_log", "/var/lib/postgresql/data/pgdata"]
ENTRYPOINT ["/entry_point.sh"]
#!/usr/bin/env sh
set -e
chown postgres:postgres /var/log/pg_log
chown -R postgres:postgres /var/lib/postgresql/data/pgdata
chmod 0700 /var/lib/postgresql/data/pgdata
su postgres -c "postgres -c config_file=/etc/postgresql/postgresql.conf"
\ No newline at end of file
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
host all all 0.0.0.0/0 md5
This diff is collapsed.
......@@ -194,7 +194,7 @@ synchronous_commit = off # synchronization level;
# fsync
# fsync_writethrough
# open_sync
full_page_writes = off # recover from partial page writes
full_page_writes = on # recover from partial page writes
#wal_compression = off # enable compression of full-page writes
#wal_log_hints = off # also do full page writes of non-critical updates
# (change requires restart)
......@@ -208,9 +208,9 @@ full_page_writes = off # recover from partial page writes
# - Checkpoints -
checkpoint_timeout = 45min # range 30s-1d
#max_wal_size = 1GB
#min_wal_size = 80MB
checkpoint_timeout = 1800 # range 30s-1d
max_wal_size = 4GB
min_wal_size = 1GB
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
#checkpoint_flush_after = 256kB # measured in pages, 0 disables
#checkpoint_warning = 30s # 0 disables
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment