Skip to content

Commit 92a6215

Browse files
authored
Add documentation for missing replication script parameters
Reading the help output and the sources of https://github.com/osm2pgsql-dev/osm2pgsql/blob/6d964b7d08bc17ac2240237f00c80a81f8b87708/scripts/osm2pgsql-replication#L485, I missed a few replication script parameters in the documentation. I added documentation for: - `--once` - `--post-processing` - `--diff-file`
1 parent 28b7234 commit 92a6215

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

_manual-v2/A-preparing-input-data.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The `-d` parameter tells the replication script which database to connect
103103
to. The script also supports all other parameters mentioned in the section
104104
[database connection](#database-connection) including
105105
[libpq environment variables](https://www.postgresql.org/docs/current/libpq-envars.html).
106-
The only exception is the '-W' parameter for interactive password prompts.
106+
The only exception is the `-W` parameter for interactive password prompts.
107107
When you need to supply a password, always use a
108108
[pgpass file](https://www.postgresql.org/docs/current/libpq-pgpass.html).
109109

@@ -115,7 +115,8 @@ the replication information.
115115
By default the update server and interval will be set from the file headers,
116116
for planet dumps minutely updates from the OSM main servers will be used. If
117117
you want to use a different replication service, use the `--server`
118-
parameter.
118+
parameter. You can also use `--osm-file <osm-file>` to retrieve the update
119+
server from a data file.
119120

120121
It is safe to repeat initialisation at any time. For example, when you want
121122
to change the replication service, simply run the init command again with a
@@ -132,15 +133,21 @@ and calls osm2pgsql with the given parameters to apply the changes. Note that
132133
osm2pgsql-replication makes sure to only fetch a limited amount of data at the
133134
time to make sure that it does not use up too much RAM. If more data is
134135
available it will repeat the download and call of osm2pgsql until the database
135-
is up to date. You can change the amount of data downloaded at once with
136-
`--max-diff-size`, the default is 500MB.
136+
is up to date (unless the option `--once` is used). You can change the amount
137+
of data downloaded per at once with `--max-diff-size`, the default is 500MB.
137138

138139
Sometimes you need to run additional commands after osm2pgsql has updated the
139140
database, for example, when you use the expiry function. You can use the
140141
option `--post-processing` to give osm2pgsql-replication a script it is
141142
supposed to run after each call to osm2pgsql. Note that if the script fails,
142143
then the entire update process is considered a failure and aborted.
143144

145+
You can use the option `--diff-file <file>` to specify a file where osm2pgsql-replication
146+
will save the changes before they are applied to the database.
147+
148+
After the update has finished, osm2pgsql-replication can run a script specified
149+
by the option `--post-processing <script>`.
150+
144151
##### Putting it all together with systemd
145152

146153
osm2pgsql-replication works well as a systemd service that keeps your database

0 commit comments

Comments
 (0)