powa-team / powa-collector

PoWA Collector daemon for remote snapshot
http://powa.readthedocs.io/
PostgreSQL License
7 stars 4 forks source link

Info required on powa collector/archivist - retention #8

Closed gowtham500 closed 3 years ago

gowtham500 commented 3 years ago

Hello team,

Versions - Remote server

powa-4.1.2 PostgreSQL 12

Versions - Central Repository

powa-4.1.2 powa-collector powa-collector.py version 1.1.1 PostgreSQL 13

Environment:

  1. powa extension is installed on both remote and repository server.
  2. powa-collector runs on the repository server. It collects data from each remote server and stores in repository server.

Requirement

Store less on each remote server and store more on repository server

Questions

  1. Whats the difference between powa tables and functions in remote and repository server. Looks like we have the same set of tables on both. So does the collector scraping from remote makes the difference ?
  2. Should we set powa.retention duration less on each remote servers - ex: 1 day and then on repository - ex: 30 days.
  3. The idea here is to - not store data on each remote server. So if we set retention as mentioned in point 4 - will we meet the requirement ?
rjuju commented 3 years ago

Well, actually your point 3. should be the intended state. The tables on the remote servers should all be empty if you're using the remote mode, the tables are always created because it's the same extension being used for repository server, remote server or local mode.

If you have snapshot performed on the remote servers (and thus data in the powa tables), that's probably because you added powa in shared_preload_libraries on the remote server(s) and didn't deactivate local collection (setting powa_frequency = -1) on the remote server(s).

For the record, you don't need to have powa in shared_preload_libraries anymore since powa 4 if you're using the remote mode.

gowtham500 commented 3 years ago

Got it. Thanks for quick reply and very clear explanation.