How to Move Database Table with Screenshots to a New Hard Disk
Recording Service performance may vary depending on the hardware configuration. If you intend to use more than 20 Recorder instances, store PostgreSQL databases partially or fully on the SSD for better performance.
Important. Only the database table with screenshots is allowed to be moved to a new hard disk.
To do it, when the Recording Service installation or upgrade is complete, perform the following steps:
- Create a folder on HDD, e.g., D:\PostgresData
- Provide full access to this folder to account is used to run PostgreSQL service.
The default account is: NT AUTHORITY\NetworkService - Perform as superuser the following actions on your PostgreSQL instance:
- Register a new tablespace to define an alternative location on the file system where the data files containing database tables and indexes will reside.
To do this, run the command:
CREATE TABLESPACE tablespace_name LOCATION 'directory';
Example:
CREATE TABLESPACE slow_large_disk LOCATION 'D:\PostgresData'; - Change the Screenshot table's tablespace to the specified tablespace and move the data file(s) associated with the table to the new tablespace.
ALTER TABLE "Screenshot" SET TABLESPACE new_tablespace;
Example:
ALTER TABLE "Screenshot" SET TABLESPACE slow_large_disk;
Note. Do not move the other tables' data files.
22.09.2023 8:59:47