permission denied to create extension "pg_stat_statements"

オープン
#230 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
postgresql, rails

調査の方向性

db/schema.rb:13-16 と、失敗を引き起こす setup コマンドから始めます。過剰な権限を付与せずに pg_stat_statements を作成するためにサポートされている PostgreSQL のロールまたは設定を確認し、その後、必要な setup を関連する README に記載して、db:chatwoot_prepare と db:schema:load が動作することを確認します。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

Trying to setup a new chatwoot server, and running either db:chatwoot_prepare or db:schema:load

rails aborted!
ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR:  permission denied to create extension "pg_stat_statements"
HINT:  Must be superuser to create this extension.
/home/chatwoot/chatwoot/db/schema.rb:16:in `block in <main>'
/home/chatwoot/chatwoot/db/schema.rb:13:in `<main>'

Caused by:
PG::InsufficientPrivilege: ERROR:  permission denied to create extension "pg_stat_statements"
HINT:  Must be superuser to create this extension.

To Reproduce

My PG Setup

CREATE USER chatwoot NOINHERIT LOGIN PASSWORD '<password>';
CREATE DATABASE chatwoot_production OWNER chatwoot;
GRANT ALL PRIVILEGES ON DATABASE chatwoot_production to chatwoot;

Expected behavior

A clear indication on what roles to give to chatwoot in the readme. Also, expecting chatwoot to get superadmin privilegies seems a bit excessive. Is there no other way to configure what you need ?

Screenshots

N/A

Browser logs

N/A

Server logs

N/A

Environment

Self hosted chatwoot, Linux VM deployment
release/2.2.1

Desktop (please complete the following information):

  • OS: Debian 13

Smartphone (please complete the following information):
N/A

Additional context

Add any other context about the problem here.

主要言語
MDX
スター
94
フォーク
180
平均マージ
25分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

chatwoot/docs のほかの issue

chatwoot/docs の issue をすべて見る

似ている issue

Databases の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。