ERROR: type “hstore” does not exist

I was getting this error though I issued CREATE EXTENSION hstore;. When I used \dx+ in psql to see installed extensions, I found out that extensions are installed into schemas instead of being installed globally in the database. So the reason I got this error was that the schema in which I installed hstore was not on my search path. If you have a database with more than one schema and you want to use hstore extension, you can either put on search path the schema in which you installed hstore or you can reference hstore using schema in your SQL statements.

SET search_path = primary_schema, schema_with_hstore;

or

CREATE TABLE test (col1 schema_with_hstore.hstore);

Tags:

PostgreSQL Unix Socket vs TCP/IP Performance

I just finish a test that compares PostgreSQL speed using Unix socket and TCP/IP connection to localhost with SSL enabled. The test was performed on import on OpenStreetMap PBF file (around 17GB of binary data). The result is that loading the data via TCP/IP connection with SSL enabled was about 17% slower than loading data via Unix socket.

Unix socket:
Processing: Node(1542670k 261.2k/s) Way(146203k 26.07k/s) Relation(1518310 44.75/s)  parse time: 45446s

TCP/IP:
Processing: Node(1542670k 257.1k/s) Way(146203k 18.02k/s) Relation(1518310 38.92/s)  parse time: 53122s

Tags: ,

Configuring GNU Screen Status Bar

With default GNU Screen configuration in Gentoo (I have no experience with other Linux distributions) you get no visible user interface for the tool. To get a status bar that displays host name, list of screen windows with some usability information, system load and current date and time, you can put following line in file ~/.screenrc:

hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'

You can find more information about status configuration in GNU Screen Manual.

Tags:

Running your own OpenStreetMap maps (and more)

This post collects useful links when you want to use OpenStreetMap (OSM), being it using the maps, data services or running your OSM own server. There is a lot of OSM documentation on the net which is both good and bad. Some of the documentation is already obsolete so finding the right documentation might be challenging.

General Links:

Links for using OSM:

Contributing to OSM:

Interesting Android applications:

Tags: