diff --git a/mysql.go b/mysql.go index ebc7b15fa..6b7d576c3 100644 --- a/mysql.go +++ b/mysql.go @@ -57,7 +57,6 @@ type MySQLDatabase struct { type MySQLDatabaseEngineConfig struct { MySQL *MySQLDatabaseEngineConfigMySQL `json:"mysql,omitempty"` BinlogRetentionPeriod *int `json:"binlog_retention_period,omitempty"` - ServiceLog *bool `json:"service_log,omitempty"` } type MySQLDatabaseEngineConfigMySQL struct { @@ -72,21 +71,17 @@ type MySQLDatabaseEngineConfigMySQL struct { InnoDBLockWaitTimeout *int `json:"innodb_lock_wait_timeout,omitempty"` InnoDBLogBufferSize *int `json:"innodb_log_buffer_size,omitempty"` InnoDBOnlineAlterLogMaxSize *int `json:"innodb_online_alter_log_max_size,omitempty"` - InnoDBPrintAllDeadlocks *bool `json:"innodb_print_all_deadlocks,omitempty"` InnoDBReadIOThreads *int `json:"innodb_read_io_threads,omitempty"` InnoDBRollbackOnTimeout *bool `json:"innodb_rollback_on_timeout,omitempty"` InnoDBThreadConcurrency *int `json:"innodb_thread_concurrency,omitempty"` InnoDBWriteIOThreads *int `json:"innodb_write_io_threads,omitempty"` InteractiveTimeout *int `json:"interactive_timeout,omitempty"` InternalTmpMemStorageEngine *string `json:"internal_tmp_mem_storage_engine,omitempty"` - LogOutput *string `json:"log_output,omitempty"` - LongQueryTime *float64 `json:"long_query_time,omitempty"` MaxAllowedPacket *int `json:"max_allowed_packet,omitempty"` MaxHeapTableSize *int `json:"max_heap_table_size,omitempty"` NetBufferLength *int `json:"net_buffer_length,omitempty"` NetReadTimeout *int `json:"net_read_timeout,omitempty"` NetWriteTimeout *int `json:"net_write_timeout,omitempty"` - SlowQueryLog *bool `json:"slow_query_log,omitempty"` SortBufferSize *int `json:"sort_buffer_size,omitempty"` SQLMode *string `json:"sql_mode,omitempty"` SQLRequirePrimaryKey *bool `json:"sql_require_primary_key,omitempty"` @@ -97,7 +92,6 @@ type MySQLDatabaseEngineConfigMySQL struct { type MySQLDatabaseConfigInfo struct { MySQL MySQLDatabaseConfigInfoMySQL `json:"mysql"` BinlogRetentionPeriod MySQLDatabaseConfigInfoBinlogRetentionPeriod `json:"binlog_retention_period"` - ServiceLog MySQLDatabaseConfigInfoServiceLog `json:"service_log"` } type MySQLDatabaseConfigInfoMySQL struct { @@ -112,21 +106,17 @@ type MySQLDatabaseConfigInfoMySQL struct { InnoDBLockWaitTimeout InnoDBLockWaitTimeout `json:"innodb_lock_wait_timeout"` InnoDBLogBufferSize InnoDBLogBufferSize `json:"innodb_log_buffer_size"` InnoDBOnlineAlterLogMaxSize InnoDBOnlineAlterLogMaxSize `json:"innodb_online_alter_log_max_size"` - InnoDBPrintAllDeadlocks InnoDBPrintAllDeadlocks `json:"innodb_print_all_deadlocks"` InnoDBReadIOThreads InnoDBReadIOThreads `json:"innodb_read_io_threads"` InnoDBRollbackOnTimeout InnoDBRollbackOnTimeout `json:"innodb_rollback_on_timeout"` InnoDBThreadConcurrency InnoDBThreadConcurrency `json:"innodb_thread_concurrency"` InnoDBWriteIOThreads InnoDBWriteIOThreads `json:"innodb_write_io_threads"` InteractiveTimeout InteractiveTimeout `json:"interactive_timeout"` InternalTmpMemStorageEngine InternalTmpMemStorageEngine `json:"internal_tmp_mem_storage_engine"` - LogOutput LogOutput `json:"log_output"` - LongQueryTime LongQueryTime `json:"long_query_time"` MaxAllowedPacket MaxAllowedPacket `json:"max_allowed_packet"` MaxHeapTableSize MaxHeapTableSize `json:"max_heap_table_size"` NetBufferLength NetBufferLength `json:"net_buffer_length"` NetReadTimeout NetReadTimeout `json:"net_read_timeout"` NetWriteTimeout NetWriteTimeout `json:"net_write_timeout"` - SlowQueryLog SlowQueryLog `json:"slow_query_log"` SortBufferSize SortBufferSize `json:"sort_buffer_size"` SQLMode SQLMode `json:"sql_mode"` SQLRequirePrimaryKey SQLRequirePrimaryKey `json:"sql_require_primary_key"` @@ -234,13 +224,6 @@ type InnoDBOnlineAlterLogMaxSize struct { Type string `json:"type"` } -type InnoDBPrintAllDeadlocks struct { - Description string `json:"description"` - Example bool `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type InnoDBReadIOThreads struct { Description string `json:"description"` Example int `json:"example"` @@ -292,23 +275,6 @@ type InternalTmpMemStorageEngine struct { Type string `json:"type"` } -type LogOutput struct { - Description string `json:"description"` - Enum []string `json:"enum"` - Example string `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - -type LongQueryTime struct { - Description string `json:"description"` - Example float64 `json:"example"` - Maximum float64 `json:"maximum"` - Minimum float64 `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type MaxAllowedPacket struct { Description string `json:"description"` Example int `json:"example"` @@ -354,13 +320,6 @@ type NetWriteTimeout struct { Type string `json:"type"` } -type SlowQueryLog struct { - Description string `json:"description"` - Example bool `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type SortBufferSize struct { Description string `json:"description"` Example int `json:"example"` @@ -413,13 +372,6 @@ type MySQLDatabaseConfigInfoBinlogRetentionPeriod struct { Type string `json:"type"` } -type MySQLDatabaseConfigInfoServiceLog struct { - Description string `json:"description"` - Example bool `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type []string `json:"type"` -} - func (d *MySQLDatabase) UnmarshalJSON(b []byte) error { type Mask MySQLDatabase diff --git a/postgres.go b/postgres.go index e9e03c8f0..eba19cd70 100644 --- a/postgres.go +++ b/postgres.go @@ -75,16 +75,13 @@ type PostgresDatabaseEngineConfig struct { PG *PostgresDatabaseEngineConfigPG `json:"pg,omitempty"` PGStatMonitorEnable *bool `json:"pg_stat_monitor_enable,omitempty"` PGLookout *PostgresDatabaseEngineConfigPGLookout `json:"pglookout,omitempty"` - ServiceLog *bool `json:"service_log,omitempty"` SharedBuffersPercentage *float64 `json:"shared_buffers_percentage,omitempty"` - SynchronousReplication *string `json:"synchronous_replication,omitempty"` WorkMem *int `json:"work_mem,omitempty"` } type PostgresDatabaseEngineConfigPG struct { AutovacuumAnalyzeScaleFactor *float64 `json:"autovacuum_analyze_scale_factor,omitempty"` AutovacuumAnalyzeThreshold *int32 `json:"autovacuum_analyze_threshold,omitempty"` - AutovacuumFreezeMaxAge *int `json:"autovacuum_freeze_max_age,omitempty"` AutovacuumMaxWorkers *int `json:"autovacuum_max_workers,omitempty"` AutovacuumNaptime *int `json:"autovacuum_naptime,omitempty"` AutovacuumVacuumCostDelay *int `json:"autovacuum_vacuum_cost_delay,omitempty"` @@ -99,18 +96,12 @@ type PostgresDatabaseEngineConfigPG struct { DefaultToastCompression *string `json:"default_toast_compression,omitempty"` IdleInTransactionSessionTimeout *int `json:"idle_in_transaction_session_timeout,omitempty"` JIT *bool `json:"jit,omitempty"` - LogAutovacuumMinDuration *int32 `json:"log_autovacuum_min_duration,omitempty"` - LogErrorVerbosity *string `json:"log_error_verbosity,omitempty"` - LogLinePrefix *string `json:"log_line_prefix,omitempty"` - LogMinDurationStatement *int `json:"log_min_duration_statement,omitempty"` - LogTempFiles *int32 `json:"log_temp_files,omitempty"` MaxFilesPerProcess *int `json:"max_files_per_process,omitempty"` MaxLocksPerTransaction *int `json:"max_locks_per_transaction,omitempty"` MaxLogicalReplicationWorkers *int `json:"max_logical_replication_workers,omitempty"` MaxParallelWorkers *int `json:"max_parallel_workers,omitempty"` MaxParallelWorkersPerGather *int `json:"max_parallel_workers_per_gather,omitempty"` MaxPredLocksPerTransaction *int `json:"max_pred_locks_per_transaction,omitempty"` - MaxPreparedTransactions *int `json:"max_prepared_transactions,omitempty"` MaxReplicationSlots *int `json:"max_replication_slots,omitempty"` MaxSlotWALKeepSize *int32 `json:"max_slot_wal_keep_size,omitempty"` MaxStackDepth *int `json:"max_stack_depth,omitempty"` @@ -142,16 +133,13 @@ type PostgresDatabaseConfigInfo struct { PG PostgresDatabaseConfigInfoPG `json:"pg"` PGStatMonitorEnable PostgresDatabaseConfigInfoPGStatMonitorEnable `json:"pg_stat_monitor_enable"` PGLookout PostgresDatabaseConfigInfoPGLookout `json:"pglookout"` - ServiceLog PostgresDatabaseConfigInfoServiceLog `json:"service_log"` SharedBuffersPercentage PostgresDatabaseConfigInfoSharedBuffersPercentage `json:"shared_buffers_percentage"` - SynchronousReplication PostgresDatabaseConfigInfoSynchronousReplication `json:"synchronous_replication"` WorkMem PostgresDatabaseConfigInfoWorkMem `json:"work_mem"` } type PostgresDatabaseConfigInfoPG struct { AutovacuumAnalyzeScaleFactor AutovacuumAnalyzeScaleFactor `json:"autovacuum_analyze_scale_factor"` AutovacuumAnalyzeThreshold AutovacuumAnalyzeThreshold `json:"autovacuum_analyze_threshold"` - AutovacuumFreezeMaxAge AutovacuumFreezeMaxAge `json:"autovacuum_freeze_max_age"` AutovacuumMaxWorkers AutovacuumMaxWorkers `json:"autovacuum_max_workers"` AutovacuumNaptime AutovacuumNaptime `json:"autovacuum_naptime"` AutovacuumVacuumCostDelay AutovacuumVacuumCostDelay `json:"autovacuum_vacuum_cost_delay"` @@ -166,18 +154,12 @@ type PostgresDatabaseConfigInfoPG struct { DefaultToastCompression DefaultToastCompression `json:"default_toast_compression"` IdleInTransactionSessionTimeout IdleInTransactionSessionTimeout `json:"idle_in_transaction_session_timeout"` JIT JIT `json:"jit"` - LogAutovacuumMinDuration LogAutovacuumMinDuration `json:"log_autovacuum_min_duration"` - LogErrorVerbosity LogErrorVerbosity `json:"log_error_verbosity"` - LogLinePrefix LogLinePrefix `json:"log_line_prefix"` - LogMinDurationStatement LogMinDurationStatement `json:"log_min_duration_statement"` - LogTempFiles LogTempFiles `json:"log_temp_files"` MaxFilesPerProcess MaxFilesPerProcess `json:"max_files_per_process"` MaxLocksPerTransaction MaxLocksPerTransaction `json:"max_locks_per_transaction"` MaxLogicalReplicationWorkers MaxLogicalReplicationWorkers `json:"max_logical_replication_workers"` MaxParallelWorkers MaxParallelWorkers `json:"max_parallel_workers"` MaxParallelWorkersPerGather MaxParallelWorkersPerGather `json:"max_parallel_workers_per_gather"` MaxPredLocksPerTransaction MaxPredLocksPerTransaction `json:"max_pred_locks_per_transaction"` - MaxPreparedTransactions MaxPreparedTransactions `json:"max_prepared_transactions"` MaxReplicationSlots MaxReplicationSlots `json:"max_replication_slots"` MaxSlotWALKeepSize MaxSlotWALKeepSize `json:"max_slot_wal_keep_size"` MaxStackDepth MaxStackDepth `json:"max_stack_depth"` @@ -217,15 +199,6 @@ type AutovacuumAnalyzeThreshold struct { Type string `json:"type"` } -type AutovacuumFreezeMaxAge struct { - Description string `json:"description"` - Example int `json:"example"` - Maximum int `json:"maximum"` - Minimum int `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type AutovacuumMaxWorkers struct { Description string `json:"description"` Maximum int `json:"maximum"` @@ -342,44 +315,6 @@ type JIT struct { Type string `json:"type"` } -type LogAutovacuumMinDuration struct { - Description string `json:"description"` - Maximum int32 `json:"maximum"` - Minimum int32 `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - -type LogErrorVerbosity struct { - Description string `json:"description"` - Enum []string `json:"enum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - -type LogLinePrefix struct { - Description string `json:"description"` - Enum []string `json:"enum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - -type LogMinDurationStatement struct { - Description string `json:"description"` - Maximum int `json:"maximum"` - Minimum int `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - -type LogTempFiles struct { - Description string `json:"description"` - Maximum int32 `json:"maximum"` - Minimum int32 `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type MaxFilesPerProcess struct { Description string `json:"description"` Maximum int `json:"maximum"` @@ -428,14 +363,6 @@ type MaxPredLocksPerTransaction struct { Type string `json:"type"` } -type MaxPreparedTransactions struct { - Description string `json:"description"` - Maximum int `json:"maximum"` - Minimum int `json:"minimum"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type MaxReplicationSlots struct { Description string `json:"description"` Maximum int `json:"maximum"` @@ -625,13 +552,6 @@ type PGLookoutMaxFailoverReplicationTimeLag struct { Type string `json:"type"` } -type PostgresDatabaseConfigInfoServiceLog struct { - Description string `json:"description"` - Example bool `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type []string `json:"type"` -} - type PostgresDatabaseConfigInfoSharedBuffersPercentage struct { Description string `json:"description"` Example float64 `json:"example"` @@ -641,14 +561,6 @@ type PostgresDatabaseConfigInfoSharedBuffersPercentage struct { Type string `json:"type"` } -type PostgresDatabaseConfigInfoSynchronousReplication struct { - Description string `json:"description"` - Enum []string `json:"enum"` - Example string `json:"example"` - RequiresRestart bool `json:"requires_restart"` - Type string `json:"type"` -} - type PostgresDatabaseConfigInfoWorkMem struct { Description string `json:"description"` Example int `json:"example"` diff --git a/test/unit/fixtures/mysql_database_config_get.json b/test/unit/fixtures/mysql_database_config_get.json index ce6cb6b47..9cba0afd4 100644 --- a/test/unit/fixtures/mysql_database_config_get.json +++ b/test/unit/fixtures/mysql_database_config_get.json @@ -92,12 +92,6 @@ "requires_restart": false, "type": "integer" }, - "innodb_print_all_deadlocks": { - "description": "When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default.", - "example": true, - "requires_restart": false, - "type": "boolean" - }, "innodb_read_io_threads": { "description": "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", "example": 10, @@ -146,26 +140,6 @@ "requires_restart": false, "type": "string" }, - "log_output": { - "description": "The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE.", - "enum": [ - "INSIGHTS", - "NONE", - "TABLE", - "INSIGHTS,TABLE" - ], - "example": "INSIGHTS", - "requires_restart": false, - "type": "string" - }, - "long_query_time": { - "description": "The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute.", - "example": 10, - "maximum": 3600, - "minimum": 0.0, - "requires_restart": false, - "type": "number" - }, "max_allowed_packet": { "description": "Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M)", "example": 67108864, @@ -206,12 +180,6 @@ "requires_restart": false, "type": "integer" }, - "slow_query_log": { - "description": "Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table.", - "example": true, - "requires_restart": false, - "type": "boolean" - }, "sort_buffer_size": { "description": "Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K)", "example": 262144, @@ -258,14 +226,5 @@ "minimum": 600, "requires_restart": false, "type": "integer" - }, - "service_log": { - "description": "Store logs for the service so that they are available in the HTTP API and console.", - "example": true, - "requires_restart": false, - "type": [ - "boolean", - "null" - ] } } \ No newline at end of file diff --git a/test/unit/fixtures/mysql_database_create.json b/test/unit/fixtures/mysql_database_create.json index cd4c4e545..90d51ad98 100644 --- a/test/unit/fixtures/mysql_database_create.json +++ b/test/unit/fixtures/mysql_database_create.json @@ -41,7 +41,6 @@ "version": "8.0.26", "engine_config": { "binlog_retention_period": 600, - "service_log": false, "mysql": { "connect_timeout": 20, "default_time_zone": "+03:00", @@ -54,21 +53,17 @@ "innodb_lock_wait_timeout": 50, "innodb_log_buffer_size": 16777216, "innodb_online_alter_log_max_size": 134217728, - "innodb_print_all_deadlocks": true, "innodb_read_io_threads": 10, "innodb_rollback_on_timeout": true, "innodb_thread_concurrency": 10, "innodb_write_io_threads": 10, "interactive_timeout": 3600, "internal_tmp_mem_storage_engine": "TempTable", - "log_output": "INSIGHTS", - "long_query_time": 10, "max_allowed_packet": 67108864, "max_heap_table_size": 16777216, "net_buffer_length": 16384, "net_read_timeout": 30, "net_write_timeout": 30, - "slow_query_log": true, "sort_buffer_size": 262144, "sql_mode": "ANSI,TRADITIONAL", "sql_require_primary_key": true, diff --git a/test/unit/fixtures/mysql_database_get.json b/test/unit/fixtures/mysql_database_get.json index ea3a08ca5..57e1ad585 100644 --- a/test/unit/fixtures/mysql_database_get.json +++ b/test/unit/fixtures/mysql_database_get.json @@ -41,7 +41,6 @@ "version": "8.0.26", "engine_config": { "binlog_retention_period": 600, - "service_log": true, "mysql": { "connect_timeout": 10, "default_time_zone": "+03:00", @@ -54,21 +53,17 @@ "innodb_lock_wait_timeout": 50, "innodb_log_buffer_size": 16777216, "innodb_online_alter_log_max_size": 134217728, - "innodb_print_all_deadlocks": true, "innodb_read_io_threads": 10, "innodb_rollback_on_timeout": true, "innodb_thread_concurrency": 10, "innodb_write_io_threads": 10, "interactive_timeout": 3600, "internal_tmp_mem_storage_engine": "TempTable", - "log_output": "INSIGHTS", - "long_query_time": 10, "max_allowed_packet": 67108864, "max_heap_table_size": 16777216, "net_buffer_length": 16384, "net_read_timeout": 30, "net_write_timeout": 30, - "slow_query_log": true, "sort_buffer_size": 262144, "sql_mode": "ANSI,TRADITIONAL", "sql_require_primary_key": true, diff --git a/test/unit/fixtures/mysql_database_update.json b/test/unit/fixtures/mysql_database_update.json index 1710e13fa..29a4dde85 100644 --- a/test/unit/fixtures/mysql_database_update.json +++ b/test/unit/fixtures/mysql_database_update.json @@ -41,7 +41,6 @@ "version": "8.0.26", "engine_config": { "binlog_retention_period": 600, - "service_log": false, "mysql": { "connect_timeout": 20, "default_time_zone": "+03:00", @@ -54,21 +53,17 @@ "innodb_lock_wait_timeout": 50, "innodb_log_buffer_size": 16777216, "innodb_online_alter_log_max_size": 134217728, - "innodb_print_all_deadlocks": true, "innodb_read_io_threads": 10, "innodb_rollback_on_timeout": true, "innodb_thread_concurrency": 10, "innodb_write_io_threads": 10, "interactive_timeout": 3600, "internal_tmp_mem_storage_engine": "TempTable", - "log_output": "INSIGHTS", - "long_query_time": 10, "max_allowed_packet": 67108864, "max_heap_table_size": 16777216, "net_buffer_length": 16384, "net_read_timeout": 30, "net_write_timeout": 30, - "slow_query_log": true, "sort_buffer_size": 262144, "sql_mode": "ANSI,TRADITIONAL", "sql_require_primary_key": true, diff --git a/test/unit/fixtures/postgresql_database_config_get.json b/test/unit/fixtures/postgresql_database_config_get.json index 5f3e8b43b..f66f991a8 100644 --- a/test/unit/fixtures/postgresql_database_config_get.json +++ b/test/unit/fixtures/postgresql_database_config_get.json @@ -14,14 +14,6 @@ "requires_restart": false, "type": "integer" }, - "autovacuum_freeze_max_age": { - "description": "Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted.", - "example": 200000000, - "maximum": 1500000000, - "minimum": 200000000, - "requires_restart": true, - "type": "integer" - }, "autovacuum_max_workers": { "description": "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.", "maximum": 20, @@ -127,48 +119,6 @@ "requires_restart": false, "type": "boolean" }, - "log_autovacuum_min_duration": { - "description": "Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions.", - "maximum": 2147483647, - "minimum": -1, - "requires_restart": false, - "type": "integer" - }, - "log_error_verbosity": { - "description": "Controls the amount of detail written in the server log for each message that is logged.", - "enum": [ - "TERSE", - "DEFAULT", - "VERBOSE" - ], - "requires_restart": false, - "type": "string" - }, - "log_line_prefix": { - "description": "Choose from one of the available log formats.", - "enum": [ - "'pid=%p,user=%u,db=%d,app=%a,client=%h '", - "'pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '", - "'%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '", - "'%m [%p] %q[user=%u,db=%d,app=%a] '" - ], - "requires_restart": false, - "type": "string" - }, - "log_min_duration_statement": { - "description": "Log statements that take more than this number of milliseconds to run, -1 disables", - "maximum": 86400000, - "minimum": -1, - "requires_restart": false, - "type": "integer" - }, - "log_temp_files": { - "description": "Log statements for each temporary file created larger than this number of kilobytes, -1 disables", - "maximum": 2147483647, - "minimum": -1, - "requires_restart": false, - "type": "integer" - }, "max_files_per_process": { "description": "PostgreSQL maximum number of files that can be open per process", "maximum": 4096, @@ -211,13 +161,6 @@ "requires_restart": false, "type": "integer" }, - "max_prepared_transactions": { - "description": "PostgreSQL maximum prepared transactions", - "maximum": 10000, - "minimum": 0, - "requires_restart": false, - "type": "integer" - }, "max_replication_slots": { "description": "PostgreSQL maximum replication slots", "maximum": 64, @@ -405,15 +348,6 @@ "type": "integer" } }, - "service_log": { - "description": "Store logs for the service so that they are available in the HTTP API and console.", - "example": true, - "requires_restart": false, - "type": [ - "boolean", - "null" - ] - }, "shared_buffers_percentage": { "description": "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.", "example": 41.5, @@ -422,16 +356,6 @@ "requires_restart": false, "type": "number" }, - "synchronous_replication": { - "description": "Synchronous replication type. Note that the service plan also needs to support synchronous replication.", - "enum": [ - "quorum", - "off" - ], - "example": "off", - "requires_restart": false, - "type": "string" - }, "work_mem": { "description": "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).", "example": 4, diff --git a/test/unit/fixtures/postgresql_database_create.json b/test/unit/fixtures/postgresql_database_create.json index e6181fa87..6bc0e3975 100644 --- a/test/unit/fixtures/postgresql_database_create.json +++ b/test/unit/fixtures/postgresql_database_create.json @@ -42,7 +42,6 @@ "pg": { "autovacuum_analyze_scale_factor": 0.5, "autovacuum_analyze_threshold": 100, - "autovacuum_freeze_max_age": 400000000, "autovacuum_max_workers": 10, "autovacuum_naptime": 100, "autovacuum_vacuum_cost_delay": 50, @@ -57,18 +56,12 @@ "default_toast_compression": "lz4", "idle_in_transaction_session_timeout": 100, "jit": true, - "log_autovacuum_min_duration": 100, - "log_error_verbosity": "DEFAULT", - "log_line_prefix": "'pid=%p,user=%u,db=%d,app=%a,client=%h '", - "log_min_duration_statement": 100, - "log_temp_files": 100, "max_files_per_process": 100, "max_locks_per_transaction": 100, "max_logical_replication_workers": 32, "max_parallel_workers": 64, "max_parallel_workers_per_gather": 64, "max_pred_locks_per_transaction": 1000, - "max_prepared_transactions": 5000, "max_replication_slots": 32, "max_slot_wal_keep_size": 100, "max_stack_depth": 3507152, @@ -95,9 +88,7 @@ "pglookout": { "max_failover_replication_time_lag": 1000 }, - "service_log": false, "shared_buffers_percentage": 41.5, - "synchronous_replication": "off", "work_mem": 4 } } \ No newline at end of file diff --git a/test/unit/fixtures/postgresql_database_get.json b/test/unit/fixtures/postgresql_database_get.json index be4c084be..da975951f 100644 --- a/test/unit/fixtures/postgresql_database_get.json +++ b/test/unit/fixtures/postgresql_database_get.json @@ -42,7 +42,6 @@ "pg": { "autovacuum_analyze_scale_factor": 0.5, "autovacuum_analyze_threshold": 100, - "autovacuum_freeze_max_age": 200000000, "autovacuum_max_workers": 10, "autovacuum_naptime": 100, "autovacuum_vacuum_cost_delay": 50, @@ -57,18 +56,12 @@ "default_toast_compression": "lz4", "idle_in_transaction_session_timeout": 100, "jit": true, - "log_autovacuum_min_duration": 100, - "log_error_verbosity": "DEFAULT", - "log_line_prefix": "'pid=%p,user=%u,db=%d,app=%a,client=%h '", - "log_min_duration_statement": 100, - "log_temp_files": 100, "max_files_per_process": 100, "max_locks_per_transaction": 100, "max_logical_replication_workers": 32, "max_parallel_workers": 64, "max_parallel_workers_per_gather": 64, "max_pred_locks_per_transaction": 1000, - "max_prepared_transactions": 5000, "max_replication_slots": 32, "max_slot_wal_keep_size": 100, "max_stack_depth": 3507152, @@ -95,9 +88,7 @@ "pglookout": { "max_failover_replication_time_lag": 1000 }, - "service_log": true, "shared_buffers_percentage": 41.5, - "synchronous_replication": "off", "work_mem": 4 } } \ No newline at end of file diff --git a/test/unit/fixtures/postgresql_database_update.json b/test/unit/fixtures/postgresql_database_update.json index c93e4cc56..e17917240 100644 --- a/test/unit/fixtures/postgresql_database_update.json +++ b/test/unit/fixtures/postgresql_database_update.json @@ -42,7 +42,6 @@ "pg": { "autovacuum_analyze_scale_factor": 0.5, "autovacuum_analyze_threshold": 100, - "autovacuum_freeze_max_age": 400000000, "autovacuum_max_workers": 10, "autovacuum_naptime": 100, "autovacuum_vacuum_cost_delay": 50, @@ -57,18 +56,12 @@ "default_toast_compression": "lz4", "idle_in_transaction_session_timeout": 100, "jit": true, - "log_autovacuum_min_duration": 100, - "log_error_verbosity": "DEFAULT", - "log_line_prefix": "'pid=%p,user=%u,db=%d,app=%a,client=%h '", - "log_min_duration_statement": 100, - "log_temp_files": 100, "max_files_per_process": 100, "max_locks_per_transaction": 100, "max_logical_replication_workers": 32, "max_parallel_workers": 64, "max_parallel_workers_per_gather": 64, "max_pred_locks_per_transaction": 1000, - "max_prepared_transactions": 5000, "max_replication_slots": 32, "max_slot_wal_keep_size": 100, "max_stack_depth": 3507152, @@ -95,9 +88,7 @@ "pglookout": { "max_failover_replication_time_lag": 1000 }, - "service_log": false, "shared_buffers_percentage": 41.5, - "synchronous_replication": "off", "work_mem": 4 } } \ No newline at end of file diff --git a/test/unit/mysql_test.go b/test/unit/mysql_test.go index d42f46d19..4fdd3e2fe 100644 --- a/test/unit/mysql_test.go +++ b/test/unit/mysql_test.go @@ -55,7 +55,6 @@ func TestDatabaseMySQL_Get(t *testing.T) { assert.Equal(t, "8.0.26", db.Version) assert.Equal(t, 600, *db.EngineConfig.BinlogRetentionPeriod) - assert.Equal(t, true, *db.EngineConfig.ServiceLog) assert.Equal(t, 10, *db.EngineConfig.MySQL.ConnectTimeout) assert.Equal(t, "+03:00", *db.EngineConfig.MySQL.DefaultTimeZone) assert.Equal(t, float64(1024), *db.EngineConfig.MySQL.GroupConcatMaxLen) @@ -67,21 +66,17 @@ func TestDatabaseMySQL_Get(t *testing.T) { assert.Equal(t, 50, *db.EngineConfig.MySQL.InnoDBLockWaitTimeout) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.InnoDBLogBufferSize) assert.Equal(t, 134217728, *db.EngineConfig.MySQL.InnoDBOnlineAlterLogMaxSize) - assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBPrintAllDeadlocks) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBReadIOThreads) assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBRollbackOnTimeout) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBThreadConcurrency) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBWriteIOThreads) assert.Equal(t, 3600, *db.EngineConfig.MySQL.InteractiveTimeout) assert.Equal(t, "TempTable", *db.EngineConfig.MySQL.InternalTmpMemStorageEngine) - assert.Equal(t, "INSIGHTS", *db.EngineConfig.MySQL.LogOutput) - assert.Equal(t, float64(10), *db.EngineConfig.MySQL.LongQueryTime) assert.Equal(t, 67108864, *db.EngineConfig.MySQL.MaxAllowedPacket) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.MaxHeapTableSize) assert.Equal(t, 16384, *db.EngineConfig.MySQL.NetBufferLength) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetReadTimeout) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetWriteTimeout) - assert.Equal(t, true, *db.EngineConfig.MySQL.SlowQueryLog) assert.Equal(t, 262144, *db.EngineConfig.MySQL.SortBufferSize) assert.Equal(t, "ANSI,TRADITIONAL", *db.EngineConfig.MySQL.SQLMode) assert.Equal(t, true, *db.EngineConfig.MySQL.SQLRequirePrimaryKey) @@ -103,7 +98,6 @@ func TestDatabaseMySQL_Update(t *testing.T) { MySQL: &linodego.MySQLDatabaseEngineConfigMySQL{ ConnectTimeout: linodego.Pointer(20), }, - ServiceLog: linodego.Pointer(false), }, } @@ -130,7 +124,6 @@ func TestDatabaseMySQL_Update(t *testing.T) { assert.Equal(t, "8.0.26", db.Version) assert.Equal(t, 600, *db.EngineConfig.BinlogRetentionPeriod) - assert.Equal(t, false, *db.EngineConfig.ServiceLog) assert.Equal(t, 20, *db.EngineConfig.MySQL.ConnectTimeout) assert.Equal(t, "+03:00", *db.EngineConfig.MySQL.DefaultTimeZone) assert.Equal(t, float64(1024), *db.EngineConfig.MySQL.GroupConcatMaxLen) @@ -142,21 +135,17 @@ func TestDatabaseMySQL_Update(t *testing.T) { assert.Equal(t, 50, *db.EngineConfig.MySQL.InnoDBLockWaitTimeout) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.InnoDBLogBufferSize) assert.Equal(t, 134217728, *db.EngineConfig.MySQL.InnoDBOnlineAlterLogMaxSize) - assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBPrintAllDeadlocks) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBReadIOThreads) assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBRollbackOnTimeout) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBThreadConcurrency) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBWriteIOThreads) assert.Equal(t, 3600, *db.EngineConfig.MySQL.InteractiveTimeout) assert.Equal(t, "TempTable", *db.EngineConfig.MySQL.InternalTmpMemStorageEngine) - assert.Equal(t, "INSIGHTS", *db.EngineConfig.MySQL.LogOutput) - assert.Equal(t, float64(10), *db.EngineConfig.MySQL.LongQueryTime) assert.Equal(t, 67108864, *db.EngineConfig.MySQL.MaxAllowedPacket) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.MaxHeapTableSize) assert.Equal(t, 16384, *db.EngineConfig.MySQL.NetBufferLength) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetReadTimeout) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetWriteTimeout) - assert.Equal(t, true, *db.EngineConfig.MySQL.SlowQueryLog) assert.Equal(t, 262144, *db.EngineConfig.MySQL.SortBufferSize) assert.Equal(t, "ANSI,TRADITIONAL", *db.EngineConfig.MySQL.SQLMode) assert.Equal(t, true, *db.EngineConfig.MySQL.SQLRequirePrimaryKey) @@ -181,7 +170,6 @@ func TestDatabaseMySQL_Create(t *testing.T) { MySQL: &linodego.MySQLDatabaseEngineConfigMySQL{ ConnectTimeout: linodego.Pointer(20), }, - ServiceLog: linodego.Pointer(false), }, } @@ -208,7 +196,6 @@ func TestDatabaseMySQL_Create(t *testing.T) { assert.Equal(t, "8.0.26", db.Version) assert.Equal(t, 600, *db.EngineConfig.BinlogRetentionPeriod) - assert.Equal(t, false, *db.EngineConfig.ServiceLog) assert.Equal(t, 20, *db.EngineConfig.MySQL.ConnectTimeout) assert.Equal(t, "+03:00", *db.EngineConfig.MySQL.DefaultTimeZone) assert.Equal(t, float64(1024), *db.EngineConfig.MySQL.GroupConcatMaxLen) @@ -220,21 +207,17 @@ func TestDatabaseMySQL_Create(t *testing.T) { assert.Equal(t, 50, *db.EngineConfig.MySQL.InnoDBLockWaitTimeout) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.InnoDBLogBufferSize) assert.Equal(t, 134217728, *db.EngineConfig.MySQL.InnoDBOnlineAlterLogMaxSize) - assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBPrintAllDeadlocks) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBReadIOThreads) assert.Equal(t, true, *db.EngineConfig.MySQL.InnoDBRollbackOnTimeout) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBThreadConcurrency) assert.Equal(t, 10, *db.EngineConfig.MySQL.InnoDBWriteIOThreads) assert.Equal(t, 3600, *db.EngineConfig.MySQL.InteractiveTimeout) assert.Equal(t, "TempTable", *db.EngineConfig.MySQL.InternalTmpMemStorageEngine) - assert.Equal(t, "INSIGHTS", *db.EngineConfig.MySQL.LogOutput) - assert.Equal(t, float64(10), *db.EngineConfig.MySQL.LongQueryTime) assert.Equal(t, 67108864, *db.EngineConfig.MySQL.MaxAllowedPacket) assert.Equal(t, 16777216, *db.EngineConfig.MySQL.MaxHeapTableSize) assert.Equal(t, 16384, *db.EngineConfig.MySQL.NetBufferLength) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetReadTimeout) assert.Equal(t, 30, *db.EngineConfig.MySQL.NetWriteTimeout) - assert.Equal(t, true, *db.EngineConfig.MySQL.SlowQueryLog) assert.Equal(t, 262144, *db.EngineConfig.MySQL.SortBufferSize) assert.Equal(t, "ANSI,TRADITIONAL", *db.EngineConfig.MySQL.SQLMode) assert.Equal(t, true, *db.EngineConfig.MySQL.SQLRequirePrimaryKey) @@ -429,12 +412,6 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.InnoDBOnlineAlterLogMaxSize.RequiresRestart) assert.Equal(t, "integer", config.MySQL.InnoDBOnlineAlterLogMaxSize.Type) - assert.Equal(t, "When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default.", - config.MySQL.InnoDBPrintAllDeadlocks.Description) - assert.Equal(t, true, config.MySQL.InnoDBPrintAllDeadlocks.Example) - assert.False(t, config.MySQL.InnoDBPrintAllDeadlocks.RequiresRestart) - assert.Equal(t, "boolean", config.MySQL.InnoDBPrintAllDeadlocks.Type) - assert.Equal(t, "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.", config.MySQL.InnoDBReadIOThreads.Description) assert.Equal(t, 10, config.MySQL.InnoDBReadIOThreads.Example) @@ -480,26 +457,6 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.InternalTmpMemStorageEngine.RequiresRestart) assert.Equal(t, "string", config.MySQL.InternalTmpMemStorageEngine.Type) - assert.Equal(t, "The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE.", - config.MySQL.LogOutput.Description) - assert.Equal(t, "INSIGHTS", config.MySQL.LogOutput.Example) - assert.Equal(t, []string{ - "INSIGHTS", - "NONE", - "TABLE", - "INSIGHTS,TABLE", - }, config.MySQL.LogOutput.Enum) - assert.False(t, config.MySQL.LogOutput.RequiresRestart) - assert.Equal(t, "string", config.MySQL.LogOutput.Type) - - assert.Equal(t, "The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute.", - config.MySQL.LongQueryTime.Description) - assert.Equal(t, float64(10), config.MySQL.LongQueryTime.Example) - assert.Equal(t, float64(3600), config.MySQL.LongQueryTime.Maximum) - assert.Equal(t, float64(0.0), config.MySQL.LongQueryTime.Minimum) - assert.False(t, config.MySQL.LongQueryTime.RequiresRestart) - assert.Equal(t, "number", config.MySQL.LongQueryTime.Type) - assert.Equal(t, "Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M)", config.MySQL.MaxAllowedPacket.Description) assert.Equal(t, 67108864, config.MySQL.MaxAllowedPacket.Example) @@ -540,12 +497,6 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.False(t, config.MySQL.NetWriteTimeout.RequiresRestart) assert.Equal(t, "integer", config.MySQL.NetWriteTimeout.Type) - assert.Equal(t, "Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table.", - config.MySQL.SlowQueryLog.Description) - assert.Equal(t, true, config.MySQL.SlowQueryLog.Example) - assert.False(t, config.MySQL.SlowQueryLog.RequiresRestart) - assert.Equal(t, "boolean", config.MySQL.SlowQueryLog.Type) - assert.Equal(t, "Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K)", config.MySQL.SortBufferSize.Description) assert.Equal(t, 262144, config.MySQL.SortBufferSize.Example) @@ -591,10 +542,4 @@ func TestDatabaseMySQLConfig_Get(t *testing.T) { assert.Equal(t, 600, config.BinlogRetentionPeriod.Minimum) assert.False(t, config.BinlogRetentionPeriod.RequiresRestart) assert.Equal(t, "integer", config.BinlogRetentionPeriod.Type) - - assert.Equal(t, "Store logs for the service so that they are available in the HTTP API and console.", - config.ServiceLog.Description) - assert.Equal(t, true, config.ServiceLog.Example) - assert.False(t, config.ServiceLog.RequiresRestart) - assert.Equal(t, []string{"boolean", "null"}, config.ServiceLog.Type) } diff --git a/test/unit/postgres_test.go b/test/unit/postgres_test.go index 11e5a3c65..521e68ae1 100644 --- a/test/unit/postgres_test.go +++ b/test/unit/postgres_test.go @@ -55,13 +55,10 @@ func TestDatabasePostgreSQL_Get(t *testing.T) { assert.Equal(t, true, *db.EngineConfig.PGStatMonitorEnable) assert.Equal(t, int64(1000), *db.EngineConfig.PGLookout.MaxFailoverReplicationTimeLag) - assert.Equal(t, true, *db.EngineConfig.ServiceLog) assert.Equal(t, 41.5, *db.EngineConfig.SharedBuffersPercentage) - assert.Equal(t, "off", *db.EngineConfig.SynchronousReplication) assert.Equal(t, 4, *db.EngineConfig.WorkMem) assert.Equal(t, 0.5, *db.EngineConfig.PG.AutovacuumAnalyzeScaleFactor) assert.Equal(t, int32(100), *db.EngineConfig.PG.AutovacuumAnalyzeThreshold) - assert.Equal(t, 200000000, *db.EngineConfig.PG.AutovacuumFreezeMaxAge) assert.Equal(t, 10, *db.EngineConfig.PG.AutovacuumMaxWorkers) assert.Equal(t, 100, *db.EngineConfig.PG.AutovacuumNaptime) assert.Equal(t, 50, *db.EngineConfig.PG.AutovacuumVacuumCostDelay) @@ -76,18 +73,12 @@ func TestDatabasePostgreSQL_Get(t *testing.T) { assert.Equal(t, "lz4", *db.EngineConfig.PG.DefaultToastCompression) assert.Equal(t, 100, *db.EngineConfig.PG.IdleInTransactionSessionTimeout) assert.Equal(t, true, *db.EngineConfig.PG.JIT) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogAutovacuumMinDuration) - assert.Equal(t, "DEFAULT", *db.EngineConfig.PG.LogErrorVerbosity) - assert.Equal(t, "'pid=%p,user=%u,db=%d,app=%a,client=%h '", *db.EngineConfig.PG.LogLinePrefix) - assert.Equal(t, 100, *db.EngineConfig.PG.LogMinDurationStatement) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogTempFiles) assert.Equal(t, 100, *db.EngineConfig.PG.MaxFilesPerProcess) assert.Equal(t, 100, *db.EngineConfig.PG.MaxLocksPerTransaction) assert.Equal(t, 32, *db.EngineConfig.PG.MaxLogicalReplicationWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkersPerGather) assert.Equal(t, 1000, *db.EngineConfig.PG.MaxPredLocksPerTransaction) - assert.Equal(t, 5000, *db.EngineConfig.PG.MaxPreparedTransactions) assert.Equal(t, 32, *db.EngineConfig.PG.MaxReplicationSlots) assert.Equal(t, int32(100), *db.EngineConfig.PG.MaxSlotWALKeepSize) assert.Equal(t, 3507152, *db.EngineConfig.PG.MaxStackDepth) @@ -123,9 +114,8 @@ func TestDatabasePostgreSQL_Update(t *testing.T) { Label: "example-db-updated", EngineConfig: &linodego.PostgresDatabaseEngineConfig{ PG: &linodego.PostgresDatabaseEngineConfigPG{ - AutovacuumFreezeMaxAge: linodego.Pointer(400000000), + AutovacuumMaxWorkers: linodego.Pointer(10), }, - ServiceLog: linodego.Pointer(false), }, } @@ -153,13 +143,10 @@ func TestDatabasePostgreSQL_Update(t *testing.T) { assert.Equal(t, true, *db.EngineConfig.PGStatMonitorEnable) assert.Equal(t, int64(1000), *db.EngineConfig.PGLookout.MaxFailoverReplicationTimeLag) - assert.Equal(t, false, *db.EngineConfig.ServiceLog) assert.Equal(t, 41.5, *db.EngineConfig.SharedBuffersPercentage) - assert.Equal(t, "off", *db.EngineConfig.SynchronousReplication) assert.Equal(t, 4, *db.EngineConfig.WorkMem) assert.Equal(t, 0.5, *db.EngineConfig.PG.AutovacuumAnalyzeScaleFactor) assert.Equal(t, int32(100), *db.EngineConfig.PG.AutovacuumAnalyzeThreshold) - assert.Equal(t, 400000000, *db.EngineConfig.PG.AutovacuumFreezeMaxAge) assert.Equal(t, 10, *db.EngineConfig.PG.AutovacuumMaxWorkers) assert.Equal(t, 100, *db.EngineConfig.PG.AutovacuumNaptime) assert.Equal(t, 50, *db.EngineConfig.PG.AutovacuumVacuumCostDelay) @@ -174,18 +161,12 @@ func TestDatabasePostgreSQL_Update(t *testing.T) { assert.Equal(t, "lz4", *db.EngineConfig.PG.DefaultToastCompression) assert.Equal(t, 100, *db.EngineConfig.PG.IdleInTransactionSessionTimeout) assert.Equal(t, true, *db.EngineConfig.PG.JIT) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogAutovacuumMinDuration) - assert.Equal(t, "DEFAULT", *db.EngineConfig.PG.LogErrorVerbosity) - assert.Equal(t, "'pid=%p,user=%u,db=%d,app=%a,client=%h '", *db.EngineConfig.PG.LogLinePrefix) - assert.Equal(t, 100, *db.EngineConfig.PG.LogMinDurationStatement) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogTempFiles) assert.Equal(t, 100, *db.EngineConfig.PG.MaxFilesPerProcess) assert.Equal(t, 100, *db.EngineConfig.PG.MaxLocksPerTransaction) assert.Equal(t, 32, *db.EngineConfig.PG.MaxLogicalReplicationWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkersPerGather) assert.Equal(t, 1000, *db.EngineConfig.PG.MaxPredLocksPerTransaction) - assert.Equal(t, 5000, *db.EngineConfig.PG.MaxPreparedTransactions) assert.Equal(t, 32, *db.EngineConfig.PG.MaxReplicationSlots) assert.Equal(t, int32(100), *db.EngineConfig.PG.MaxSlotWALKeepSize) assert.Equal(t, 3507152, *db.EngineConfig.PG.MaxStackDepth) @@ -224,9 +205,8 @@ func TestDatabasePostgreSQL_Create(t *testing.T) { Engine: "postgresql", EngineConfig: &linodego.PostgresDatabaseEngineConfig{ PG: &linodego.PostgresDatabaseEngineConfigPG{ - AutovacuumFreezeMaxAge: linodego.Pointer(400000000), + AutovacuumMaxWorkers: linodego.Pointer(10), }, - ServiceLog: linodego.Pointer(false), }, } @@ -254,13 +234,10 @@ func TestDatabasePostgreSQL_Create(t *testing.T) { assert.Equal(t, true, *db.EngineConfig.PGStatMonitorEnable) assert.Equal(t, int64(1000), *db.EngineConfig.PGLookout.MaxFailoverReplicationTimeLag) - assert.Equal(t, false, *db.EngineConfig.ServiceLog) assert.Equal(t, 41.5, *db.EngineConfig.SharedBuffersPercentage) - assert.Equal(t, "off", *db.EngineConfig.SynchronousReplication) assert.Equal(t, 4, *db.EngineConfig.WorkMem) assert.Equal(t, 0.5, *db.EngineConfig.PG.AutovacuumAnalyzeScaleFactor) assert.Equal(t, int32(100), *db.EngineConfig.PG.AutovacuumAnalyzeThreshold) - assert.Equal(t, 400000000, *db.EngineConfig.PG.AutovacuumFreezeMaxAge) assert.Equal(t, 10, *db.EngineConfig.PG.AutovacuumMaxWorkers) assert.Equal(t, 100, *db.EngineConfig.PG.AutovacuumNaptime) assert.Equal(t, 50, *db.EngineConfig.PG.AutovacuumVacuumCostDelay) @@ -275,18 +252,12 @@ func TestDatabasePostgreSQL_Create(t *testing.T) { assert.Equal(t, "lz4", *db.EngineConfig.PG.DefaultToastCompression) assert.Equal(t, 100, *db.EngineConfig.PG.IdleInTransactionSessionTimeout) assert.Equal(t, true, *db.EngineConfig.PG.JIT) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogAutovacuumMinDuration) - assert.Equal(t, "DEFAULT", *db.EngineConfig.PG.LogErrorVerbosity) - assert.Equal(t, "'pid=%p,user=%u,db=%d,app=%a,client=%h '", *db.EngineConfig.PG.LogLinePrefix) - assert.Equal(t, 100, *db.EngineConfig.PG.LogMinDurationStatement) - assert.Equal(t, int32(100), *db.EngineConfig.PG.LogTempFiles) assert.Equal(t, 100, *db.EngineConfig.PG.MaxFilesPerProcess) assert.Equal(t, 100, *db.EngineConfig.PG.MaxLocksPerTransaction) assert.Equal(t, 32, *db.EngineConfig.PG.MaxLogicalReplicationWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkers) assert.Equal(t, 64, *db.EngineConfig.PG.MaxParallelWorkersPerGather) assert.Equal(t, 1000, *db.EngineConfig.PG.MaxPredLocksPerTransaction) - assert.Equal(t, 5000, *db.EngineConfig.PG.MaxPreparedTransactions) assert.Equal(t, 32, *db.EngineConfig.PG.MaxReplicationSlots) assert.Equal(t, int32(100), *db.EngineConfig.PG.MaxSlotWALKeepSize) assert.Equal(t, 3507152, *db.EngineConfig.PG.MaxStackDepth) @@ -423,14 +394,6 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.AutovacuumAnalyzeThreshold.RequiresRestart) assert.Equal(t, "integer", config.PG.AutovacuumAnalyzeThreshold.Type) - assert.Equal(t, "Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted.", - config.PG.AutovacuumFreezeMaxAge.Description) - assert.Equal(t, 200000000, config.PG.AutovacuumFreezeMaxAge.Example) - assert.Equal(t, 1500000000, config.PG.AutovacuumFreezeMaxAge.Maximum) - assert.Equal(t, 200000000, config.PG.AutovacuumFreezeMaxAge.Minimum) - assert.True(t, config.PG.AutovacuumFreezeMaxAge.RequiresRestart) - assert.Equal(t, "integer", config.PG.AutovacuumFreezeMaxAge.Type) - assert.Equal(t, "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.", config.PG.AutovacuumMaxWorkers.Description) assert.Equal(t, 20, config.PG.AutovacuumMaxWorkers.Maximum) @@ -533,46 +496,6 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.JIT.RequiresRestart) assert.Equal(t, "boolean", config.PG.JIT.Type) - assert.Equal(t, "Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions.", - config.PG.LogAutovacuumMinDuration.Description) - assert.Equal(t, int32(2147483647), config.PG.LogAutovacuumMinDuration.Maximum) - assert.Equal(t, int32(-1), config.PG.LogAutovacuumMinDuration.Minimum) - assert.False(t, config.PG.LogAutovacuumMinDuration.RequiresRestart) - assert.Equal(t, "integer", config.PG.LogAutovacuumMinDuration.Type) - - assert.Equal(t, "Controls the amount of detail written in the server log for each message that is logged.", - config.PG.LogErrorVerbosity.Description) - assert.Equal(t, []string{"TERSE", "DEFAULT", "VERBOSE"}, - config.PG.LogErrorVerbosity.Enum) - assert.False(t, config.PG.LogErrorVerbosity.RequiresRestart) - assert.Equal(t, "string", config.PG.LogErrorVerbosity.Type) - - assert.Equal(t, "Choose from one of the available log formats.", - config.PG.LogLinePrefix.Description) - assert.Equal(t, []string{ - "'pid=%p,user=%u,db=%d,app=%a,client=%h '", - "'pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '", - "'%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '", - "'%m [%p] %q[user=%u,db=%d,app=%a] '", - }, - config.PG.LogLinePrefix.Enum) - assert.False(t, config.PG.LogLinePrefix.RequiresRestart) - assert.Equal(t, "string", config.PG.LogLinePrefix.Type) - - assert.Equal(t, "Log statements that take more than this number of milliseconds to run, -1 disables", - config.PG.LogMinDurationStatement.Description) - assert.Equal(t, 86400000, config.PG.LogMinDurationStatement.Maximum) - assert.Equal(t, -1, config.PG.LogMinDurationStatement.Minimum) - assert.False(t, config.PG.LogMinDurationStatement.RequiresRestart) - assert.Equal(t, "integer", config.PG.LogMinDurationStatement.Type) - - assert.Equal(t, "Log statements for each temporary file created larger than this number of kilobytes, -1 disables", - config.PG.LogTempFiles.Description) - assert.Equal(t, int32(2147483647), config.PG.LogTempFiles.Maximum) - assert.Equal(t, int32(-1), config.PG.LogTempFiles.Minimum) - assert.False(t, config.PG.LogTempFiles.RequiresRestart) - assert.Equal(t, "integer", config.PG.LogTempFiles.Type) - assert.Equal(t, "PostgreSQL maximum number of files that can be open per process", config.PG.MaxFilesPerProcess.Description) assert.Equal(t, 4096, config.PG.MaxFilesPerProcess.Maximum) @@ -615,13 +538,6 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PG.MaxPredLocksPerTransaction.RequiresRestart) assert.Equal(t, "integer", config.PG.MaxPredLocksPerTransaction.Type) - assert.Equal(t, "PostgreSQL maximum prepared transactions", - config.PG.MaxPreparedTransactions.Description) - assert.Equal(t, 10000, config.PG.MaxPreparedTransactions.Maximum) - assert.Equal(t, 0, config.PG.MaxPreparedTransactions.Minimum) - assert.False(t, config.PG.MaxPreparedTransactions.RequiresRestart) - assert.Equal(t, "integer", config.PG.MaxPreparedTransactions.Type) - assert.Equal(t, "PostgreSQL maximum replication slots", config.PG.MaxReplicationSlots.Description) assert.Equal(t, 64, config.PG.MaxReplicationSlots.Maximum) @@ -784,12 +700,6 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.PGLookout.PGLookoutMaxFailoverReplicationTimeLag.RequiresRestart) assert.Equal(t, "integer", config.PGLookout.PGLookoutMaxFailoverReplicationTimeLag.Type) - assert.Equal(t, "Store logs for the service so that they are available in the HTTP API and console.", - config.ServiceLog.Description) - assert.Equal(t, true, config.ServiceLog.Example) - assert.False(t, config.ServiceLog.RequiresRestart) - assert.Equal(t, []string{"boolean", "null"}, config.ServiceLog.Type) - assert.Equal(t, "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.", config.SharedBuffersPercentage.Description) assert.Equal(t, 41.5, config.SharedBuffersPercentage.Example) @@ -798,13 +708,6 @@ func TestDatabasePostgreSQLConfig_Get(t *testing.T) { assert.False(t, config.SharedBuffersPercentage.RequiresRestart) assert.Equal(t, "number", config.SharedBuffersPercentage.Type) - assert.Equal(t, "Synchronous replication type. Note that the service plan also needs to support synchronous replication.", - config.SynchronousReplication.Description) - assert.Equal(t, "off", config.SynchronousReplication.Example) - assert.Equal(t, []string{"quorum", "off"}, config.SynchronousReplication.Enum) - assert.False(t, config.SynchronousReplication.RequiresRestart) - assert.Equal(t, "string", config.SynchronousReplication.Type) - assert.Equal(t, "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).", config.WorkMem.Description) assert.Equal(t, 4, config.WorkMem.Example)