Kevin Fenzi
3641c508fd
postgresql defaults: move default to defaults.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:16 +02:00
48ef2735d3
postgresql_server: add conditional for small postgresql instances
...
The recent changes to postgresql_server increased the required memory past
what one of my VMs had. I've added a conditional in postgresql.conf to put
some memory settings back where they used to be (controlled by
small_postgres_instance, default is false) and created a default to not use
the small_postgres_instance settings unless specified
2020-04-24 21:34:16 +02:00
Kevin Fenzi
993fd9f64e
postgresql_server / db-koji02: set max_standby_streaming_delay to -1 ( ∞ )
...
Turns out I had set this on the master (db-koji01) which is ignored.
We need to set it on the standby. With a value of -1, the standby will wait
for conflicting transactions/locks to complete however long it takes.
If this doesn't work to get us a good backup on db-koji02, no harm and we
can try something else.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:14 +02:00
Kevin Fenzi
05e5b4fe79
postgresql: increase the max_standby_streaming_delay to 90s
...
It's hoped that this would allow us to get more reliable backups on the hot spare.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
955db508b1
postgresql_server: also set hot_standby_feedback or the master might delete rows the standby needs during a pg_dump
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
d2fa094677
postgresql_server: add missing ' to end of connection statement
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
0c895651fa
postgresql / kojidb standby: try connecting 02 to 01, not 02 to itself.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
0a5cb2c51c
postgresql_server: Fix spelling mistake
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
1613c724ca
postgresql-server: sadly, "all" doesn't match replication, that has to be seperate.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
9747e55c72
db-koji02: create vm and config files for hot standby kojidb.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
603fe5e8e9
postgresql / db-koji: Move instead to logging just the slow stuff.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
b5f8425273
postgresql / db-koji01: log queries
...
I'd like to log queries on db-koji01 for a short time to try and see whats causing us such pain.
After we have collected a bunch of queries we can revert this until we sort out what needs
to be changed. We may also change this log all to log just slow queries (per smooge's suggestion).
Hopefully this will get us the info we need to track this down.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
66c7df9a53
postgresql / db-koji01: more tweaks
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
184f4c93bc
postgresql / db_koji01: adjust stuff to hopefully give us good backups.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
6052756805
postgresql_server / db-koji01: Adjust a bunch more for performance.
...
The current settings cause database dumps to drive the load way up
and make the entire application slow, so we need to adjust.
Using pgtune, these values might well be better.
shared_buffers + effective_cache_size should = total memory.
random_page_cost should be lowered a bunch since we are on ssds there.
1.1 is only slightly more than 1.0 for sequential.
effective_io_concurrency should also be raised a bunch for ssds.
a few other values should be higher based on memory.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
81fb4582e7
ansible: change when conditions to use == instead of is when checking strings.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Karsten Hopp
c9ed62ac32
update ansible_distribution_major_version conditionals
...
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2020-04-24 21:34:10 +02:00
Kevin Fenzi
8f025109bf
Revert "postgresql_server: drop this cleanup script to see if the problem still even occurs."
...
This reverts commit f68a9eb6dbc2003ed6136ba71e30fcb1c3180608.
2020-04-24 21:34:07 +02:00
Kevin Fenzi
7ef0ae55e9
postgresql_server: drop this cleanup script to see if the problem still even occurs.
...
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:07 +02:00
Karsten Hopp
65fc4a4ecc
postgresql_server: dnf -> package, with_item changes
2019-06-11 17:15:27 +02:00
Kevin Fenzi
c96327ccfe
anitya/release-monitoring: db backup cron has to be mode 644, not 755.
...
https://pagure.io/fedora-infrastructure/issue/7479
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-01-07 18:27:03 +00:00
Kevin Fenzi
8dcc3712af
Switch anitya backups to use --exclude-table-data rather than excluding entire tables
...
This allows people to use the db dump without having to manually create the missing tables.
2018-10-10 16:19:19 +00:00
Kevin Fenzi
f0c596c427
Try and make a public anitya dump with the right tables.
2018-10-08 17:41:07 +00:00
Kevin Fenzi
84bd8c1c4a
Also install pxz on fedora
2018-06-30 04:04:17 +00:00
Stephen Smoogen
1719435ec7
try to make pxz a little less likely to starve itselv
2018-06-25 16:26:59 +00:00
Kevin Fenzi
069bfc9a41
only keep the last backup on hosts, it iss copied to backup server anyhow
2018-06-07 23:38:46 +00:00
Pierre-Yves Chibon
4de44ac0fc
Fix query in the datanommer SAR script
...
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-05-22 10:21:42 +02:00
Patrick Uiterwijk
8797997ab2
Get rid of temporary files alltogether
...
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-05-18 13:13:47 +02:00
Patrick Uiterwijk
2fb0b14230
Do not keep full file in memory
...
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-05-18 13:06:04 +02:00
Patrick Uiterwijk
b6f06b4a27
Get rid of postgres warning
...
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-05-18 13:03:34 +02:00
Pierre-Yves Chibon
e4055e1d87
Add SAR script for datagrepper/datanommer
...
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-05-16 12:15:37 +02:00
Mikolaj Izdebski
928cc3f0de
Fix postgresql_server initdb
...
Empty /var/lib/pgsql/ directory is created during postgresql-server
package installation. We need another file to detect whether DB has
already been initialized.
2018-03-03 01:46:46 +00:00
Kevin Fenzi
c29d896faa
double this as sometimes it is too small a range
2017-10-10 01:15:16 +00:00
Patrick Uiterwijk
adcbf72f03
Packageize this, packageize that, packageize the world
...
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 22:25:52 +00:00
Kevin Fenzi
7eb4c6cae4
add a random delay up to 1 hour for db backup jobs so we do not have a thundering herd on db01
2017-10-05 00:48:45 +00:00
Kevin Fenzi
6b0faf84c0
use pxz for database dumps, might make them a good deal faster
2017-10-04 20:06:40 +00:00
Stephen Smoogen
e3c0199dad
make another set of stg ip changes
2017-09-29 15:24:58 +00:00
Pierre-Yves Chibon
fb53a3430a
Looks like checkpoint_segments is not liked by postgresql on Fedora
2017-05-11 17:29:07 +02:00
f872d71b3f
actually change the directive to dnf instead of copy-pasting
2016-08-10 12:41:55 +00:00
f19c5ff77d
adding dnf support to the postgresql_server role
2016-08-10 12:39:24 +00:00
Kevin Fenzi
04a52b8667
Death to all trailing whitespace.
2016-08-08 19:36:31 +00:00
Kevin Fenzi
0c983d9fd9
Fix the cron so it runs correctly.
2016-04-13 18:22:49 +00:00
Kevin Fenzi
f0d34369c5
Add script from jberkus to kill idle/locked transactions and log information about them on db-koji01
2016-04-13 17:46:41 +00:00
Kevin Fenzi
81e587bfa2
Only keep 2 days of db's not 3
2016-04-10 22:56:42 +00:00
Kevin Fenzi
4dad64e596
Clean up postgresql template and move variables into host vars for each db host as they are memory dependent.
2016-04-01 23:32:00 +00:00
Kevin Fenzi
ee6d457c84
Adjust db01 postgresql config also.
2016-03-15 18:00:36 +00:00
Kevin Fenzi
f1d26dda17
Tweak postgresql settings for db-koji01
2016-03-15 03:02:30 +00:00
Kevin Fenzi
3b67f74b90
Fix script to be executable
2015-04-27 18:25:55 +00:00
Kevin Fenzi
28b402ded1
Add missing fasdb cleanup sessions cron job.
2015-04-27 16:24:27 +00:00
Kevin Fenzi
fee2f37cc3
Exclude any sessions table data from db backups.
2015-04-02 17:56:55 +00:00