postgresql

UTC时间、GMT时间、本地时间、Unix时间戳

谁说我不能喝 提交于 2021-01-09 05:43:08
引用: https://blog.csdn.net/u012102306/article/details/51538574 https://blog.csdn.net/foxir/article/details/43916601 GMT和UTC GMT ,即格林尼治标准时间,也就是世界时。GMT的正午是指当太阳横穿格林尼治子午线(本初子午线)时的时间。但由于地球自转不均匀不规则,导致GMT不精确,现在已经不再作为世界标准时间使用。 UTC ,即协调世界时。UTC是以原子时秒长为基础,在时刻上尽量接近于GMT的一种时间计量系统。为确保UTC与GMT相差不会超过0.9秒,在有需要的情况下会在UTC内加上正或负闰秒。UTC现在作为世界标准时间使用。 所以,UTC与GMT基本上等同,误差不超过0.9秒。 时区 地球自西向东旋转,东边比西边先看到太阳,东边的时间也比西边的早。为了统一世界的时间,1884年的国际经度会议规规定将全球划分为24个 时区 (东、西各12个时区)。规定英国(格林尼治天文台旧址)为零时区(GMT+00),东1-12区,西1-12区,中国北京处于东8区(GMT+08)。 若英国时间为6点整,则GMT时间为6点整,则北京时间为14点整。 UNIX时间戳 计算机中的 UNIX时间戳 ,是以GMT/UTC时间「1970-01-01T00:00:00」为起点,到具体时间的秒数

DTCC 2020 | 阿里云赵殿奎:PolarDB的Oracle平滑迁移之路

佐手、 提交于 2021-01-08 16:02:33
摘要:Oracle兼容性是业务客户从Oracle生态迁移到PolarDB生态的第一步也是至关重要的一步,PolarDB通过不断沉淀支持大量实际业务的真实Oracle兼容性功能,确保客户业务可以真正做到平滑迁移。同时PolarDB带给Oracle生态客户的不仅仅是上的来的问题,PolarDB在成本、性能、可用性、扩展性等云能力方面也给用户带来更高的业务价值。在DTCC 2020大会分布式数据库实践专场上,阿里巴巴高级数据库专家赵殿奎为大家介绍阿里巴巴电PolarDB的Oracle平滑迁移之路。 演讲嘉宾简介:赵殿奎,阿里巴巴高级数据库专家,从事OLTP数据库和OLAP数据库产品的研发工作10余年,现为阿里云PolarDB数据库内核北京研发负责人。 以下内容根据演讲视频以及PPT整理而成。 本次分享主要围绕以下四个方面: 一、PolarDB架构 二、PolarDB兼容性 三、PolarDB增强 四、PolarDB迁移 一、PolarDB架构 PolarDB架构组件 —— CM PolarDB架构是基于共享存储的架构,下图是PolarDB整体架构视图,其中CM主要负责的工作包括整个Polar集群的管理,Top管理,高层管理、备份管理及审计管理。CM是一个管控链路的核心组件,这意味着CM组件本身对于PolarDB的整个数据的可用性没有任何影响,PolarDB的可用性完全独立于整个数据链路

web架构链接汇总

a 夏天 提交于 2021-01-08 07:59:39
WikiPedia 技术架构学习分享 YouTube 的架构扩展 Internet Archive 的海量存储浅析 LinkedIn 架构笔记 Tailrank 网站架构 Twitter 的架构扩展: 100 倍性能提升 财帮子(caibangzi.com)网站架构 Yupoo! 的网站技术架构 37Signals 架构 Flickr 的访问统计实现以及其他 PlentyOfFish 网站架构学习 Yahoo!社区架构 有关 Alexa 与 AOL 部署集群文件系统 eBay 的存储一瞥 eBay 的数据量 eBay 的数据库分布扩展架构 eBay 的数据层扩展经验 eBay 的应用服务器规模 性能扩展问题要趁早 Scaling an early stage startup Facebook 的 PHP 性能与扩展性 Skype 用 PostgreSQL 支撑海量用户 闲谈 Web 图片服务器 说说北京奥运购票系统瘫痪这事儿 Architectures You’ve Always Wondered About eBay’s Architectural Principles Building a large scale SaaS app Scaling an early stage startup 互联星空播客架构(原文在张宴blog上,但是后来文章撤下,很可惜.此为转载)

