On Sat, Aug 15, 2026 at 5:46 AM Zsolt Parragi <[email protected]> wrote:
>
> Hello!
>
> +dummy_table_am behaves like a heap table but accepts a different
> +set of reloptions:
> +
> +  - "fillfactor"     (inherited from the core heap registration via
> +                      add_reloption_to_kind)
>
> +bool
> +RelationHasStdRdOptions(Relation relation)
> +{
> +       if (relation->rd_options == NULL)
> +               return false;
> +       if (relation->rd_tableam == NULL)
> +               return false;
> +       return relation->rd_tableam->amoptions == NULL;
> +}
>
> dummy_table_am seems to accept but ignore fillfactor options with
> this, which based on the documentation above seem unintended?
>
> CREATE TABLE heap_ff10  (a int) WITH (fillfactor=10);
> CREATE TABLE dummy_ff10 (a int) USING dummy_table_am WITH (fillfactor=10);
>
> INSERT INTO heap_ff10  SELECT generate_series(1,200000);
> INSERT INTO dummy_ff10 SELECT generate_series(1,200000);
>
> SELECT relname, relpages,
>        pg_size_pretty(pg_relation_size(oid)) AS size
> FROM pg_class
> WHERE relname IN ('heap_ff10','dummy_ff10')
> ORDER BY relname;
>   relname   | relpages |  size
> ------------+----------+---------
>  dummy_ff10 |      885 | 7080 kB
>  heap_ff10  |     9091 | 71 MB
> (2 rows)
>

I think this might be due to the fact that dummy_table_am doesn't
handle the `fillfactor` itself, since it's just a test module, I think
it's ok.

> Also it isn't critical for the current tests, but it doesn't seem to
> support text columns, so that contradicts the generic behaves like
> heap claim a bit:
>
> CREATE TABLE t_txt (a int, b text) USING dummy_table_am;
> ERROR:  only heap AM is supported
>
>


-- 
Regards
Junwang Zhao


Reply via email to