- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Cloudformation 将主要版本从 Aurora Postgres 10.14 升级到 11.9。我的模板创建了一个 DBCluster
, 一个 DBInstance
, 一个 DBClusterParameterGroup
和一个 DBParameterGroup
.
问题是当我尝试更新堆栈并更改 EngineVersion
时DBCluster
的属性(property)来自 10.14
至 11.9
并更改 Family
DBClusterParameterGroup
的属性(property)和 DBParameterGroup
来自 aurora-postgresql10
至 aurora-postgresql11
,我在 CloudFormation 中收到此错误:
The following parameters are not defined for the specified group: enable_partitionwise_aggregate, enable_parallel_append, enable_partition_pruning, vacuum_cleanup_index_scale_factor, pg_bigm.last_update, apg_enable_semijoin_push_down, parallel_leader_participation, pg_bigm.enable_recheck, pg_bigm.gin_key_limit, max_parallel_maintenance_workers, pg_bigm.similarity_limit, enable_parallel_hash, enable_partitionwise_join (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue)
我认为这是因为,根据AWS Documentation对于 RDS 参数组:
The DB cluster parameter group family can't be changed when updating a DB cluster parameter group
所以即使我正在尝试更新 Family
DBClusterParameterGroup
的属性(property)和 DBParameterGroup
, CloudFormation 只是忽略了这一点,因此它正在尝试应用 aurora-postgresql10
参数组系列 aurora-postgresql10
到现在尝试运行 Aurora Postgres 11.9 的数据库
Description
属性(property)DBClusterParameterGroup and
数据库参数组 to include a reference to the
pEngineVersion` 参数,作为 AWS 文档说这会触发替换,但实际上并没有这个,所以我得到了同样的错误DBParameterGroup
在运行更新之前。出现错误“不可修改的数据库参数:pg_bigm.last_update”我发现的唯一解决方法是笨拙:
DB cluster parameter group
和 Parameter group
都到default.aurora-postgresql11
还有DBClusterParameterGroup
的代码和 DBParameterGroup
并使用更新后的 EngineVersion
更新堆栈11.9
对于 DBCluster
DBClusterParameterGroup
的代码和 DBParameterGroup
并使用正确的 Family
再次更新堆栈属性(property)aurora-postgresql11
在 DBClusterParameterGroup
和 DBParameterGroup
.现在数据库更新了,使用的是自定义参数组,栈没有漂移Parameters:
pEngineVersion:
Type: String
#currently '10.14'
#trying to change to '11.9'
pFamily:
Type: String
#currently 'aurora-postgresql10'
#trying to change to 'aurora-postgresql11'
Resources:
DBClusterParamGroup:
Type: AWS::RDS::DBClusterParameterGroup
Properties:
Description: !Sub 'AuroraDBClusterParamGroup-${AWS::Region}'
Family: !Ref pFamily
Parameters:
application_name: "App name"
log_statement: all
log_min_duration_statement: 0
DBParamGroup:
Type: AWS::RDS::DBParameterGroup
Properties:
Description: !Sub 'AuroraDBParamGroup-${AWS::Region}'
Family: !Ref pFamily
Parameters:
max_connections: 1000
AuroraDBCluster:
Type: AWS::RDS::DBCluster
Properties:
EngineVersion: !Ref pEngineVersion
Engine: aurora-postgresql
DBClusterParameterGroupName: !Ref 'DBClusterParamGroup'
#snipping unneccesary code#
AuroraDBInstance:
Type: AWS::RDS::DBInstance
Properties:
Engine: aurora-postgresql
DBParameterGroupName: !Ref 'DBParamGroup'
DBClusterIdentifier: !Ref 'AuroraDBCluster'
#snipping unneccesary code#
任何帮助将不胜感激
最佳答案
这个方法对我有用(我稍微修改了一些东西以在公共(public)论坛上发帖)编辑:我已经更新了这个以使用蓝/绿解决方案,因为我有机会对其进行测试。
Parameters:
[...]
DBEngineVersion:
Type: String
Description: "Choices are engine versions from Postgres 9/10/11, only newest and legacy deployed in Prod versions"
Default: 11.7
AllowedValues:
- 9.6.18
- 10.7
- 10.14
- 11.7
MajorVersionUpgrade:
Type: String
Description: Swap this between 'Blue' or 'Green' if we are doing a Major version upgrade
Default: Blue
AllowedValues:
- Blue
- Green
Conditions:
BlueDeployment: !Equals [!Ref MajorVersionUpgrade, "Blue"]
GreenDeployment: !Equals [!Ref MajorVersionUpgrade, "Green"]
Mappings:
EngineToPGFamily:
"9.6.18":
PGFamily: aurora-postgresql9.6
"10.7":
PGFamily: aurora-postgresql10
"10.14":
PGFamily: aurora-postgresql10
"11.7":
PGFamily: aurora-postgresql11
##### Keep parameters of both versions in sync ####
DBClusterParameterGroupBlue: #Keep parameters of both versions in sync
Type: "AWS::RDS::DBClusterParameterGroup"
Condition: BlueDeployment
Properties:
Description: !Sub "Postgres Cluster Parameter Group for ${InfrastructureStackName}"
Family: !FindInMap ['EngineToPGFamily', !Ref 'DBEngineVersion', 'PGFamily']
Parameters:
client_encoding: UTF8
idle_in_transaction_session_timeout: 60000
DBClusterParameterGroupGreen:
Type: "AWS::RDS::DBClusterParameterGroup"
Condition: GreenDeployment
Properties:
Description: !Sub "Postgres Cluster Parameter Group for ${InfrastructureStackName}"
Family: !FindInMap ['EngineToPGFamily', !Ref 'DBEngineVersion', 'PGFamily']
Parameters:
client_encoding: UTF8
idle_in_transaction_session_timeout: 60000
DBCluster:
Type: "AWS::RDS::DBCluster"
Properties:
DBClusterIdentifier: !Sub "${AWS::StackName}-cluster"
DBClusterParameterGroupName: !If [GreenDeployment, !Ref DBClusterParameterGroupGreen, !Ref DBClusterParameterGroupBlue]
Engine: aurora-postgresql
[...]
DBInstance1:
Type: "AWS::RDS::DBInstance"
Properties:
DBClusterIdentifier: !Ref DBCluster
EngineVersion: !Ref DBEngineVersion
Engine: aurora-postgresql
[...]
DBInstance2:
Type: "AWS::RDS::DBInstance"
Properties:
DBClusterIdentifier: !Ref DBCluster
EngineVersion: !Ref DBEngineVersion
Engine: aurora-postgresql
[...]
此方法将创建一个新的 ClusterParameterGroup,它将在升级期间(进行主要版本升级时)使用,并在升级完成后清理原始组。此解决方案的优点是组中没有版本硬编码,并且可以使用相同的模板进行连续的生命周期更新,而无需进行额外更改(除了所需的 Parameters
更新之外)。
最初,将 MajorVersionUpgrade 设置为 Blue,条件将确保仅使用正确的数据库系列创建 Blue ParameterGroup。
更新堆栈并将 DBEngineVersion 设置为新的主要版本 并将 MajorVersionUpgrade 设置为 Green 如果它当前是蓝色(或者蓝色如果它当前是绿色)。 CloudFormation 将:
参数
必须手动保持同步DBEngineVersion
AllowedValues
列表,只需确保更新 EngineToPGFamily
Mappings
为该引擎版本提供有效的 Postgres 系列值Parameters
时必须特别小心,这些 Parameters
是 DB Major 版本的新参数,而旧版本中不存在,我没有测试过这个关于postgresql - 如何使用自定义参数组对 CloudFormation 中的 Aurora Postgres 进行主要版本升级?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68086201/
有没有办法在 Ubuntu 上升级我的 octave 版本,而无需下载最新版本并从头开始重新安装? (我当前的版本是 3.0.0,我想要最新的稳定版本) 最佳答案 你的ubuntu版本是什么?业力?
我有一个使用 Firebase 和 GMS 服务的应用程序,版本为 11.8.0 2 年,现在,我想升级到最新版本是 17.0.0。 gradle 中的以下依赖项: 升级前: implementati
node有一个模块叫n(这名字可够短的。。。),是专门用来管理node.js的版本的。 首先安装n模块: ?
但是伴随新版本的发布,每个版本都会加入很多好玩的新特性,作者会尽力保证做到向下兼容,但是如果开发者在使用swagger-bootstrap-ui的途中,因为升级版本导致的问题 一般都是由于前端的问题
最新版本的 Grails(2.1.1) 不支持最新版本的 Hibernate(4.1.7) 默认支持2.1.1版本 在 Grails 2.1.1 中升级 Hibernate 需要做什么? 最佳答案 最
我在一个实现了 omniture 跟踪的项目中工作,它运行良好,没有任何问题。我们在项目中有一个新的要求,我们需要用新的 s_code.js(版本 H26)替换现有的库文件 s_code.js(版本
从 Zend Server CE 5.0 with php 5.2 升级到 Zend Server CE 5.1 with php 5.3 的最佳方法是什么? 卸载并重新安装?在现有版本上安装? 最佳
我正在开发 ZK Web 应用程序,它使用 java 1.7、ZK 版本 6.5.2 和 Apache Tomcat 6(ZK 文档中描述的默认 tomcat 版本)。现在我需要将 Apache To
正在寻找有关版本间升级在 iOS 中如何工作的一些具体细节,特别是新版本中已删除的捆绑内容会发生什么情况?例如,如果 1.0 版在 bundle 中有一个名为“foo.png”的文件,但 2.0 版没
我有一个 Azure VM(Windows Server 2016 和 SQL Server 2016),运行一个生产 Web 应用程序,出于性能和成本原因,该应用程序同时充当应用程序和数据库服务器。
我在我的计算机上使用 ubuntu Linux 12.04 LTS。我使用的是 PHP 5.3.10 现在我通过在终端上使用几个命令升级到 PHP 5.5.18。升级到最新的 PHP 版本后,我使用命
我们的应用程序使用 Spring 版本 3.2.3.RELEASE,我们决定将其迁移到 4.0.9.RELEASE。 升级后我们无法再次使用 STS。启动工作区时,STS 会在一段时间(5-30 分钟
我在 mac(mojave 操作系统)中将 golang 从 v1.11 升级到 v1.13。调试器开始抛出错误 测试框架意外退出。控制台输出是 API server listening at: 12
我是一名优秀的程序员,十分优秀!