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.
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?
REINDEXwill 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?log_statementon to at least log DDL, so you can trace such events.