X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/095dbe671880a9457960295425300e054feb6a1a..b0c95231a6a946fd7b8a7373d1683e4c7d07c2ef:/utils/cron_logrotate.sh?ds=sidebyside diff --git a/utils/cron_logrotate.sh b/utils/cron_logrotate.sh index 7d3ca4a3..b9291d95 100755 --- a/utils/cron_logrotate.sh +++ b/utils/cron_logrotate.sh @@ -14,7 +14,7 @@ pg_dump -a -F p -t backup_query_log $dbname | gzip -9 > $logfile psql -q -d $dbname -c 'DROP TABLE backup_query_log' # rotate -psql -q -1 -d $dbname -c 'ALTER TABLE new_query_log RENAME TO backup_query_log;CREATE TABLE new_query_log TABLESPACE ssd2 as (select * from backup_query_log limit 0);GRANT SELECT, INSERT, UPDATE ON new_query_log TO "www-data"' +psql -q -1 -d $dbname -c 'ALTER TABLE new_query_log RENAME TO backup_query_log;CREATE TABLE new_query_log as (select * from backup_query_log limit 0);GRANT SELECT, INSERT, UPDATE ON new_query_log TO "www-data"' psql -q -d $dbname -c 'ALTER INDEX idx_new_query_log_starttime RENAME TO idx_backup_query_log_starttime' -psql -q -d $dbname -c 'CREATE INDEX idx_new_query_log_starttime ON new_query_log USING BTREE (starttime) TABLESPACE ssd2' +psql -q -d $dbname -c 'CREATE INDEX idx_new_query_log_starttime ON new_query_log USING BTREE (starttime)'