[PATCH] doc: Document the postgresql-config-file.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Miguel Ángel Arruga Vivas
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 25 Oct 2020 09:51
(address . guix-patches@gnu.org)
20201025085134.14378-1-mail@cbaines.net
* doc/guix.texi (PostgreSQL): Document the postgresql-config-file record.
---
doc/guix.texi | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index b5061877e2..726906c77d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18553,6 +18553,54 @@ required to add extensions provided by other packages.
@end table
@end deftp
+@deftp {Data Type} postgresql-config-file
+Data type representing the PostgreSQL configuration file. As shown in
+the following example, this can be used to customise the configuration
+of PostgreSQL. Note that you can use any G-expression or filename in
+place of this record, if you already have a configuration file you'd
+like to use for example.
+
+@lisp
+(service postgresql-service-type
+ (postgresql-configuration
+ (config-file
+ (postgresql-config-file
+ (log-destination "stderr")
+ (hba-file
+ (plain-file "pg_hba.conf"
+ "
+local all all trust
+host all all 127.0.0.1/32 md5
+host all all ::1/128 md5"))
+ (extra-config
+ '(("session_preload_libraries" "'auto_explain'")
+ ("random_page_cost" "2")
+ ("auto_explain.log_min_duration" "'100ms'")
+ ("work_mem" "'500MB'")
+ ("logging_collector" "on")
+ ("log_directory" "'/var/log/postgresql'")))))))
+@end lisp
+
+@table @asis
+@item @var{log-destination} (default: @code{"syslog"})
+The logging method to use for PostgreSQL. Multiple values are accepted,
+separated by commas.
+
+@item @var{hba-file} (default: @code{%default-postgres-hba})
+Filename or G-expression for the host-based authentication
+configuration.
+
+@item @var{ident-file} (default: @code{%default-postgres-ident})
+Filename or G-expression for the user name mapping configuration.
+
+@item @var{extra-config} (default: @code{'()})
+List of additional keys and values to include in the PostgreSQL config
+file. Each entry in the list should be a list where the first element
+is the key, and the remaining elements are the values.
+
+@end table
+@end deftp
+
@subsubheading MariaDB/MySQL
@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)]
--
2.28.0
M
M
Miguel Ángel Arruga Vivas wrote on 25 Oct 2020 11:21
(name . Christopher Baines)(address . mail@cbaines.net)(address . 44207@debbugs.gnu.org)
87eelm7gik.fsf@gmail.com
Hi!

Some comments inline.

Christopher Baines <mail@cbaines.net> writes:
Toggle quote (7 lines)
> +@deftp {Data Type} postgresql-config-file
> +Data type representing the PostgreSQL configuration file. As shown in
> +the following example, this can be used to customise the configuration
> +of PostgreSQL. Note that you can use any G-expression or filename in
> +place of this record, if you already have a configuration file you'd
> +like to use for example.

I'm pretty sure you should s/customise/customize/, as the manual is
written in US English. Also, I'd move the last sentence to the hba-file
description as an example there, something like: "Filename or
G-expression for the host-based authentication configuration. If you
already have a configuration file, you can use it here."

[...]
Toggle quote (1 lines)
> +@item @var{log-destination} (default: @code{"syslog"})
[...]
Toggle quote (1 lines)
> +@item @var{hba-file} (default: @code{%default-postgres-hba})
[...]
Toggle quote (1 lines)
> +@item @var{ident-file} (default: @code{%default-postgres-ident})
[...]
Toggle quote (2 lines)
> +@item @var{extra-config} (default: @code{'()})

These should be @code, not @var, because they represent symbols from the
configuration. The typical use of @var is for arguments---e.g.
@code{(call-something @var{param1} @var{param2})}---, whose names
don't have a meaning outside the actual implementation, but these
identifiers are symbols included in the API.

Apart from that, LGTM. :-)

Happy hacking!
Miguel
C
C
Christopher Baines wrote on 25 Oct 2020 12:06
(name . Miguel Ángel Arruga Vivas)(address . rosen644835@gmail.com)(address . 44207-done@debbugs.gnu.org)
87imaya7kj.fsf@cbaines.net
Miguel Ángel Arruga Vivas <rosen644835@gmail.com> writes:

Toggle quote (4 lines)
> Hi!
>
> Some comments inline.

Hey, thanks for the quick comments :)

Toggle quote (11 lines)
> Christopher Baines <mail@cbaines.net> writes:
>> +@deftp {Data Type} postgresql-config-file
>> +Data type representing the PostgreSQL configuration file. As shown in
>> +the following example, this can be used to customise the configuration
>> +of PostgreSQL. Note that you can use any G-expression or filename in
>> +place of this record, if you already have a configuration file you'd
>> +like to use for example.
>
> I'm pretty sure you should s/customise/customize/, as the manual is
> written in US English.

Indeed, old habits :)

