powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

Duplicate database name while try to select one #186

Closed feddeMurua closed 6 months ago

feddeMurua commented 6 months ago

Hi everyone!!

I found this issue when I tried to select a database, its duplicate. "testnueva" was a database that I dropped, and then re-create.

cap1

Best regards

rjuju commented 6 months ago

Hi,

This is actually somewhat expected. In powa we store everything using their underlying oid (object id), databases included, and we also make sure to preserve dropped databases for a bit. So when you drop and recreate a database, you end up with 2 distinct oids that have the exact same name. But if there was some activity on each database, you will be able to see it on the UI, obviously with the activity before the drop on one of those and the activity after creating the new database on the other one. The idea behind that is that if you want to investigate a performance issue that happened before the database drop you still retain all the information related to the dropped database, to see the full picture.

The poorly thought part is that the databases are only displayed using the database name so it's hard to distinguish which one is the dropped one and which one is the new one. I think we could try to add a bit of detail, maybe an additional (dropped on 2023-XX-XX...) so that it will still be helpful if you drop and recreate it multiple times.

Also if you're wondering, the dropped database will be automatically removed according to your configured data retention.