Re: [pgsql-advocacy] Postgres replaces SQLite as well as it replacesOracle?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [pgsql-advocacy] Postgres replaces SQLite as well as it replacesOracle?
Дата
Msg-id 053e10a0-a22b-e5c0-3e85-4b72dae2d401@berkus.org
обсуждение исходный текст
Ответ на [pgsql-advocacy] Postgres replaces SQLite as well as it replaces Oracle?  (Joshua Kramer <joskra42.list@gmail.com>)
Ответы Re: [pgsql-advocacy] Postgres replaces SQLite as well as it replaces Oracle?
Список pgsql-advocacy
On 02/24/2017 05:12 PM, Joshua Kramer wrote:
> Hello,
>
> Has anyone done articles or advocacy for Postgres in embedded applications?
>
> I am fooling around with Home Assistant on a Raspberry Pi.  This is a
> Python 3 app that is normally backed by SQLite.  But it has issues
> because often times more than one process wants to write to the
> database, and SQLite doesn't do that well.  I found a handy guide on
> replacing SQLite with PG in this application:
>
> https://community.home-assistant.io/t/howto-postgresql-on-raspberry-pi-all-in-one-installer/5527/21
>
> Two things I noticed right off the bat.  The UI of HomeAssistant is
> MUCH faster using PG than it is using SQLite.  We're talking 5 seconds
> for a page refresh vs half a second.  Second, Postgres is tiny!  The
> whole stack- OS, Postgres, HASS server- takes up a whopping 67 MB of
> RAM.

You can probably get PostgreSQL even smaller if you're willing to
jettison some functionality.  Doesn't sound like you need to, though.
Presumably you've deleted all the databases but one?

We haven't really targeted the "embedded" use-case because, well,
SQLite.  However, when the smallest ARM card you can buy has 64MB of
RAM, the profile of "embedded" has changed considerably.  Back in the
early days of PG, some of our earliest use cases were "embedded": TiVO,
vehicle onboard systems, voicemail systems, etc.  It's probably still
being used for this, but we don't hear about it much.

> It'll be interesting to see how these stats change as I leave the
> thing running for months on end.

Poll the size of the various system catalogs as you go; you may discover
that keeping it small is mostly a matter of aggressively vacuuming them.

Thanks so much for the story!

--
Josh Berkus
Containers & Databases Oh My!


В списке pgsql-advocacy по дате отправления:

Предыдущее
От: Darren Duncan
Дата:
Сообщение: Re: [pgsql-advocacy] Postgres replaces SQLite as well as it replacesOracle?
Следующее
От: Joshua Kramer
Дата:
Сообщение: Re: [pgsql-advocacy] Postgres replaces SQLite as well as it replaces Oracle?