Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/db-copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ void db_copy_thread_t::thread_t::operator()()
// Let commits happen faster by delaying when they actually occur.
m_conn->exec("SET synchronous_commit = off");

// Do not show messages about invalid geometries (they are removed
// by the trigger).
m_conn->exec("SET client_min_messages = WARNING");

bool done = false;
while (!done) {
std::unique_ptr<db_cmd_t> item;
Expand Down
7 changes: 0 additions & 7 deletions src/flex-table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,13 @@ void table_connection_t::start(bool append)
{
assert(m_db_connection);

m_db_connection->exec("SET client_min_messages = WARNING");

if (!append) {
m_db_connection->exec("DROP TABLE IF EXISTS {} CASCADE",
table().full_name());
}

// These _tmp tables can be left behind if we run out of disk space.
m_db_connection->exec("DROP TABLE IF EXISTS {}", table().full_tmp_name());
m_db_connection->exec("RESET client_min_messages");

if (!append) {
m_db_connection->exec(table().build_sql_create_table(
Expand Down Expand Up @@ -314,10 +311,6 @@ void table_connection_t::stop(bool updateable, bool append)

log_info("Clustering table '{}' by geometry...", table().name());

// Notices about invalid geometries are expected and can be ignored
// because they say nothing about the validity of the geometry in OSM.
m_db_connection->exec("SET client_min_messages = WARNING");

m_db_connection->exec(table().build_sql_create_table(
flex_table_t::table_type::permanent, table().full_tmp_name()));

Expand Down
1 change: 0 additions & 1 deletion src/middle-pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ void middle_pgsql_t::start()
}
}
} else {
m_db_connection.exec("SET client_min_messages = WARNING");
for (auto const &table : m_tables) {
log_debug("Setting up table '{}'", table.name());
auto const qual_name = qualified_name(table.schema(), table.name());
Expand Down
1 change: 0 additions & 1 deletion src/output-flex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,6 @@ create_expire_tables(std::vector<expire_output_t> const &expire_outputs,
}

pg_conn_t const connection{conninfo};
connection.exec("SET client_min_messages = WARNING");
for (auto &expire_output : expire_outputs) {
if (!expire_output.table().empty()) {
expire_output.create_output_table(connection);
Expand Down
6 changes: 6 additions & 0 deletions src/pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ pg_conn_t::pg_conn_t(std::string const &conninfo)
log_sql("(C{}) New database connection (backend_pid={})",
m_connection_id, results.get(0, 0));
}

// PostgreSQL sends notices in many different contexts which aren't that
// useful for the user. So we disable them for all connections.
if (!get_logger().debug_enabled()) {
exec("SET client_min_messages = WARNING");
}
}

void pg_conn_t::close()
Expand Down
6 changes: 0 additions & 6 deletions src/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ void table_t::start(std::string const &conninfo, std::string const &table_space)

connect();
log_info("Setting up table '{}'", m_target->name);
m_sql_conn->exec("SET client_min_messages = WARNING");
auto const qual_name = qualified_name(m_target->schema, m_target->name);
auto const qual_tmp_name = qualified_name(
m_target->schema, m_target->name + "_tmp");
Expand All @@ -96,7 +95,6 @@ void table_t::start(std::string const &conninfo, std::string const &table_space)

// These _tmp tables can be left behind if we run out of disk space.
m_sql_conn->exec("DROP TABLE IF EXISTS {}", qual_tmp_name);
m_sql_conn->exec("RESET client_min_messages");

//making a new table
if (!m_append) {
Expand Down Expand Up @@ -197,10 +195,6 @@ void table_t::stop(bool updateable, bool enable_hstore_index,

log_info("Clustering table '{}' by geometry...", m_target->name);

// Notices about invalid geometries are expected and can be ignored
// because they say nothing about the validity of the geometry in OSM.
m_sql_conn->exec("SET client_min_messages = WARNING");

std::string sql = fmt::format("CREATE TABLE {} {} AS SELECT * FROM {}",
qual_tmp_name, m_table_space, qual_name);

Expand Down