[Tile-serving] osm2pgsql DB keeps corrupting on power loss
Christian Quest
cquest at openstreetmap.fr
Wed Jul 31 22:35:13 UTC 2019
Check if you have used the "--unlogged" option in osm2pgsql during your
first import.
"--unlogged Use PostgreSQL's unlogged tables for storing data. This
requires PostgreSQL 9.1 or above. Data written to unlogged tables is not
written to PostgreSQL's write-ahead log, which makes them considerably
faster than ordinary tables. However, they are not crash-safe: an unlogged
table is automatically truncated after a crash or unclean shutdown."
In case of db crash recovery postgres truncates these tables as no log
journal has been kept for them allowing to make sure everything is fine.
This option should really be avoided in production and be used only for a
fast (and dirty) import.
Le mer. 31 juil. 2019 à 22:40, Stephen D <junkmail at scd31.com> a écrit :
> Hi,
>
> I've been running a tileserver for about a month. It's running on
> Postgres, and it's the full planet database. I've had 2 power failures,
> and after both of them the database entered a very weird state. The hard
> drive shows as suddenly having a bunch of free space, and some of the
> tables drop from dozens/hundreds of GB to just a few KB/MB. I have fsync
> on so I'm not sure why this is happening. Any ideas?
>
> Thanks!
>
>
> _______________________________________________
> Tile-serving mailing list
> Tile-serving at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tile-serving
>
--
Christian Quest - OpenStreetMap France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20190801/e30bbb92/attachment.html>
More information about the Tile-serving
mailing list