I have a table address. This table is constantly getting new row inserts, appox 1 row per second. Lets called it process1.
In parallel, I need to iterate over SELECT * from address results inserted till now via process1. This is Process2. It should wait for Process1 to insert new rows if it reaches the end, ie, there are no more rows to process (iterate) in address.
Both Process1 and 2 are very long. Several hours or maybe days.
How should process2 look like in python?
Add a TIMESTAMP column and select rows with a newer timestamp than the latest processed.