Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-26 Thread George via Bacula-users
Thank you. -- George ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-26 Thread Dimitri Maziuk via Bacula-users
On 11/26/2018 11:40 AM, George via Bacula-users wrote: > Just one more question: when automating the backup of > all postgresql databases, should I also backup > template1? I have found that template0 cannot be > backed up due to how postgresql works but couldn't > find similar info about

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-26 Thread George via Bacula-users
Thanks a lot for your help Dmitri. I decided to start from scratch for the sake of exploring how this would work without repeating many times the same things. So I: 1. Made a backup of /var/lib/pgsql 2. Stopped service and uninstalled postgresql 3. Removed /var/lib/pgsql 4. Reinstalled

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-26 Thread Dmitri Maziuk via Bacula-users
On Sun, 25 Nov 2018 21:16:03 +0200 George via Bacula-users wrote: > The WAL files remain though. Should I delete them > manually? Postgres will fail to start if they're actually used. I think there are some functions to figure out which ones are used but I suppose you could just move them to

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-25 Thread George via Bacula-users
Thanks for explaining. So I have set: wal_level = minimal max_wal_senders = 0 and restarted postgresql successfully. The WAL files remain though. Should I delete them manually? As for this: > FWIW I left my few postgres-10 instances at the > defaults, except for one that is actually >

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-25 Thread Dmitri Maziuk via Bacula-users
On Sat, 24 Nov 2018 21:59:41 +0200 George via Bacula-users wrote: > On Sat, 24 Nov 2018 11:39:37 -0600 Dmitri Maziuk via > Bacula-users wrote: > > > So set > > max_wal_senders = 0 > > as well. Now looking at the fine manual I see they > > changed the default from 9.x, it used to be 0. >

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-24 Thread George via Bacula-users
On Sat, 24 Nov 2018 11:39:37 -0600 Dmitri Maziuk via Bacula-users wrote: > So set > max_wal_senders = 0 > as well. Now looking at the fine manual I see they > changed the default from 9.x, it used to be 0. I read in the manual: "The value 0 means replication is disabled. [...] Abrupt

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-24 Thread Dmitri Maziuk via Bacula-users
On Sat, 24 Nov 2018 01:36:12 +0200 George via Bacula-users wrote: > > wal_level = minimal > > and restart. > > Trying this results in (journalclt excerpt): > > Nov 24 01:11:05 pc postgresql-script[6374]: 2018-11-24 01:11:05.565 EET > [6383]FATAL: WAL streaming (max_wal_senders > 0)

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-23 Thread George via Bacula-users
On Fri, 23 Nov 2018 15:54:38 -0600 Dimitri Maziuk via Bacula-users wrote: > If it still hasn't gone down, check your > postgresql.conf for > > #wal_level = replica# minimal, > replica, or logical # (change requires restart) > > If the above is what you have, you could change

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-23 Thread Dimitri Maziuk via Bacula-users
On 11/20/2018 06:32 PM, George Anchev via Bacula-users wrote: > $ du -hs pg_wal/ > 769Mpg_wal/ > $ psql -U postgres -d postgres -c checkpoint > CHECKPOINT > $ du -hs pg_wal/ > 769Mpg_wal/ If it still hasn't gone down, check your postgresql.conf for #wal_level = replica

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread George Anchev via Bacula-users
On Tue, 20 Nov 2018 17:47:49 -0600 Dimitri Maziuk via Bacula-users wrote: > Check that wal archive_mode is off in > postgresql.conf and also all replication-related > stuff. grep -iE "replic|archive_mode" postgresql.conf shows only commented lines. Need I change anything? > Try `psql -U

[Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread Dimitri Maziuk via Bacula-users
PS https://www.postgresql.org/docs/10/sql-checkpoint.html -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu signature.asc Description: OpenPGP digital signature ___ Bacula-users mailing list

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread Dimitri Maziuk via Bacula-users
On 11/20/2018 04:56 PM, George Anchev via Bacula-users wrote: > On the link I read wal_keep_segments "Specifies the > *minimum* number of past log file segments kept in the > pg_wal directory". Isn't there a setting which > controls the *maximum* number/volume/retention of those > files? (like in

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread George Anchev via Bacula-users
On Tue, 20 Nov 2018 16:34:58 -0600 Dimitri Maziuk via Bacula-users wrote: > I've 320MB on a server that replicates a database of > a few million rows, and ~100MB on our bacula server > w/ a year's worth of backups. What do you call "too > big"? As shared in the first message: Right now, even

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread Dimitri Maziuk via Bacula-users
On 11/20/2018 03:49 PM, George Anchev via Bacula-users wrote: > On Mon, 19 Nov 2018 17:16:52 -0600 Dimitri Maziuk via > Bacula-users wrote: > >> https://www.postgresql.org/docs/10/routine-vacuuming.html > > Good info. Thanks. > >> WAL: don't worry about it unless you want to archive >> them or

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-20 Thread George Anchev via Bacula-users
On Mon, 19 Nov 2018 17:16:52 -0600 Dimitri Maziuk via Bacula-users wrote: > https://www.postgresql.org/docs/10/routine-vacuuming.html Good info. Thanks. > WAL: don't worry about it unless you want to archive > them or replicate your database. But the pg_wal directory is way too big and I have

Re: [Bacula-users] PostgreSQL: WAL and log management

2018-11-19 Thread Dimitri Maziuk via Bacula-users
On 11/19/2018 04:12 PM, George Anchev via Bacula-users wrote: > 1. Am I doing everything correctly? https://www.postgresql.org/docs/10/routine-vacuuming.html > 2. How to manage WAL and logs so that old unnecessary > data doesn't fill up disk (and backup tape) space? Logs:

[Bacula-users] PostgreSQL: WAL and log management

2018-11-19 Thread George Anchev via Bacula-users
Hi, So... I tested the whole process of migrating MariaDB database to PostgreSQL. But psql seems a different beast. What is confusing for me: After several runs of {drop|make|grant}_bacula_tables scripts for the sake of cleaning up and starting from scratch while testing the process, I notice