unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 41786@debbugs.gnu.org
Subject: [bug#41786] [PATCH] doc: Explain how to use psql with peer authentication.
Date: Sun, 26 Jul 2020 12:18:53 +0200	[thread overview]
Message-ID: <878sf6mvea.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87blk3l8a7.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

Oleg Pykhalov <go.wigust@gmail.com> writes:

> Every ‘guix system reconfigure’ I see a message about
> “/var/lib/postgresql/ already exists, skipping creating” if I remember
> correctly.  Do you see this when you use a cluster?  

Yes.

> I don't have a strong opinion for this, but the message is enough, isn't
> it?  Maybe we could say in the documentation to remove data directory in
> any case when you don't need previous data?

I don't find the message explicit enough, in particular it does not
explain that the existing data could cause Postgres to fail.

Finally, it's easy to miss the message in this wall of text.

> I tried ‘sudo su postgres -s /bin/sh’, then:
> --8<---------------cut here---------------start------------->8---
> sh-5.0$ createuser --interface
> sh: createuser: command not found
> --8<---------------cut here---------------end--------------->8---
>
> First of all we could use just ‘sudo’ to get a shell:
>
>     sudo -u postgres -s /bin/sh

I thought I had tried this and it didn't work for whatever reason.  I'll
test again.

> ‘createuser’ and ‘createdb’ are in ‘/gnu/store/…-postgresql-10.13/bin’,
> which is missing in my ‘postgres’ user's profile.

Right, I have postgresql installed in my user profile.

> To fix this we could make ‘postgres’ available by default as in
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=db65d7447c3adc46e2b24abfc07ae10c6c537df4

I think you meant the postgresql package.  Indeed, that would fix it.
However this means we are "polluting" all user profiles with executables
that are not necessarily wanted by everyone.  Is this desirable?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-07-26 10:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  9:31 [bug#41786] [PATCH] doc: Explain how to use psql with peer authentication Pierre Neidhardt
2020-07-25 19:11 ` Oleg Pykhalov
2020-07-26 10:18   ` Pierre Neidhardt [this message]
2020-07-26 11:26     ` Oleg Pykhalov
2020-07-28 11:58       ` [bug#41786] [PATCH 1/2] services: postgresql: Provide postgresql commands Pierre Neidhardt
2020-07-28 11:58         ` [bug#41786] [PATCH 2/2] doc: Explain how to use psql with peer authentication Pierre Neidhardt
2020-07-28 18:02           ` Oleg Pykhalov
2020-08-01 10:03             ` Pierre Neidhardt
2020-07-28 11:59       ` [bug#41786] [PATCH] " Pierre Neidhardt

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=878sf6mvea.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=41786@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /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).