Toggle quote (5 lines)
> Also, I'd move the last sentence to the hba-file description as an
> example there, something like: "Filename or G-expression for the
> host-based authentication configuration. If you already have a
> configuration file, you can use it here."

While the same is true for the hba-file, and ident-file bit, I wanted to
make this point for the postgresql-config-file record as a
whole. Hopefully that makes sense?

Toggle quote (15 lines)
> [...]
>> +@item @var{log-destination} (default: @code{"syslog"})
> [...]
>> +@item @var{hba-file} (default: @code{%default-postgres-hba})
> [...]
>> +@item @var{ident-file} (default: @code{%default-postgres-ident})
> [...]
>> +@item @var{extra-config} (default: @code{'()})
>
> These should be @code, not @var, because they represent symbols from the
> configuration. The typical use of @var is for arguments---e.g.
> @code{(call-something @var{param1} @var{param2})}---, whose names
> don't have a meaning outside the actual implementation, but these
> identifiers are symbols included in the API.

Ah, this is probably something I got wrong when documenting the
postgresql-configuration record, I wonder if I copied that from
somewhere else... anyway, I've fixed this now.

Toggle quote (2 lines)
> Apart from that, LGTM. :-)

Great, I've pushed now with the above changes.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+VXC1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfQqQ/+IaJelrvCq4fdm9X0KsBEkw0xq+zLauRh
taI3G3FYh0+QbdpmCX8JzpBhEAZ+8jgh3QvzvCNXAnh6xa13UnKWGoi0AT1UJgsZ
wK5GMcTQIDsP5O53TpCkWmM9bKeEea2xac6CB5qCTAkHecGt9fkV3Lnr9AxX9f/b
Sa0X3HKM4j6O/2AYDOkPBmQCR/IQCkXfAZoVt+SKypc13tNbWeRpP3HcwPR8YkuM
jJqxM4OE2uLjiMFGII0NxE6YMlLjIDut7pfTVTOgmPwUdFML4P70Lc0GAzzCX+ko
F5EhIxlCNl9pPxoiFZlq9r+4JGPgIpeHimsVAkFCwy3lxaMSH/x+lWZZXr6B+FaY
m5+k8JTmahwWXr52ZctecY/YDDM5pIYLZUXzzPxk4yaTugrsucCU6QrJxqLxuJqu
v+R+JTo+zvV32zeAGjoWcH3r+nZgBlDacGn51L5DOjJLbJmBWnT4pMW8WHdI2IHv
bB6S1APgRI7nAxfp7tw07jhSEOPTLOe+89XVh+UiLeZ+xs9xZ5r4DqZgGhXPoDX9
4Zq96ET/emCP3sX0a6JWc8n0virqJipxEmN7XB02KTV0dLkPf4/6CyyxljJwdqV4
5X0+3YrohEWNmAHQO81O7Qct/Hog9ZO9sD/VyOmA/pisgETu+aLI7VOq7hYnn9ey
vhQCdKsAWdQ=
=Og4a
-----END PGP SIGNATURE-----

Closed
?