question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very Old Segments of a Deleted Table Still Present in Servers

See original GitHub issue

I had deleted someTableName long time back but was surprised to see its segments inside the data directory on servers. One such segment that I see issomeTableName__0__248__20210212T1915Z, which is almost a year old. We have also configured the retention period to be 1 day, so not really sure why this segment is still hanging around.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
suddendustcommented, Feb 10, 2022

@walterddr This query isn’t working as the table has been deleted. I get a

[
  {
    "message": "TableDoesNotExistError",
    "errorCode": 190
  }
]
1reaction
Jackie-Jiangcommented, Feb 9, 2022

@walterddr Can you please take a look at this issue? We might need to change the order of segment deletion to ensure the segment from the deep store is deleted before removing the segment metadata, or the segment will become an orphan.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recover deleted table from the database - DBA Stack Exchange
Right click on new restored database and select Task --> Export data; select --Source server and database ---> destination server and database ...
Read more >
Database size bigger after delete from table - Stack Overflow
A temporary transaction log is often the reason for a notable increase of size after a huge delete. It will eventually disappear on...
Read more >
Data Blocks, Extents, and Segments
All extents allocated to an index segment remain allocated as long as the index exists. When you drop the index or associated table...
Read more >
Fastest way to Delete Large Number of Records in SQL Server
Deleting large portions of a table isn't always the only answer. If you are deleting 95% of a table and keeping 5%, it...
Read more >
CREATE PROCEDURE (Transact-SQL) - Microsoft Learn
A procedure can reference tables that don't yet exist. At creation time, only syntax checking is performed. The procedure isn't compiled until ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found