בעיות בעדכון מ-3.0.0 ל-3.0.1

Update: the best take away from your topic @merefield was

I guess I should be brave

:smiley:
Fiddling in a DB is always scary for me but in this case it worked.

For anyone with the same issue (duplicated tags / index_tags_on_name):

  1. crack your fingers and start Inception Phase 1:
    cd /var/discourse
    sudo ./launcher enter app

    If this fails because you get something like “no docker container running” or so type
    sudo docker ps -a --no-trunc
    This will list your available docker container and the ID. With that restart the container.
    sudo docker restart <container ID>
    Then sudo ./launcher enter app should work.

  2. access your postgres DB and start Inception Phase 2:
    su discourse
    psql
    The rebuild error log should have given you the culprit tag name. In my case it was

     ERROR:  duplicate key value violates unique constraint "index_tags_on_name"
    2023-01-27 07:46:45.663 UTC [584] discourse@discourse DETAIL:  Key (name)=(hws-connect) already exists.
    

    So first search for your tag with

    select * from tags where name='hws-connect'; 
    

    That gives you the table you can see above in my posts.

  3. I just renamed the hws-connect tag to hws-connect1 with

    UPDATE tags SET name = 'hws-connect1' WHERE name='hws-connect';
    
  4. Leave the Inception with some kicks backwards:
    \q to leave postgres
    exit to leave the docker container

  5. Do the rebuild again with sudo ./launcher rebuild app

  6. Be happy it works and verify in front end what you did:
    Go to your tags page https://your-forum/tags

I have no clue how it happened and why this upgrade failed so badly - all previous ones worked, via web or terminal.
Will clean my tags up now.

Bonus:

  1. You click at the renamed tag.
  2. Remove it from all topics. 3 in my case.
  3. Go back to the tags page and use the top right feature:

All done. :v:
Thanks for all your help guys.