unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 68747@debbugs.gnu.org
Subject: bug#68747: Extending postgresql-role-service-type as shown in manual leads to crash
Date: Fri, 26 Jan 2024 21:14:39 -0500	[thread overview]
Message-ID: <87a5or1q0g.fsf@gmail.com> (raw)

Hi,

We have this example in the manual, in (info "(guix) Database
Services"):

--8<---------------cut here---------------start------------->8---
          (service-extension postgresql-role-service-type
                             (const (postgresql-role
                                     (name "alice")
                                     (create-database? #t))))
--8<---------------cut here---------------end--------------->8---

Unfortunately, it doesn't seem to work as intended.  Adding the
following to my configuration:

--8<---------------cut here---------------start------------->8---
      (service postgresql-service-type)
      (service postgresql-role-service-type
                      (postgresql-role-configuration
                       (roles
                        (list (postgresql-role
                               (name "maxim")
                               (create-database? #t))))))
      (service-extension postgresql-role-service-type
                             (const (postgresql-role
                                     (name "cuirass")
                                     (create-database? #t))))
--8<---------------cut here---------------end--------------->8---

I get the following error upon reconfiguration:

--8<---------------cut here---------------start------------->8---
Backtrace:
          18 (primitive-load "/home/maxim/.config/guix/current/bin/g…")
In guix/ui.scm:
   2324:7 17 (run-guix . _)
  2287:10 16 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 15 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
    859:3 14 (_)
    839:4 13 (call-with-status-report _ _)
In guix/scripts/system.scm:
   1305:4 12 (_)
In ice-9/boot-9.scm:
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   661:37 10 (thunk)
   1300:8  9 (call-with-build-handler #<procedure 7f446c6d5c90 at g…> …)
  2180:25  8 (run-with-store #<store-connection 256.99 7f44768a8a00> …)
In guix/scripts/system.scm:
    847:2  7 (_ _)
    721:8  6 (_ #<store-connection 256.99 7f44768a8a00>)
In gnu/system.scm:
  1295:19  5 (operating-system-derivation _)
In gnu/services.scm:
   1166:6  4 (instantiate-missing-services _)
In srfi/srfi-1.scm:
   460:18  3 (fold #<procedure 7f446a968960 at gnu/services.scm:116…> …)
In gnu/services.scm:
  1167:27  2 (_ #<<service-extension> target: #<service-type postgr…> …)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure service-kind: Wrong type argument: #<<service-extension> target: #<service-type postgresql-role 7f4471875640> compute: #<procedure 7f446afc63a0 at ice-9/boot-9.scm:809:2 _>>
--8<---------------cut here---------------end--------------->8---

-- 
Thanks,
Maxim




             reply	other threads:[~2024-01-27  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27  2:14 Maxim Cournoyer [this message]
2024-01-30 22:18 ` bug#68747: Extending postgresql-role-service-type as shown in manual leads to crash Josselin Poiret via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5or1q0g.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=68747@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).