When a post is edited and the tags are not edited (optional), then simply save the post and do nothing. Why? Cause, in the posts, tags and posts_tags table you have an autoincrement column that is your primary key. This numeric column is then the foreign key in the respective tables i.e. the tables will look like the following:
posts: id_post(PK), post_title, post_content
Tags: id_tag(PK), tag_name
posts_tags: id_post_tag(PK), id_post(FK), id_tag(FK)
PK: Primary Key
FK: Foreign Key
Once you save the data in this format, you will find no need to update any dependent table as the textual data is no more used to maintain database schema and relationships. This also hastens transaction times as the database is not busy in any cascade job as Bono implied.
Then run a simple loop for all the tags in the post to check their existence against the id_post in the post_tags table and if not found then insert it. While doing this loop build a string that you will use below:
Next, run the following query:
delete from post_tags where id_post = {$id_post} and id_tag not in {$list_id_tags}
This operation minimizes database server overload by minimizing IO operations which are caused by rows being added and deleted. Your case of deleting all post_tags and then inserting all tags again would have generated large IO while this method minimizes that.