Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future?
От | Sven R. Kunze |
---|---|
Тема | Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future? |
Дата | |
Msg-id | f432ed1c-1db7-25db-2fd3-fec06dd4e051@mail.de обсуждение исходный текст |
Ответ на | [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in thefuture? (Thomas Güttler <guettliml@thomas-guettler.de>) |
Ответы |
Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future?
Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future? Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future? Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis,amqp, s3 in the future? |
Список | pgsql-general |
On 03.05.2017 12:57, Thomas Güttler wrote: > Am 02.05.2017 um 05:43 schrieb Jeff Janes: >> On Sun, Apr 30, 2017 at 4:37 AM, Thomas Güttler >> <guettliml@thomas-guettler.de <mailto:guettliml@thomas-guettler.de>> >> wrote: >> >> Is is possible that PostgreSQL will replace these building blocks >> in the future? >> >> - redis (Caching) >> >> >> PostgreSQL has its own caching. It might not be quite as effective >> as redis', but you can us it if you are willing to >> take those trade offs. > > What kind of caching does PG offer? > > I would use a table with a mtime-column and delete the content after N > days. After searching the web, it seems to me that PostgreSQL doesn't offer a cron-like background job for cleanup tasks. http://stackoverflow.com/questions/18187490/postgresql-delete-old-rows-on-a-rolling-basis But there's an extension - pg_cron: https://www.citusdata.com/blog/2016/09/09/pgcron-run-periodic-jobs-in-postgres/ > >> No. You can certainly use PostgreSQL to store blobs. But then, you >> need to store the PostgreSQL data **someplace**. >> If you don't store it in S3, you have to store it somewhere else. > > I don't understand what you mean here. AFAIK storing blobs in PG is > not recommended since it is not very efficient. Seems like several people here disagree with this conventional wisdom. I think what he was talking about the data itself. You have to store the bits and bytes somewhere (e.g. on S3). Sven
В списке pgsql-general по дате отправления: