I have two programs running. One process does an insert. After the
insert a message is sent to a message bus. Then the second process
responds to the message by inserting a new row that depends on the
primary key of the first insert.
Some times I get an integrity error from the second process. I then
wait and try again with success.
When my first insert returns what does this mean? Does it mean that
the DB has accepted the request and will do it soon? Or does it mean
that the DB has accepted the request and it will now be available?
It seems like the answer is the former.