Skip to content

Commit 9fa1061

Browse files
committed
remove --unlogged option
This had only an effect on slim tables. Instead of explicitly setting the options, simply always make them unlogged when --drop is given. Fixes #940.
1 parent ea23dc9 commit 9fa1061

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

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)