Fixes: #1915 Added insert_or_update