sql - Copying table records after a specific file interval in Postgresql -


i have table records want copy db on remote server after specific interval of time. number of records in table high(in range of millions) , columns can range 40-50.

i thought using pg_dump after time-interval sounds inefficient whole table dumped again , again.

assume time interval 4 hours , life-cycle of db start @ 10:00.

no. of records @ 10:00 - 0

no. of records @ 14:00 - n

no. of records @ 18:00 - n+m

no. of records @ 22:00 - n+m+l

the script(shell) want write should select 0 rows @ 10:00, n rows @ 14:00, m rows @ 18:00, l rows @ 22:00.

is there other way through copy rows have been added between time intervals in order remove redundant rows come if take pg_dump every 4 hours?


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -