pgtune is probably a good place to start:
https://github.com/gregs1104/pgtune ... available as an rpm/deb on the
more popular distros I believe.
Also, this is probably very premature, but I have a draft doc with
notes for how to tune your DB for PuppetDB:
https://docs.google.com/document/d/1hpFbh2q0WmxAvwfWRlurdaEF70fLc6oZtdktsCq2UFU/edit?usp=sharing
Use at your own risk, as it hasn't been completely vetted. Happy to
get any feedback on this, as I plan on making this part of our
endorsed documentation.
Also ... there is an index that lately has been causing people
problems 'idx_catalog_resources_tags_gin'. You might want to try
dropping it to see if it improves performances (thanks to Erik Dalen
and his colleagues for that one):
DROP INDEX idx_catalog_resources_tags_gin;
It is easily restored if it doesn't help ... but may take some time to build:
CREATE INDEX idx_catalog_resources_tags_gin
ON catalog_resources
USING gin
(tags COLLATE pg_catalog."default");
ken.