I'm using postgresql. I have to call a jar file that does some operations after db read, within a php script.
$connection is a PDO. I have noticed the following behavoiurs:
Scenario 1:
$connection->commit();
exec_shell(java -jar jarname) //it does not give expected behaviour
Scenario 2:
$connection->commit();
sleep(60);
exec_shell(java -jar jarname) //it does give expected behaviour
So, the question is: how to wait until commit writes all data to disk before going on with instructions?
fsync is on in postgres.conf synchronous_commit is on in postgres.conf