如何为Postgres 10.6设置DBParameterGroup Family属性

bri*_*fey 1 postgresql rds amazon-web-services

我正在使用带有RDS的Postgres 10.6。我正在尝试设置DBParameterGroup来设置一些自定义参数,但是我不确定在CloudFormation中将什么作为姓氏。该文档有一个示例:Family: aurora5.6。我尝试了Family: postgres10.6,但没有成功。有任何人对此有经验吗?

这是我的CloudFormation RDS堆栈中的内容:

  RDSPostgres:
    Type: 'AWS::RDS::DBInstance'
    DeletionPolicy: Delete
    Properties:
      AllocatedStorage: "100"
      DBInstanceClass: db.m4.large
      DBParameterGroupName: RDSDBParameterGroup
      EnablePerformanceInsights: true
      Engine: "postgres"
      EngineVersion: "10.6"
      MasterUsername: !Ref PGUsername
      MasterUserPassword: !Ref PGPassword
      Port: "5432"
      PubliclyAccessible: true
      StorageType: gp2
      DBSubnetGroupName: !Ref DBSubnetGroup
      VPCSecurityGroups:
        - !GetAtt DatabaseSecurityGroup.GroupId

  RDSDBParameterGroup:
    Type: AWS::RDS::DBParameterGroup
    Properties:
      Description: Postgres custom parameters
      Family: postgres10.6
      Parameters:
        shared_preload_libraries: 'pg_stat_statements'
        pg_stat_statements.max: '10000'
        pg_stat_statements.track: 'all'
        log_min_duration_statement: '1000'
        log_duration: 'on'
        random_page_cost: '1.1'
        checkpoint_completion_target: '0.9'
        min_wal_size: '80'
        effective_io_concurrency: '200'
        log_statement: 'all'
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用这些设置创建一个新数据库,CloudFormation告诉我postgres10.6不是有效的参数。该DBParameterGroup文档没有Postgres的例子,我有一个很难找到这个值应该是什么。

jog*_*old 5

您应该将该Family属性设置为postgres10

以下是PostgreSQL可用家族的列表:

在此处输入图片说明

创建参数组时,可以在控制台中找到列表。或者,您可以使用以下AWS CLI命令查找列表(包含重复项):

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"
Run Code Online (Sandbox Code Playgroud)