PostgreSQL 9.3 add functions pg_is_in_backup() and pg_backup_start_time() report the status of base backups

本文涉及的产品
云原生数据库 PolarDB MySQL 版,Serverless 5000PCU 100GB
简介:
Add SQL functions pg_is_in_backup() and pg_backup_start_time() (Gilles Darold)
These functions report the status of base backups.
这两个函数可用于查看当前数据库是否在备份, 以及开始备份的时间.

[测试]
postgres=# select pg_start_backup(now()::text),now();
 pg_start_backup |              now              
-----------------+-------------------------------
 2/54000028      | 2013-05-08 15:55:00.267025+08
(1 row)

postgres=# select pg_is_in_backup();
 pg_is_in_backup 
-----------------
 t
(1 row)

postgres=# select pg_backup_start_time();
  pg_backup_start_time  
------------------------
 2013-05-09 05:55:00+08
(1 row)

postgres=# select pg_stop_backup();
NOTICE:  pg_stop_backup complete, all required WAL segments have been archived
 pg_stop_backup 
----------------
 2/540000F0
(1 row)

postgres=# select pg_backup_start_time();
 pg_backup_start_time 
----------------------
 
(1 row)

postgres=# select pg_is_in_backup();
 pg_is_in_backup 
-----------------
 f
(1 row)


[参考]
相关实践学习
使用PolarDB和ECS搭建门户网站
本场景主要介绍基于PolarDB和ECS实现搭建门户网站。
阿里云数据库产品家族及特性
阿里云智能数据库产品团队一直致力于不断健全产品体系,提升产品性能,打磨产品功能,从而帮助客户实现更加极致的弹性能力、具备更强的扩展能力、并利用云设施进一步降低企业成本。以云原生+分布式为核心技术抓手,打造以自研的在线事务型(OLTP)数据库Polar DB和在线分析型(OLAP)数据库Analytic DB为代表的新一代企业级云原生数据库产品体系, 结合NoSQL数据库、数据库生态工具、云原生智能化数据库管控平台,为阿里巴巴经济体以及各个行业的企业客户和开发者提供从公共云到混合云再到私有云的完整解决方案,提供基于云基础设施进行数据从处理、到存储、再到计算与分析的一体化解决方案。本节课带你了解阿里云数据库产品家族及特性。
相关文章
|
SQL 关系型数据库 MySQL
pt-tools系列:pt-online-schema-change 最佳实践
pt的详细步骤 Step 1: Create the new table. Step 2: Alter the new, empty table. This should be very quick, or die if the user specified a bad alter statement.
4595 0
|
11月前
|
Oracle 关系型数据库 数据库
change backup ... for db_unique_name不同步到control file
change backup … for db_unique_name 可以改变备份集所属的db_unique_name,但oracle官方文档里面没有说会不会同步到db_unique_name对应的数据库的control file。我自己测试发现不会同步到control file。
|
关系型数据库 数据库 PostgreSQL
pg_ctl: server did not start in time
postgresql 启动超时异常,可怎么解决
pg_ctl: server did not start in time
|
SQL 运维 前端开发
【MySQL】pt-online-schema-change 工具使用
在运维mysql数据库时,我们总会对数据表进行ddl 变更,修改添加字段或者索引,对于mysql 而已,ddl 显然是一个令所有MySQL dba 诟病的一个功能,因为在MySQL中在对表进行ddl时,会锁表,当表比较小比如小于1w上时,对前端影响较小,当时遇到千万级别的表 就会影响前端应用对表的写操作。
279 0
|
SQL 关系型数据库 PostgreSQL
Enable point-in-time-recovery in PostgreSQL
转载地址:https://dev.to/pythonmeister/enable-point-in-time-recovery-in-postgresql-4d19 I really love PostgreSQL.
1128 0
|
SQL MySQL 关系型数据库
Why You Should Use HybridDB for MySQL for Online and Offline Data Separation
HybridDB for MySQL helps you separate online and offline data in a precise, economical, and secure way.
2350 0
Why You Should Use HybridDB for MySQL for Online and Offline Data Separation
|
关系型数据库 MySQL SQL