Hi,

alvhe...@postgresql.org (Alvaro Herrera) wrote:

> Log Message:
> -----------
> Update autovacuum to use reloptions instead of a system catalog, for
> per-table overrides of parameters.
> 
> This removes a whole class of problems related to misusing the catalog,
> and perhaps more importantly, gives us pg_dump support for the parameters.
> 
> Based on a patch by Euler Taveira de Oliveira, heavily reworked by me.

I tested this changes and found two issues:

1. fillfactor.* options are silently ignored when the table doesn't have
   toast relation. Should we notice the behabior to users?
   ex. NOTICE: toast storage parameters are ignored
               because the table doesn't have toast relations.


2. psql's \d+ doesn't show toast storage parameters.

Neither \d+ for base tables nor toast relations show toast.* parameters
though there are some values in pg_class.reloptions.
I think we should show toast.* parameters in \d+ for base tables
because it has consistency; we set them at ALTER TABLE for base tables.

=# CREATE TABLE tbl (t text) WITH (fillfactor=90, toast.fillfactor=70);
=# SELECT 'tbl'::regclass::oid;
  oid
-------
 16388

=# \d+ tbl
                Table "public.tbl"
 Column | Type | Modifiers | Storage  | Description
--------+------+-----------+----------+-------------
 t      | text |           | extended |
Has OIDs: no
Options: fillfactor=90

*** Should we show toast.fillfactor=70 here? ***

=# \d+ pg_toast.pg_toast_16388
    TOAST table "pg_toast.pg_toast_16388"
   Column   |  Type   | Storage | Description
------------+---------+---------+-------------
 chunk_id   | oid     | plain   |
 chunk_seq  | integer | plain   |
 chunk_data | bytea   | plain   |

*** No descriptions about options here. ***

=# SELECT oid, relname, reloptions FROM pg_class
    WHERE oid = 'pg_toast.pg_toast_16388'::regclass;
  oid  |    relname     |   reloptions
-------+----------------+-----------------
 16391 | pg_toast_16388 | {fillfactor=70}

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to