un petit error...
Nov. 16th, 2022 12:54 pmhm hm hm I think I made a mistake setting up mastodon
so i usually set up my servers to have a separate /home partition and naturally did that here too, with a / of 30gb, which is normally totally fine, i run lean installs.
the problem of course is that postgresql is storing the local database in /var/lib, oops. so we're fine for now but not forever.
is there any reason not to create /home/postgres, clone /var/lib/postgres contents over, and softlink /var/lib/postgres to /home/postgres?
or is it better to clone then edit postgresql.conf to point to /home/postgres?
eta: another mastodon instance administration told me to clone then edit postgresql.conf because system call reasons. and it worked! very cleanly too. genuine "phew" moment lol
so i usually set up my servers to have a separate /home partition and naturally did that here too, with a / of 30gb, which is normally totally fine, i run lean installs.
the problem of course is that postgresql is storing the local database in /var/lib, oops. so we're fine for now but not forever.
is there any reason not to create /home/postgres, clone /var/lib/postgres contents over, and softlink /var/lib/postgres to /home/postgres?
or is it better to clone then edit postgresql.conf to point to /home/postgres?
eta: another mastodon instance administration told me to clone then edit postgresql.conf because system call reasons. and it worked! very cleanly too. genuine "phew" moment lol
no subject
Date: 2022-11-16 10:50 pm (UTC)no subject
Date: 2022-11-16 10:52 pm (UTC)no subject
Date: 2022-11-16 11:06 pm (UTC)https://www.postgresql.org/docs/15/manage-ag-tablespaces.html
Basic idea is that if there are particular tables that get large you can put them on a different partition that's big enough for them. I believe you can also change the default tablespace for a database.
Under the hood, they're symlinks but they're symlinks that Postgres knows about.
no subject
Date: 2022-11-16 11:25 pm (UTC)In my case turned out that 1) db doesn't actually get that big so I was probably safe anyway lol and 2) cloning and editing the .conf is the correct answer in my specific case. But yeah TABLESPACE is neat and I should remember it. Thanks!