Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sébastien Luttringer
infrastructure
Commits
58fbeeec
Verified
Commit
58fbeeec
authored
Nov 21, 2019
by
Jan Alexander Steffens (heftig)
Browse files
postgres: Try to keep nocow on btrfs
parent
654bda13
Changes
2
Hide whitespace changes
Inline
Side-by-side
roles/postgres/files/upgrade_pg.sh
View file @
58fbeeec
...
...
@@ -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
...
...
roles/postgres/tasks/main.yml
View file @
58fbeeec
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment