Message ID | 20241115110352.14249-1-ngraves@ngraves.fr |
---|---|
State | New |
Headers | show |
Series | [bug#74058,v7,1/2] gnu: postgresql-configuration: Unset default postgresql. | expand |
Hello Nicolas. I had not tried previously and did not use postgres, but now I applied patch 1/2 to my local guix.git checkout and pull from it and `guix pull` gives an error in the default value of (define postgresql-service-type: $ gzip -cd /var/log/guix/drvs/hr/8iqk1a4pkchbayr4x4mlm7za2kwxyn-guix-system.drv.gz [ 7/ 50] loading..... 28.0% of 25 filesice-9/psyntax.scm:2824:12: In procedure syntax-violation: Syntax error: gnu/services/databases.scm:349:18: postgresql-configuration: missing field initializers (postgresql) in form (postgresql-configuration) Maybe the default value needs to be adapted; or maybe I am missing some prerequisite patch if pull works for you. Regards, Florian
On 2024-11-15 22:26, pelzflorian (Florian Pelz) wrote: > Hello Nicolas. I had not tried previously and did not use postgres, but > now I applied patch 1/2 to my local guix.git checkout and pull from it > and `guix pull` gives an error in the default value of > (define postgresql-service-type: > > > > $ gzip -cd /var/log/guix/drvs/hr/8iqk1a4pkchbayr4x4mlm7za2kwxyn-guix-system.drv.gz > [ 7/ 50] loading..... 28.0% of 25 filesice-9/psyntax.scm:2824:12: In procedure syntax-violation: > Syntax error: > gnu/services/databases.scm:349:18: postgresql-configuration: missing field initializers (postgresql) in form (postgresql-configuration) > > > Maybe the default value needs to be adapted; > or maybe I am missing some prerequisite patch if pull works for you. > > Regards, > Florian Thought I pulled properly, I'll retry. Thanks for pointing that out. > > >
diff --git a/doc/guix.texi b/doc/guix.texi index 2ab78d6237..ba4bd2cc79 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -26247,7 +26247,7 @@ Data type representing the configuration for the @code{postgresql-service-type}. @table @asis -@item @code{postgresql} (default: @code{postgresql}) +@item @code{postgresql} PostgreSQL package to use for the service. @item @code{port} (default: @code{5432}) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 0933eb5e79..001f96830e 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -167,8 +167,11 @@ (define contents (define-record-type* <postgresql-configuration> postgresql-configuration make-postgresql-configuration postgresql-configuration? - (postgresql postgresql-configuration-postgresql ;file-like - (default postgresql)) + ;; Setting no default ensures that the user sets its current postgresql + ;; explicitely. Since major upgrades currently require a manual migration + ;; of the database, this way the user is responsible for upgrading properly. + ;; MAYBE TODO: Write an action to automatically upgrade in Guix. + (postgresql postgresql-configuration-postgresql) ;file-like (port postgresql-configuration-port (default 5432)) (locale postgresql-configuration-locale @@ -346,7 +349,7 @@ (define postgresql-service-type (default-value (postgresql-configuration)) (description "Run the PostgreSQL database server."))) -(define-deprecated (postgresql-service #:key (postgresql postgresql) +(define-deprecated (postgresql-service #:key (postgresql postgresql-10) (port 5432) (locale "en_US.utf8") (config-file (postgresql-config-file))