Skip to content

Commit ed692a4

Browse files
authored
Merge pull request #942 from openstreetmap/remove-unlogged
Remove unlogged
2 parents ea23dc9 + f4c7dfb commit ed692a4

File tree

6 files changed

+8
-25
lines changed

6 files changed

+8
-25
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ matrix:
5555
include:
5656
# ---- Linux + CLANG ---------------------------
5757
- os: linux
58+
dist: trusty
5859
compiler: "clang-3.8"
5960
env: T="clang38_pg92_dbtest" LUAJIT_OPTION="OFF"
6061
CXXFLAGS="-pedantic -Wextra -Werror"
6162
CC=clang-3.8 CXX=clang++-3.8
6263
addons: *clang38_pg92
6364

6465
- os: linux
66+
dist: trusty
6567
compiler: "clang-7"
6668
env: T="clang7_pg96_dbtest_luajit" LUAJIT_OPTION="ON"
6769
CXXFLAGS="-pedantic -Wextra -Werror"
@@ -82,13 +84,15 @@ matrix:
8284

8385
# ---- Linux + GCC ---------------------------
8486
- os: linux
87+
dist: trusty
8588
compiler: "gcc-4.8"
8689
env: T="gcc48_pg96_dbtest" LUAJIT_OPTION="OFF"
8790
CXXFLAGS="-pedantic -Wextra -Werror"
8891
CC=gcc-4.8 CXX=g++-4.8
8992
addons: *gcc48_pg96
9093

9194
- os: linux
95+
dist: trusty
9296
compiler: gcc-8
9397
env: T="gcc8_pg96_dbtest_luajit" LUAJIT_OPTION="ON"
9498
CXXFLAGS="-pedantic -Wextra -Werror"

docs/osm2pgsql.1

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ invalid polygons. With this option, invalid polygons are instead simply dropped
200200
from the database. Even without this option, all polygons in the database should
201201
be valid.
202202
.TP
203-
\fB\ \fR\-\-unlogged
204-
Use postgresql's unlogged tables for storing data. This requires PostgreSQL 9.1
205-
or above. Data written to unlogged tables is not written to PostgreSQL's write\-ahead log,
206-
which makes them considerably faster than ordinary tables. However, they are not
207-
crash\-safe: an unlogged table is automatically truncated after a crash or unclean shutdown.
208-
.TP
209203
\fB\ \fR\-\-number\-processes num
210204
Specifies the number of parallel processes used for certain operations. If disks are
211205
fast enough e.g. if you have an SSD, then this can greatly increase speed of

docs/usage.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Command-line usage #
22

3-
Osm2pgsql has one program, the executable itself, which has **44** command line
3+
Osm2pgsql has one program, the executable itself, which has **43** command line
44
options. A full list of options can be obtained with ``osm2pgsql -h -v``. This
55
document provides an overview of options, and more importantly, why you might
66
use them.
@@ -59,9 +59,6 @@ offers significant space savings and speed increases, particularly on
5959
mechanical drives. The file takes approximately 8 bytes * maximum node ID, or
6060
about 23 GiB, regardless of the size of the extract.
6161

62-
``--unlogged`` specifies to use unlogged tables which are dropped from the
63-
database if the database server ever crashes, but are faster to import.
64-
6562
``--prefix`` specifies the prefix for tables
6663

6764
## Middle-layer options ##

middle-pgsql.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ using namespace std;
4141
* %p replaced by the content of the "prefix" option
4242
* %i replaced by the content of the "tblsslim_data" option
4343
* %t replaced by the content of the "tblssslim_index" option
44-
* %m replaced by "UNLOGGED" if the "unlogged" option is set
44+
* %m replaced by "UNLOGGED" if the "droptemp" option is set
4545
* other occurrences of the "%" char are treated normally.
4646
* any occurrence of { or } will be ignored (not copied to output string);
4747
* anything inside {} is only copied if it contained at least one of
@@ -105,7 +105,7 @@ static void set_prefix_and_tbls(options_t const *options, std::string *string)
105105
source += 2;
106106
continue;
107107
} else if (*(source + 1) == 'm') {
108-
if (options->unlogged) {
108+
if (options->droptemp) {
109109
strcpy(dest, "UNLOGGED");
110110
dest += 8;
111111
copied = true;

options.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ namespace
7373
{"cache-strategy", 1, 0, 204},
7474
{"number-processes", 1, 0, 205},
7575
{"drop", 0, 0, 206},
76-
{"unlogged", 0, 0, 207},
7776
{"flat-nodes",1,0, 'F'},
7877
{"tag-transform-script",1,0,212},
7978
{"reproject-area",0,0,213},
@@ -157,8 +156,6 @@ namespace
157156
--number-processes Specifies the number of parallel processes \n\
158157
used for certain operations (default is 1).\n\
159158
-I|--disable-parallel-indexing Disable indexing all tables concurrently.\n\
160-
--unlogged Use unlogged tables (lost on crash but faster). \n\
161-
Requires PostgreSQL 9.1.\n\
162159
--cache-strategy Specifies the method used to cache nodes in ram.\n\
163160
Available options are:\n\
164161
dense: caching strategy optimised for full planet import\n\
@@ -293,7 +290,7 @@ options_t::options_t()
293290
#else
294291
alloc_chunkwise(ALLOC_SPARSE),
295292
#endif
296-
droptemp(false), unlogged(false), hstore_match_only(false),
293+
droptemp(false), hstore_match_only(false),
297294
flat_node_cache_enabled(false), reproject_area(false),
298295
flat_node_file(boost::none), tag_transform_script(boost::none),
299296
tag_transform_node_func(boost::none), tag_transform_way_func(boost::none),
@@ -491,9 +488,6 @@ options_t::options_t(int argc, char *argv[]): options_t()
491488
case 206:
492489
droptemp = true;
493490
break;
494-
case 207:
495-
unlogged = true;
496-
break;
497491
case 'F':
498492
flat_node_cache_enabled = true;
499493
flat_node_file = optarg;
@@ -571,11 +565,6 @@ void options_t::check_options()
571565
throw std::runtime_error("--drop only makes sense with --slim.\n");
572566
}
573567

574-
if (unlogged && append) {
575-
fprintf(stderr, "Warning: --unlogged only makes sense with --create; ignored.\n");
576-
unlogged = false;
577-
}
578-
579568
if (hstore_mode == HSTORE_NONE && hstore_columns.size() == 0 && hstore_match_only) {
580569
fprintf(stderr, "Warning: --hstore-match-only only makes sense with --hstore, --hstore-all, or --hstore-column; ignored.\n");
581570
hstore_match_only = false;

options.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ struct options_t {
6969
int alloc_chunkwise;
7070
int num_procs;
7171
bool droptemp; ///< drop slim mode temp tables after act
72-
bool unlogged; ///< use unlogged tables where possible
7372
bool hstore_match_only; ///< only copy rows that match an explicitly listed key
7473
bool flat_node_cache_enabled;
7574
bool reproject_area;

0 commit comments

Comments
 (0)