mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-08-12 12:00:50 +08:00
readme: moved Command-line arguments section before Logs
This commit is contained in:
@@ -19,8 +19,8 @@
|
|||||||
- [Setting up a replication cluster](#setting-up-a-replication-cluster)
|
- [Setting up a replication cluster](#setting-up-a-replication-cluster)
|
||||||
- [Creating a snapshot](#creating-a-snapshot)
|
- [Creating a snapshot](#creating-a-snapshot)
|
||||||
- [Creating a backup](#creating-a-backup)
|
- [Creating a backup](#creating-a-backup)
|
||||||
- [Logs](#logs)
|
|
||||||
- [Command-line arguments](#command-line-arguments)
|
- [Command-line arguments](#command-line-arguments)
|
||||||
|
- [Logs](#logs)
|
||||||
- [UID/GID mapping](#uid-gid-mapping)
|
- [UID/GID mapping](#uid-gid-mapping)
|
||||||
- [Maintenance](#maintenance)
|
- [Maintenance](#maintenance)
|
||||||
- [Upgrading](#upgrading)
|
- [Upgrading](#upgrading)
|
||||||
@@ -294,6 +294,17 @@ docker run --name postgresql-backup -it --rm \
|
|||||||
|
|
||||||
Once the backup is generated, the container will exit and the backup of the master data will be available at `/srv/docker/backups/postgresql.XXXXXXXXXXXX/`. Restoring the backup involves starting a container with the data in `/srv/docker/backups/postgresql.XXXXXXXXXXXX`.
|
Once the backup is generated, the container will exit and the backup of the master data will be available at `/srv/docker/backups/postgresql.XXXXXXXXXXXX/`. Restoring the backup involves starting a container with the data in `/srv/docker/backups/postgresql.XXXXXXXXXXXX`.
|
||||||
|
|
||||||
|
## Command-line arguments
|
||||||
|
|
||||||
|
You can customize the launch command of PostgreSQL server by specifying arguments for `postgres` on the `docker run` command. For example the following command enables connection logging:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --name postgresql -itd --restart always \
|
||||||
|
sameersbn/postgresql:9.4-8 -c log_connections=on
|
||||||
|
```
|
||||||
|
|
||||||
|
Please refer to the documentation of [postgres](http://www.postgresql.org/docs/9.4/static/app-postgres.html) for the complete list of available options.
|
||||||
|
|
||||||
## Logs
|
## Logs
|
||||||
|
|
||||||
By default the PostgreSQL server logs are sent to the standard output. Using the [Command-line arguments](#command-line-arguments) feature you can configure the PostgreSQL server to send the log output to a file using the `-c logging_collector=on` argument:
|
By default the PostgreSQL server logs are sent to the standard output. Using the [Command-line arguments](#command-line-arguments) feature you can configure the PostgreSQL server to send the log output to a file using the `-c logging_collector=on` argument:
|
||||||
@@ -309,17 +320,6 @@ To access the PostgreSQL logs you can use `docker exec`. For example:
|
|||||||
docker exec -it postgresql tail -f /var/log/postgresql/postgresql-9.4-main.log
|
docker exec -it postgresql tail -f /var/log/postgresql/postgresql-9.4-main.log
|
||||||
```
|
```
|
||||||
|
|
||||||
## Command-line arguments
|
|
||||||
|
|
||||||
You can customize the launch command of PostgreSQL server by specifying arguments for `postgres` on the `docker run` command. For example the following command enables connection logging:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --name postgresql -itd --restart always \
|
|
||||||
sameersbn/postgresql:9.4-8 -c log_connections=on
|
|
||||||
```
|
|
||||||
|
|
||||||
Please refer to the documentation of [postgres](http://www.postgresql.org/docs/9.4/static/app-postgres.html) for the complete list of available options.
|
|
||||||
|
|
||||||
# UID/GID mapping
|
# UID/GID mapping
|
||||||
|
|
||||||
The files and processes created by the container are owned by the `postgres` user that is internal to the container. In the absense of user namespace in docker the UID and GID of the containers `postgres` user may have different meaning on the host.
|
The files and processes created by the container are owned by the `postgres` user that is internal to the container. In the absense of user namespace in docker the UID and GID of the containers `postgres` user may have different meaning on the host.
|
||||||
|
|||||||
Reference in New Issue
Block a user