8

what is the query that i can use to find out when(date) a particular index (unique or non-unique) has been created in the database. Basically i want to find out the indexes that were created in the last one month or so.

2
  • 1
    You can get the relfilenode for the index from the system catalogs and examine the ctime of the on-disk file that backs the index. However (a) I think REINDEX will delete and recreate it, and (b) for big indexes there can be more than one such file as they're in 1GB chunks. I'm curious: why do you want that? Commented Oct 4, 2012 at 1:35
  • 3
    The best thing to do is to keep log_statement on to at least log DDL, so you can trace such events. Commented Oct 4, 2012 at 1:35

1 Answer 1

4

This is not possible. There is no info about creating time of relations, indexes, ...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.