4 ms·
> Are these usually used for monitoring (like a read-only api)? Yes. > I guess I'm asking if you can take postgres and "turn it inside out" by cherry-picking
by anarazel 6y ago
> Are these usually used for monitoring (like a read-only api)?
Yes.
> I guess I'm asking if you can take postgres and "turn it inside out" by cherry-picking parts of it to build other storage software with it.
Unfortunately many subsystems of postgres are too
interdependent to easily be used independently. Including the WAL.
Part of that is historical / unintentional. But there's also plenty places where generalizing subsystems would make the whole slower and/or more complicated.
There definitely are bits that I'd like to have used outside of postgres many times. If you have to write C, something like postgres' memory context API makes it so much more convenient (and often more performant too!).
- aargh_aargh 6y agoAbout pg's memory context API: https://www.postgresql.org/docs/current/spi-memory.html https://www.postgresql.org/docs/current/spi-memory.html https://web.archive.org/web/20200224083655/https://blog.pgaddict.com/posts/introduction-to-memory-contexts https://web.archive.org/web/20200224083655/https://blog.pgad...
- anarazel 6y agoShould have dug out the link earlier... The relevant README is https://github.com/postgres/postgres/blob/master/src/backend/utils/mmgr/README https://github.com/postgres/postgres/blob/master/src/backend...