In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to use snapshot operation interface functions in PostgreSQL". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Snapshot operation interface function
1. Create a snapshot. When the BLOCK changes, the BLOCK (old version) before the change is written to the * .snapmap.SNAP _ ID file file. Until the snapshot is deleted.
/ * Create new snapshot. Starting from this moment Postgres will store original copies of all updated pages. * Them will be stored in shanpshot file (* .snap.SNAP _ ID and addressed through * .snapmap.SNAP_ID file) until * snapshot is deleted by sfs_remove_snapshot function or new snapshot is created. * / extern SnapshotId sfs_make_snapshot (void)
2. Delete snapshot.
/ * * Remove snapshot with all it's files * / extern void sfs_remove_snapshot (SnapshotId sid)
3. Restore the database to the specified snapshot.
/ * Reset database state to the paritcular snapshot. * It will be not possible any more to recover to any of more recent snashots or to the most recent database state. * / extern void sfs_recover_to_snapshot (SnapshotId sid)
4. View a past state of the database. (it's not going back to what it used to be)
/ * Temporary switch instance to the particular snashot. It will be possible to return back to the most recent database state or to switch to any other snapshot * / extern void sfs_switch_to_snapshot (SnapshotId sid)
5. Just switch the current BACKEND PID to the state of a past SNAPSHOT ID in the database, instead of switching all BACKEND to a state in the past.
/ * Set snapshot for backend, unlike sfs_switch_to_snapshot function, it switchces snapshot for the current backend and not for all server instance. * / extern void sfs_set_backend_snapshot (SnapshotId sid)
These interfaces are very similar to the SNAPSHOT function of ZFS.
This is the end of the introduction of "how to use snapshot operation interface functions in PostgreSQL". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.