0030_autovacuum_disabled misses tables where autovacuum_enabled is set to off, 0 or no

未关闭
#207 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@RaphaelFakhri 已经在做这个了。

开始于 2026年10月25日。

  • #208 来自 @RaphaelFakhri —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
postgresql, sql
领域
backend, databases

调研方向

Find the definition of lint 0030_autovacuum_disabled and inspect how it checks pg_class.reloptions. The issue provides SQL to reproduce the missed cases; run it and query the lint view to confirm the behavior. Done means the lint reports tables whose autovacuum_enabled value is off, 0, or no as well as false.

由索引模型根据 Issue 内容生成。

描述

Lint 0030_autovacuum_disabled matches the single string 'autovacuum_enabled=false' = any(cls.reloptions). Postgres stores a boolean storage parameter as written, so any other spelling of false is stored as-is and the lint reports nothing.

Steps to reproduce

create table public.a (id int) with (autovacuum_enabled = off);
create table public.b (id int) with (autovacuum_enabled = 0);
create table public.c (id int) with (autovacuum_enabled = 'no');

select relname, reloptions from pg_class where relname in ('a', 'b', 'c');
--  a | {autovacuum_enabled=off}
--  b | {autovacuum_enabled=0}
--  c | {autovacuum_enabled=no}

select * from lint."0030_autovacuum_disabled";
-- (0 rows)

Expected behavior

The lint reports all three tables, because autovacuum is disabled on each of them.

Actual behavior

The lint returns 0 rows. Only autovacuum_enabled = false (or unquoted FALSE) is detected.

Tested on supabase/postgres:15.14.1.169.

主要语言
PLpgSQL
星标
284
派生
110
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

supabase/splinter 的其他 Issue

查看 supabase/splinter 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。