Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.13
Sv translation
languageru

Перед тем, как включить автоматическое архивирование, необходимо проверить, что каталог архивирования задан верно:

select value

from setting

where setting = 'archive_path';

Пользователь postgres  должен являться владельцем каталога.

Если каталог установлен неправильно, установите его, выполнив следующую команду:

begin;

select sp_setting_set('archive_path', '/test/archive/');

commit;

Для автоматического архивирования табличных пространств (по умолчанию функция выключена) вы можете использовать сценарии (запускаются от имени владельца схемы данных):

  • Для ежедневного табличного пространства, хранящего объекты со статусом Нарушение:
    begin;

    select sp_setting_set('violation_archive_enabled', '1');

    select sp_setting_set('violation_archive_period', 'D');

    commit;

  • Для ежедневного табличного пространства, хранящего объекты со статусом Нет нарушений:
    begin;

    select sp_setting_set('noviolation_archive_enabled', '1');

    select sp_setting_set('noviolation_archive_period', 'D');

    commit;

  • Для ежедневного табличного пространства, хранящего снимки экрана (скриншоты):
    begin;

    select sp_setting_set('other_archive_enabled', '1');

    select sp_setting_set('other_archive_period', 'D');

    commit;

где:
1 – показатель того, что автоматическое архивирование включено (чтобы выключить, вместо 1 используйте значение 0);
D – количество дней, по истечении которого ежедневное табличное пространство будет архивировано Системой.  Это Это число должно быть меньше устанавливаемого количества дней до удаления ежедневного ТП (см. "Удаление ежедневных табличных пространств").

Sv translation
languageen

Before you enable automatic archiving, check that the archive directory is specified correctly:

select value

from setting

where setting = 'archive_path';

A postgre user must be the owner of the directory.

If the directory is specified incorrectly, then set it properly with the following command:

begin;

select sp_setting_set('archive_path', '/test/archive/');

commit;

If enable automatic archiving of tablespaces (by default, the option is disabled), you can use the following scripts (you should run scripts on behalf of the owner of the database schema):

    • For the daily tablespace that stores objects with Violation status:
      begin;

      select sp_setting_set('violation_archive_enabled', '1');

      select sp_setting_set('violation_archive_period', 'D');

      commit;

    • For the daily tablespace that stores objects with No Violation status:
      begin;

      select sp_setting_set('noviolation_archive_enabled', '1');

      select sp_setting_set('noviolation_archive_period', 'D');

      commit;

    • For the daily tablespace that stores screenshots:
      begin;

      select sp_setting_set('other_archive_enabled', '1');

      select sp_setting_set('other_archive_period', 'D');

      commit;

    where:
    1 indicates that automatical deletion is enabled (to disable it, specify 0 instead);
    D is a number of days after which the which the daily tablespace is archived by the System.  This This number should be larger than the set number of days before days before archiving the daily tablespace (see "Автоматическое архивирование ежедневных табличных пространств").