Postgresql as Temporal Datbase: Summary and proposal
Postgresql as Temporal Datbase: Summary and proposal
От:
Janardhana Reddy <jana-reddy@mediaring.com.sg>
Дата:
Postgresql can easily act as a Temporal database withsome changes. Using this applications can get all changes performed ona particular tuple during its lifetime provided vaccum is not performed on that particular table. Requirements: 1) Every Tuble is uniquely identified by unique OID 2) The tuple should be never overreturn or deleted The above two conditions are easily satisfied by the existing postgresqldatabase. Summary of changes: 1) New type of select statement need to added to the extisting parser to get all the records of a particular tuple with a specific oid. By using xmin,xmax we can get sequence of changes performed on that tuple. 2) While scanning the heap for the new select statement , the tuples which are marked as deleted (or invalid) are also picked up. 3) Need to add one more attribute for every table to indicate wether the tuple is dead(invalid) or not along with existing attributes oid,xmin,xmax. 4) We should make sure the Oid is unique taking care of wraparound problem. regards jana