I have a program that reads a txt file (is beeing writen every second) and prepare some data to do and insert into a postgres/mysql database. This program is running as a daemon and reads this file every 5 seconds. The reading and the insert part are working just fine !
My problem is:
How should I know which lines I have to insert (to do not insert duplicate rows) ?
If there is a way to control this using memory and the prog stops, how to make the program return to the point that it has stopped and just insert new rows ?
Cany anyone help ?
Thanks in advance,