repmgr切换以及故障转移恢复

十年热恋 提交于 2021-01-07 17:32:23
[pg10@data01 data]$ repmgr -f ~/conf/repmgr.conf cluster show ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string ----+--------------+---------+-----------+--------------+----------+----------+----------+--------------------------------------------------------------------------- 1 | 10.10.10.101 | primary | * running | | default | 100 | 1 | host=10.10.10.101 user=repmgr dbname=postgres password=1qaz@WSX port=5666 2 | 10.10.10.102 | standby | running | 10.10.10.101 | default | 100 | 1 | host=10.10.10.102 user=repmgr dbname=postgres password=1qaz@WSX port

Timezone aware datetime to string? [duplicate]

荒凉一梦 提交于 2021-01-07 12:54:17
问题 This question already has answers here : Python datetime to string without microsecond component (12 answers) Closed 4 years ago . I am retrieving a timezone aware DateTime object from my postgres db. Now I want to convert this datetime object into it's string representation. Normally I would do something like this: str(datetime.datetime(2016, 1, 15, 9, 59, 45, 165904)) '2016-01-15 09:59:45.165904' But here I have: datetime.datetime(2016, 1, 15, 9, 59, 45, 165904, tzinfo=<UTC>) I cannot find

Outer join 3 or more tables in Laravel 8

自古美人都是妖i 提交于 2021-01-07 06:31:24
问题 This topic is related to my previews one Join two tables with all records I'm tryng now to join 3 or more tables in my Laravel controller code, and view them in one Datatable. table1 +--------------------+---------+ | recordtime | tempout | +--------------------+---------+ | 4.12.2020 10:00:00 | 1.1 | | 4.12.2020 10:30:00 | 1.2 | | 4.12.2020 11:00:00 | 1.3 | | 4.12.2020 11:30:00 | 1.4 | | 4.12.2020 12:00:00 | 1.5 | +--------------------+---------+ table2 +--------------------+---------+ |

Spark optimization - joins - very low number of task - OOM

蓝咒 提交于 2021-01-07 03:59:30
问题 My spark application fail with this error : Exit status: 143. Diagnostics: Container killed on request. Exit code is 143 This is what i get when I inspect the containger log : java.lang.OutOfMemoryError: Java heap space My application is mainly get a table then join differents tables that i read from aws S3: var result = readParquet(table1) val table2 = readParquet(table2) result = result.join(table2 , result(primaryKey) === table2(foreignKey)) val table3 = readParquet(table3) result = result

Merging local PostgreSQL database file to AWS RDS database

纵然是瞬间 提交于 2021-01-07 03:39:55
问题 I have a local Postgres database in my local machine. Now I would like to merge a local Postgres database file to AWS existing RDS database. Does anyone know how to do this? Thank you in advance. 回答1: If the RDS instance is in a private subnet, then you need to tunnel through an EC2 instance to get to your RDS instance. Assuming your security groups are set so that you can ssh into the EC2 instance, and the EC2 instance has access to RDS on port 5432, you can do the following: Make a dump of

Merging local PostgreSQL database file to AWS RDS database

陌路散爱 提交于 2021-01-07 03:39:27
问题 I have a local Postgres database in my local machine. Now I would like to merge a local Postgres database file to AWS existing RDS database. Does anyone know how to do this? Thank you in advance. 回答1: If the RDS instance is in a private subnet, then you need to tunnel through an EC2 instance to get to your RDS instance. Assuming your security groups are set so that you can ssh into the EC2 instance, and the EC2 instance has access to RDS on port 5432, you can do the following: Make a dump of

PL/PostgreSQL how to convert a variable into a table name

我是研究僧i 提交于 2021-01-07 02:52:28
问题 So I have a function in PostgreSQL that dynamically selects columns from a dynamic table. I got this solution from this post and it works great other than one thing. This is inside of a file that is connected to a Node server, and so the $1 and $2 in the second SELECT * FROM represent values passed from there. The issue right now is that I am getting a syntax error that I don't understand (I am newer to SQL so that may be why). $2 represents the name of the table to be selected from as a