Verified Commit 58fbeeec authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

postgres: Try to keep nocow on btrfs

parent 654bda13
......@@ -34,6 +34,7 @@ pacman -S --needed postgresql-old-upgrade
chown postgres:postgres /var/lib/postgres/
su - postgres -c "mv /var/lib/postgres/data /var/lib/postgres/data-$FROM_VERSION"
su - postgres -c 'mkdir /var/lib/postgres/data'
su - postgres -c 'chattr -f +C /var/lib/postgres/data' || :
su - postgres -c 'initdb --locale en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data'
vimdiff /var/lib/postgres/{data,data-$FROM_VERSION}/pg_hba.conf
vimdiff /var/lib/postgres/{data,data-$FROM_VERSION}/postgresql.conf
......
......@@ -9,6 +9,15 @@
- name: install postgres
pacman: name=postgresql,python-psycopg2 state=present
- name: create nocow database directory
file:
state: directory
owner: postgres
group: postgres
attributes: "+C"
path: /var/lib/postgres/data
when: filesystem == "btrfs"
- name: initialize postgres
become: yes
become_user: postgres
......
Supports Markdown
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