services: databases: Don't specify a default postgresql version.
Currently, if the postgresql package major version changes, this is going to break the service upon upgrade, because PostgreSQL will reject the data files from the differing major version of the service. Because it's important to either keep running a particular major version, or intentionally upgrade, I think the configuration would be better with no default. I think this is also going to be helpful when trying to assist users upgrading PostgreSQL. * gnu/services/databases.scm (<postgresql-configuration>): Remove default for postgresql. (postgresql-service-type): Remove the default value. * gnu/tests/databases.scm (%postgresql-os): Update accordingly. * gnu/tests/guix.scm (%guix-data-service-os): Update accordingly. * gnu/tests/monitoring.scm (%zabbix-os): Update accordingly. * gnu/tests/web.scm (patchwork-os): Update accordingly. * doc/guix.texi (PostgreSQL): Update accordingly.master
parent
21b712acc7
commit
bdcf4d88d5
|
@ -18457,7 +18457,9 @@ The following example describes a PostgreSQL service with the default
|
||||||
configuration.
|
configuration.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(service postgresql-service-type)
|
(service postgresql-service-type
|
||||||
|
(postgresql-configuration
|
||||||
|
(postgresql postgresql-10)))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
If the services fails to start, it may be due to an incompatible
|
If the services fails to start, it may be due to an incompatible
|
||||||
|
@ -18483,7 +18485,7 @@ Data type representing the configuration for the
|
||||||
@code{postgresql-service-type}.
|
@code{postgresql-service-type}.
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
@item @var{postgresql} (default: @code{postgresql})
|
@item @var{postgresql}
|
||||||
PostgreSQL package to use for the service.
|
PostgreSQL package to use for the service.
|
||||||
|
|
||||||
@item @var{port} (default: @code{5432})
|
@item @var{port} (default: @code{5432})
|
||||||
|
|
|
@ -147,8 +147,7 @@ host all all ::1/128 md5"))
|
||||||
(define-record-type* <postgresql-configuration>
|
(define-record-type* <postgresql-configuration>
|
||||||
postgresql-configuration make-postgresql-configuration
|
postgresql-configuration make-postgresql-configuration
|
||||||
postgresql-configuration?
|
postgresql-configuration?
|
||||||
(postgresql postgresql-configuration-postgresql ;<package>
|
(postgresql postgresql-configuration-postgresql) ;<package>
|
||||||
(default postgresql))
|
|
||||||
(port postgresql-configuration-port
|
(port postgresql-configuration-port
|
||||||
(default 5432))
|
(default 5432))
|
||||||
(locale postgresql-configuration-locale
|
(locale postgresql-configuration-locale
|
||||||
|
@ -279,8 +278,7 @@ host all all ::1/128 md5"))
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
(const %postgresql-accounts))
|
(const %postgresql-accounts))
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
(compose list postgresql-configuration-postgresql))))
|
(compose list postgresql-configuration-postgresql))))))
|
||||||
(default-value (postgresql-configuration))))
|
|
||||||
|
|
||||||
(define-deprecated (postgresql-service #:key (postgresql postgresql)
|
(define-deprecated (postgresql-service #:key (postgresql postgresql)
|
||||||
(port 5432)
|
(port 5432)
|
||||||
|
|
|
@ -215,7 +215,9 @@
|
||||||
|
|
||||||
(define %postgresql-os
|
(define %postgresql-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(service postgresql-service-type)))
|
(service postgresql-service-type
|
||||||
|
(postgresql-configuration
|
||||||
|
(postgresql postgresql-10)))))
|
||||||
|
|
||||||
(define (run-postgresql-test)
|
(define (run-postgresql-test)
|
||||||
"Run tests in %POSTGRESQL-OS."
|
"Run tests in %POSTGRESQL-OS."
|
||||||
|
|
|
@ -156,6 +156,7 @@
|
||||||
(service dhcp-client-service-type)
|
(service dhcp-client-service-type)
|
||||||
(service postgresql-service-type
|
(service postgresql-service-type
|
||||||
(postgresql-configuration
|
(postgresql-configuration
|
||||||
|
(postgresql postgresql-10)
|
||||||
(config-file
|
(config-file
|
||||||
(postgresql-config-file
|
(postgresql-config-file
|
||||||
(hba-file
|
(hba-file
|
||||||
|
|
|
@ -307,7 +307,9 @@ zabbix||{}
|
||||||
(let ((base-os
|
(let ((base-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(service dhcp-client-service-type)
|
(service dhcp-client-service-type)
|
||||||
(service postgresql-service-type)
|
(service postgresql-service-type
|
||||||
|
(postgresql-configuration
|
||||||
|
(postgresql postgresql-10)))
|
||||||
(service zabbix-front-end-service-type
|
(service zabbix-front-end-service-type
|
||||||
(zabbix-front-end-configuration
|
(zabbix-front-end-configuration
|
||||||
(db-password "zabbix")))
|
(db-password "zabbix")))
|
||||||
|
|
|
@ -567,7 +567,9 @@ HTTP-PORT."
|
||||||
(config
|
(config
|
||||||
(httpd-config-file
|
(httpd-config-file
|
||||||
(listen '("8080"))))))
|
(listen '("8080"))))))
|
||||||
(service postgresql-service-type)
|
(service postgresql-service-type
|
||||||
|
(postgresql-configuration
|
||||||
|
(postgresql postgresql-10)))
|
||||||
(service patchwork-service-type
|
(service patchwork-service-type
|
||||||
(patchwork-configuration
|
(patchwork-configuration
|
||||||
(patchwork patchwork)
|
(patchwork patchwork)
|
||||||
|
|
Reference in New Issue