Thread

  1. CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T22:10:06Z

    Hi, ALL,
    
    [quote]
    draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    drafttype smallint, scoringtype smallint, roundvalues smallint,
    leaguetype char(5), salary integer, benchplayers smallint, primary
    key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    autovacuum_enabled ));
    ERROR:  unrecognized parameter "autovacuum_enabled"
    [/quote]
    
    But the page at
    https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    says it's available.
    
    What am I missing?
    
    Thank you.
    
    
    
    
  2. Re: CREATE TABLE fails

    Christoph Moench-Tegeder <cmt@burggraben.net> — 2026-03-08T22:29:35Z

    ## Igor Korot (ikorot01@gmail.com):
    
    > [quote]
    > draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    > drafttype smallint, scoringtype smallint, roundvalues smallint,
    > leaguetype char(5), salary integer, benchplayers smallint, primary
    > key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > autovacuum_enabled ));
    > ERROR:  unrecognized parameter "autovacuum_enabled"
    > [/quote]
    > 
    > But the page at
    > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > says it's available.
    
    It's available as a TABLE storage parameter, but you put it on the index
    definition (where it's not valid) - this could be a conceptual mistake
    or a misplaced right parenthesis.
    See the example on your linked page:
    https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS:~:text=fill%20factor%20for%20both%20the%20table%20and%20its%20unique%20index
    
    Regards,
    Christoph
    
    -- 
    Spare Space
    
    
    
    
  3. Re: CREATE TABLE fails

    Ron Johnson <ronljohnsonjr@gmail.com> — 2026-03-08T22:29:52Z

    On Sun, Mar 8, 2026 at 6:10 PM Igor Korot <ikorot01@gmail.com> wrote:
    
    > Hi, ALL,
    >
    > [quote]
    > draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    > drafttype smallint, scoringtype smallint, roundvalues smallint,
    > leaguetype char(5), salary integer, benchplayers smallint, primary
    > key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > autovacuum_enabled ));
    > ERROR:  unrecognized parameter "autovacuum_enabled"
    > [/quote]
    >
    > But the page at
    >
    > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > says it's available.
    >
    > What am I missing?
    >
    
    Probably "= on", since this does work:
    ALTER TABLE foo SET (autovacuum_enabled = off);
    ALTER TABLE foo SET (autovacuum_enabled = on);
    
    This raises the question "why are you explicitly
    enabling autovacuum_enabled in the CREATE TABLE statement?", since
    autovavuum should be globally enabled.
    
    -- 
    Death to <Redacted>, and butter sauce.
    Don't boil me, I'm still alive.
    <Redacted> lobster!
    
  4. Re: CREATE TABLE fails

    Ron Johnson <ronljohnsonjr@gmail.com> — 2026-03-08T22:32:04Z

    On Sun, Mar 8, 2026 at 6:29 PM Christoph Moench-Tegeder <cmt@burggraben.net>
    wrote:
    [snip]
    
    > or a misplaced right parenthesis.
    >
    
    That's why structured indentation and column-alignment are so useful!!  😀
    
    -- 
    Death to <Redacted>, and butter sauce.
    Don't boil me, I'm still alive.
    <Redacted> lobster!
    
  5. Re: CREATE TABLE fails

    Sahul Hameed <mail2shameed@gmail.com> — 2026-03-08T22:40:29Z

    The problem is that you're putting the WITH clause on the PRIMARY KEY
    constraint, which applies to the index, not the table.
    
    CREATE TABLE leagues_new(id serial, name varchar(100),
        drafttype smallint,scoringtype smallint,roundvalues smallint,
        leaguetype char(5),salary integer,benchplayers smallint,primary
    key(id) INCLUDE (drafttype, scoringtype)) WITH( fillfactor = 50,
    autovacuum_enabled = true );
    
    --Sahul
    
    On Sun, Mar 8, 2026 at 10:10 PM Igor Korot <ikorot01@gmail.com> wrote:
    
    > Hi, ALL,
    >
    > [quote]
    > draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    > drafttype smallint, scoringtype smallint, roundvalues smallint,
    > leaguetype char(5), salary integer, benchplayers smallint, primary
    > key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > autovacuum_enabled ));
    > ERROR:  unrecognized parameter "autovacuum_enabled"
    > [/quote]
    >
    > But the page at
    >
    > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > says it's available.
    >
    > What am I missing?
    >
    > Thank you.
    >
    >
    >
    
  6. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:18:28Z

    Ray,
    
    On Sun, Mar 8, 2026 at 5:26 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
    
    > Probably a silly question, but are you actually using version 16?
    >
    
    Yes, I am.
    
    Thank you.
    
    
    >
    > Apologies for top-post.... phone app.
    >
    > Ray.
    >
    > On 8 March 2026 22:10:31 Igor Korot <ikorot01@gmail.com> wrote:
    >
    > Hi, ALL,
    >>
    >> [quote]
    >> draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    >> drafttype smallint, scoringtype smallint, roundvalues smallint,
    >> leaguetype char(5), salary integer, benchplayers smallint, primary
    >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    >> autovacuum_enabled ));
    >> ERROR:  unrecognized parameter "autovacuum_enabled"
    >> [/quote]
    >>
    >> But the page at
    >>
    >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    >> says it's available.
    >>
    >> What am I missing?
    >>
    >> Thank you.
    >>
    >
    >
    
  7. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:28:34Z

    Christoph,
    
    On Sun, Mar 8, 2026 at 5:29 PM Christoph Moench-Tegeder
    <cmt@burggraben.net> wrote:
    >
    > ## Igor Korot (ikorot01@gmail.com):
    >
    > > [quote]
    > > draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    > > drafttype smallint, scoringtype smallint, roundvalues smallint,
    > > leaguetype char(5), salary integer, benchplayers smallint, primary
    > > key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > > autovacuum_enabled ));
    > > ERROR:  unrecognized parameter "autovacuum_enabled"
    > > [/quote]
    > >
    > > But the page at
    > > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > > says it's available.
    >
    > It's available as a TABLE storage parameter, but you put it on the index
    > definition (where it's not valid) - this could be a conceptual mistake
    > or a misplaced right parenthesis.
    > See the example on your linked page:
    > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS:~:text=fill%20factor%20for%20both%20the%20table%20and%20its%20unique%20index
    
    Please check the PRIMARY KEY clause on that same linked page.
    It says "Storage Parameters" are definitely supported there.
    
    Thank you.
    
    >
    > Regards,
    > Christoph
    >
    > --
    > Spare Space
    
    
    
    
  8. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:30:39Z

    Ron,
    
    On Sun, Mar 8, 2026 at 5:30 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
    >
    > On Sun, Mar 8, 2026 at 6:10 PM Igor Korot <ikorot01@gmail.com> wrote:
    >>
    >> Hi, ALL,
    >>
    >> [quote]
    >> draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    >> drafttype smallint, scoringtype smallint, roundvalues smallint,
    >> leaguetype char(5), salary integer, benchplayers smallint, primary
    >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    >> autovacuum_enabled ));
    >> ERROR:  unrecognized parameter "autovacuum_enabled"
    >> [/quote]
    >>
    >> But the page at
    >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    >> says it's available.
    >>
    >> What am I missing?
    >
    >
    > Probably "= on", since this does work:
    > ALTER TABLE foo SET (autovacuum_enabled = off);
    > ALTER TABLE foo SET (autovacuum_enabled = on);
    >
    > This raises the question "why are you explicitly enabling autovacuum_enabled in the CREATE TABLE statement?", since autovavuum should be globally enabled.
    
    Still the same:
    
    [quote]
    draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    drafttype smallint, scoringtype smallint, roundvalues smallint,
    leaguetype char(5), salary integer, benchplayers smallint, primary
    key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    autovacuum_enabled = on ));
    ERROR:  unrecognized parameter "autovacuum_enabled"
    draft=#
    [/quote]
    
    Thank you,
    
    >
    > --
    > Death to <Redacted>, and butter sauce.
    > Don't boil me, I'm still alive.
    > <Redacted> lobster!
    
    
    
    
  9. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:32:55Z

    Sahul,
    
    On Sun, Mar 8, 2026 at 5:40 PM Sahul Hameed <mail2shameed@gmail.com> wrote:
    >
    > The problem is that you're putting the WITH clause on the PRIMARY KEY constraint, which applies to the index, not the table.
    >
    > CREATE TABLE leagues_new(id serial, name varchar(100),
    >     drafttype smallint,scoringtype smallint,roundvalues smallint,
    >     leaguetype char(5),salary integer,benchplayers smallint,primary
    > key(id) INCLUDE (drafttype, scoringtype)) WITH( fillfactor = 50, autovacuum_enabled = true );
    
    This definitely is supported for the PRIMARY KEY constraint.
    Just remove the faulty clause and leave only "fillfactor" one...
    
    Thank you.
    
    >
    > --Sahul
    >
    > On Sun, Mar 8, 2026 at 10:10 PM Igor Korot <ikorot01@gmail.com> wrote:
    >>
    >> Hi, ALL,
    >>
    >> [quote]
    >> draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    >> drafttype smallint, scoringtype smallint, roundvalues smallint,
    >> leaguetype char(5), salary integer, benchplayers smallint, primary
    >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    >> autovacuum_enabled ));
    >> ERROR:  unrecognized parameter "autovacuum_enabled"
    >> [/quote]
    >>
    >> But the page at
    >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    >> says it's available.
    >>
    >> What am I missing?
    >>
    >> Thank you.
    >>
    >>
    
    
    
    
  10. Re: CREATE TABLE fails

    David G. Johnston <david.g.johnston@gmail.com> — 2026-03-08T23:37:26Z

    On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    
    >
    > >>
    > >> But the page at
    > >> https://www.postgresql.org/docs/16/sql-createtable.html#
    > SQL-CREATETABLE-STORAGE-PARAMETERS
    > >> says it's available.
    > >>
    > >> What am I missing?
    
    
    Those are table storage parameters.
    
    
    > primary
    > key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > autovacuum_enabled = on ));
    > ERROR:  unrecognized parameter "autovacuum_enabled"
    > draft=#
    >
    
    You are specifying index storage parameters here.
    
    The first paragraph of your linked section says:
    
    “Storage parameters for indexes are documented in CREATE INDEX
    <https://www.postgresql.org/docs/16/sql-createindex.html>.”
    
    You will find autovacuum_enabled is not listed there.  Because you can’t
    vacuum an index separately from its table.
    
    David J.
    
  11. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:38:59Z

    For the reference (from the same page):
    
    [quote]
    WITH ( storage_parameter [= value] [, ... ] )
    
    This clause specifies optional storage parameters for a table or
    index; see Storage Parameters below for more information. For
    backward-compatibility the WITH clause for a table can also include
    OIDS=FALSE to specify that rows of the new table should not contain
    OIDs (object identifiers), OIDS=TRUE is not supported anymore.
    
    [/quote]
    
    So the "WITH " clause is definitely available for indexes.
    
    Thank you.
    
    On Sun, Mar 8, 2026 at 6:32 PM Igor Korot <ikorot01@gmail.com> wrote:
    >
    > Sahul,
    >
    > On Sun, Mar 8, 2026 at 5:40 PM Sahul Hameed <mail2shameed@gmail.com> wrote:
    > >
    > > The problem is that you're putting the WITH clause on the PRIMARY KEY constraint, which applies to the index, not the table.
    > >
    > > CREATE TABLE leagues_new(id serial, name varchar(100),
    > >     drafttype smallint,scoringtype smallint,roundvalues smallint,
    > >     leaguetype char(5),salary integer,benchplayers smallint,primary
    > > key(id) INCLUDE (drafttype, scoringtype)) WITH( fillfactor = 50, autovacuum_enabled = true );
    >
    > This definitely is supported for the PRIMARY KEY constraint.
    > Just remove the faulty clause and leave only "fillfactor" one...
    >
    > Thank you.
    >
    > >
    > > --Sahul
    > >
    > > On Sun, Mar 8, 2026 at 10:10 PM Igor Korot <ikorot01@gmail.com> wrote:
    > >>
    > >> Hi, ALL,
    > >>
    > >> [quote]
    > >> draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
    > >> drafttype smallint, scoringtype smallint, roundvalues smallint,
    > >> leaguetype char(5), salary integer, benchplayers smallint, primary
    > >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > >> autovacuum_enabled ));
    > >> ERROR:  unrecognized parameter "autovacuum_enabled"
    > >> [/quote]
    > >>
    > >> But the page at
    > >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > >> says it's available.
    > >>
    > >> What am I missing?
    > >>
    > >> Thank you.
    > >>
    > >>
    
    
    
    
  12. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:41:39Z

    David,
    
    On Sun, Mar 8, 2026 at 6:37 PM David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >>
    >>
    >> >>
    >> >> But the page at
    >> >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    >> >> says it's available.
    >> >>
    >> >> What am I missing?
    >
    >
    > Those are table storage parameters.
    >
    >>
    >> primary
    >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    >> autovacuum_enabled = on ));
    >> ERROR:  unrecognized parameter "autovacuum_enabled"
    >> draft=#
    >
    >
    > You are specifying index storage parameters here.
    >
    > The first paragraph of your linked section says:
    >
    > “Storage parameters for indexes are documented in CREATE INDEX.”
    >
    > You will find autovacuum_enabled is not listed there.  Because you can’t vacuum an index separately from its table.
    
    So I will have to compare the CREATE INDEX page with this one and
    figure out which one is supported where?
    
    Thank you.
    
    >
    > David J.
    >
    
    
    
    
  13. Re: CREATE TABLE fails

    Ron Johnson <ronljohnsonjr@gmail.com> — 2026-03-08T23:48:29Z

    On Sun, Mar 8, 2026 at 7:41 PM Igor Korot <ikorot01@gmail.com> wrote:
    
    > David,
    >
    > On Sun, Mar 8, 2026 at 6:37 PM David G. Johnston
    > <david.g.johnston@gmail.com> wrote:
    > >
    > > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    > >>
    > >>
    > >> >>
    > >> >> But the page at
    > >> >>
    > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    > >> >> says it's available.
    > >> >>
    > >> >> What am I missing?
    > >
    > >
    > > Those are table storage parameters.
    > >
    > >>
    > >> primary
    > >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    > >> autovacuum_enabled = on ));
    > >> ERROR:  unrecognized parameter "autovacuum_enabled"
    > >> draft=#
    > >
    > >
    > > You are specifying index storage parameters here.
    > >
    > > The first paragraph of your linked section says:
    > >
    > > “Storage parameters for indexes are documented in CREATE INDEX.”
    > >
    > > You will find autovacuum_enabled is not listed there.  Because you can’t
    > vacuum an index separately from its table.
    >
    > So I will have to compare the CREATE INDEX page with this one and
    > figure out which one is supported where?
    >
    
    Well, *yes*. Why should you be shocked that some storage parameters just
    aren't relevant to indices.
    
    -- 
    Death to <Redacted>, and butter sauce.
    Don't boil me, I'm still alive.
    <Redacted> lobster!
    
  14. CREATE TABLE fails

    David G. Johnston <david.g.johnston@gmail.com> — 2026-03-08T23:49:14Z

    On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >
    >
    > So the "WITH " clause is definitely available for indexes.
    >
    
    Yeah, given you aren’t getting a syntax error all this advice to change the
    syntax is wrong.  Though assuming you meant to apply it to the table was at
    least reasonable given the lack of confirmed intent statement for what the
    command should be doing.
    
    David J.
    
  15. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:55:40Z

    Ron,
    
    On Sun, Mar 8, 2026 at 6:48 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
    >
    > On Sun, Mar 8, 2026 at 7:41 PM Igor Korot <ikorot01@gmail.com> wrote:
    >>
    >> David,
    >>
    >> On Sun, Mar 8, 2026 at 6:37 PM David G. Johnston
    >> <david.g.johnston@gmail.com> wrote:
    >> >
    >> > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >> >>
    >> >>
    >> >> >>
    >> >> >> But the page at
    >> >> >> https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    >> >> >> says it's available.
    >> >> >>
    >> >> >> What am I missing?
    >> >
    >> >
    >> > Those are table storage parameters.
    >> >
    >> >>
    >> >> primary
    >> >> key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
    >> >> autovacuum_enabled = on ));
    >> >> ERROR:  unrecognized parameter "autovacuum_enabled"
    >> >> draft=#
    >> >
    >> >
    >> > You are specifying index storage parameters here.
    >> >
    >> > The first paragraph of your linked section says:
    >> >
    >> > “Storage parameters for indexes are documented in CREATE INDEX.”
    >> >
    >> > You will find autovacuum_enabled is not listed there.  Because you can’t vacuum an index separately from its table.
    >>
    >> So I will have to compare the CREATE INDEX page with this one and
    >> figure out which one is supported where?
    >
    >
    > Well, yes. Why should you be shocked that some storage parameters just aren't relevant to indices.
    
    I am, because they are documented as such according to the note
    I mentioned in the email above, quoting the "WITH " clause explanation.
    
    Thank you.
    
    >
    > --
    > Death to <Redacted>, and butter sauce.
    > Don't boil me, I'm still alive.
    > <Redacted> lobster!
    
    
    
    
  16. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-08T23:58:10Z

    David,
    
    On Sun, Mar 8, 2026 at 6:49 PM David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >>
    >>
    >> So the "WITH " clause is definitely available for indexes.
    >
    >
    > Yeah, given you aren’t getting a syntax error all this advice to change the syntax is wrong.  Though assuming you meant to apply it to the table was at least reasonable given the lack of confirmed intent statement for what the command should be doing.
    
    Thanks.
    It is a little confusing how it is written in the docs.
    
    But I'm not sure how to explain it better. ;-)
    
    
    >
    > David J.
    >
    
    
    
    
  17. Re: CREATE TABLE fails

    David G. Johnston <david.g.johnston@gmail.com> — 2026-03-09T00:04:43Z

    On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    
    > David,
    >
    > On Sun, Mar 8, 2026 at 6:49 PM David G. Johnston
    > <david.g.johnston@gmail.com> wrote:
    > >
    > > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    > >>
    > >>
    > >> So the "WITH " clause is definitely available for indexes.
    > >
    > >
    > > Yeah, given you aren’t getting a syntax error all this advice to change
    > the syntax is wrong.  Though assuming you meant to apply it to the table
    > was at least reasonable given the lack of confirmed intent statement for
    > what the command should be doing.
    >
    > Thanks.
    > It is a little confusing how it is written in the docs.
    >
    > But I'm not sure how to explain it better. ;-)
    >
    >
    Yeah, using the same term for two separate things isn’t ideal.  Using
    table_storage_parameters and index_storage_parameters separately, and
    directly pointing the later to the create index page, would probably be
    better than an overlookable single sentence in the big storage parameters
    paragraph.
    
    David J.
    
  18. Re: CREATE TABLE fails

    Igor Korot <ikorot01@gmail.com> — 2026-03-09T01:08:43Z

    David,
    
    On Sun, Mar 8, 2026 at 5:04 PM David G. Johnston <david.g.johnston@gmail.com>
    wrote:
    
    > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >
    >> David,
    >>
    >> On Sun, Mar 8, 2026 at 6:49 PM David G. Johnston
    >> <david.g.johnston@gmail.com> wrote:
    >> >
    >> > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >> >>
    >> >>
    >> >> So the "WITH " clause is definitely available for indexes.
    >> >
    >> >
    >> > Yeah, given you aren’t getting a syntax error all this advice to change
    >> the syntax is wrong.  Though assuming you meant to apply it to the table
    >> was at least reasonable given the lack of confirmed intent statement for
    >> what the command should be doing.
    >>
    >> Thanks.
    >> It is a little confusing how it is written in the docs.
    >>
    >> But I'm not sure how to explain it better. ;-)
    >>
    >>
    > Yeah, using the same term for two separate things isn’t ideal.  Using
    > table_storage_parameters and index_storage_parameters separately, and
    > directly pointing the later to the create index page, would probably be
    > better than an overlookable single sentence in the big storage parameters
    > paragraph.
    >
    
    I am not sure. But looking at the docs I point to it’s confusing.
    
    It doesn’t say that they are documented in CREATE INDEX.
    
    Maybe just add something like:
    
    “Those storage parameters are for table only. If you need ones for index -
    check CREATE INDEX page.”
    
    Maybe put that where the WITH clause is explained.
    
    This emphasizes the difference between them.
    
    What do you think?
    
    Thank you.
    
    
    > David J.
    >
    >
    
  19. Re: CREATE TABLE fails

    David G. Johnston <david.g.johnston@gmail.com> — 2026-03-09T01:13:50Z

    On Sun, Mar 8, 2026 at 5:04 PM David G. Johnston <david.g.johnston@gmail.com>
    wrote:
    
    > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >
    >> David,
    >>
    >> On Sun, Mar 8, 2026 at 6:49 PM David G. Johnston
    >> <david.g.johnston@gmail.com> wrote:
    >> >
    >> > On Sunday, March 8, 2026, Igor Korot <ikorot01@gmail.com> wrote:
    >> >>
    >> >>
    >> >> So the "WITH " clause is definitely available for indexes.
    >> >
    >> >
    >> > Yeah, given you aren’t getting a syntax error all this advice to change
    >> the syntax is wrong.  Though assuming you meant to apply it to the table
    >> was at least reasonable given the lack of confirmed intent statement for
    >> what the command should be doing.
    >>
    >> Thanks.
    >> It is a little confusing how it is written in the docs.
    >>
    >> But I'm not sure how to explain it better. ;-)
    >>
    >>
    > Yeah, using the same term for two separate things isn’t ideal.  Using
    > table_storage_parameters and index_storage_parameters separately, and
    > directly pointing the later to the create index page, would probably be
    > better than an overlookable single sentence in the big storage parameters
    > paragraph.
    >
    >
    Concretely (will send to -hackers later if needed):
    
    
    diff --git a/doc/src/sgml/ref/create_index.sgml
    b/doc/src/sgml/ref/create_index.sgml
    index bb7505d171b..d50c71c0a11 100644
    --- a/doc/src/sgml/ref/create_index.sgml
    +++ b/doc/src/sgml/ref/create_index.sgml
    
    
    For consistency with the changes made in create table.
    
    @@ -25,7 +25,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT
    EXISTS ] <replaceable class=
         ( { <replaceable class="parameter">column_name</replaceable> | (
    <replaceable class="parameter">expression</replaceable> ) } [ COLLATE
    <replaceable class="parameter">collation</replaceable> ] [ <replaceable
    class="parameter">opclass</replaceable> [ ( <replaceable
    class="parameter">opclass_parameter</replaceable> = <replaceable
    class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS
    { FIRST | LAST } ] [, ...] )
         [ INCLUDE ( <replaceable class="parameter">column_name</replaceable>
    [, ...] ) ]
         [ NULLS [ NOT ] DISTINCT ]
    -    [ WITH ( <replaceable
    class="parameter">storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) ]
    +    [ WITH ( <replaceable
    class="parameter">index_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) ]
         [ TABLESPACE <replaceable
    class="parameter">tablespace_name</replaceable> ]
         [ WHERE <replaceable class="parameter">predicate</replaceable> ]
     </synopsis>
    @@ -349,7 +349,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT
    EXISTS ] <replaceable class=
          </varlistentry>
    
          <varlistentry>
    -      <term><replaceable
    class="parameter">storage_parameter</replaceable></term>
    +      <term><replaceable
    class="parameter">index_storage_parameter</replaceable></term>
           <listitem>
            <para>
             The name of an index-method-specific storage parameter.  See
    
    
    This is just adding a documentation index entry where one is needed.
    
    @@ -385,6 +385,10 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT
    EXISTS ] <replaceable class=
       <refsect2 id="sql-createindex-storage-parameters" xreflabel="Index
    Storage Parameters">
        <title>Index Storage Parameters</title>
    
    + <indexterm zone="sql-createindex-storage-parameters">
    +  <primary>storage parameters</primary>
    + </indexterm>
    +
        <para>
         The optional <literal>WITH</literal> clause specifies
    <firstterm>storage
         parameters</firstterm> for the index.  Each index method has its own
    set
    
    
    diff --git a/doc/src/sgml/ref/create_table.sgml
    b/doc/src/sgml/ref/create_table.sgml
    index 982532fe725..acd61534265 100644
    --- a/doc/src/sgml/ref/create_table.sgml
    +++ b/doc/src/sgml/ref/create_table.sgml
    
    Distinguish in the synopsis the two sets of storage parameters in play here.
    
    @@ -30,7 +30,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } |
    UNLOGGED ] TABLE [ IF NOT EXI
     [ INHERITS ( <replaceable>parent_table</replaceable> [, ... ] ) ]
     [ PARTITION BY { RANGE | LIST | HASH } ( { <replaceable
    class="parameter">column_name</replaceable> | ( <replaceable
    class="parameter">expression</replaceable> ) } [ COLLATE <replaceable
    class="parameter">collation</replaceable> ] [ <replaceable
    class="parameter">opclass</replaceable> ] [, ... ] ) ]
     [ USING <replaceable class="parameter">method</replaceable> ]
    -[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [=
    <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT
    OIDS ]
    +[ WITH ( <replaceable
    class="parameter">table_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ]
     [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
     [ TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
    
    @@ -42,7 +42,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } |
    UNLOGGED ] TABLE [ IF NOT EXI
     ) ]
     [ PARTITION BY { RANGE | LIST | HASH } ( { <replaceable
    class="parameter">column_name</replaceable> | ( <replaceable
    class="parameter">expression</replaceable> ) } [ COLLATE <replaceable
    class="parameter">collation</replaceable> ] [ <replaceable
    class="parameter">opclass</replaceable> ] [, ... ] ) ]
     [ USING <replaceable class="parameter">method</replaceable> ]
    -[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [=
    <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT
    OIDS ]
    +[ WITH ( <replaceable
    class="parameter">table_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ]
     [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
     [ TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
    
    @@ -54,7 +54,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } |
    UNLOGGED ] TABLE [ IF NOT EXI
     ) ] { FOR VALUES <replaceable
    class="parameter">partition_bound_spec</replaceable> | DEFAULT }
     [ PARTITION BY { RANGE | LIST | HASH } ( { <replaceable
    class="parameter">column_name</replaceable> | ( <replaceable
    class="parameter">expression</replaceable> ) } [ COLLATE <replaceable
    class="parameter">collation</replaceable> ] [ <replaceable
    class="parameter">opclass</replaceable> ] [, ... ] ) ]
     [ USING <replaceable class="parameter">method</replaceable> ]
    -[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [=
    <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT
    OIDS ]
    +[ WITH ( <replaceable
    class="parameter">table_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ]
     [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
     [ TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
    
    @@ -100,7 +100,7 @@ WITH ( MODULUS <replaceable
    class="parameter">numeric_literal</replaceable>, REM
     <phrase><replaceable class="parameter">index_parameters</replaceable> in
    <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, and
    <literal>EXCLUDE</literal> constraints are:</phrase>
    
     [ INCLUDE ( <replaceable class="parameter">column_name</replaceable> [,
    ... ] ) ]
    -[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [=
    <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
    +[ WITH ( <replaceable
    class="parameter">index_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] ) ]
     [ USING INDEX TABLESPACE <replaceable
    class="parameter">tablespace_name</replaceable> ]
    
    
    Add the second variant in the description area consistent with the other
    multi-variant syntax blocks being documented here.
    Also mention and link to the index ones directly instead of only via the
    table storage parameters section.
    The comment about OIDS doesn't fit in with the paragraph about storage
    parameters, give it its own paragraph.
    
    @@ -1451,12 +1451,17 @@ WITH ( MODULUS <replaceable
    class="parameter">numeric_literal</replaceable>, REM
        </varlistentry>
    
        <varlistentry id="sql-createtable-parms-with">
    -    <term><literal>WITH ( <replaceable
    class="parameter">storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] )</literal></term>
    +    <term><literal>WITH ( <replaceable
    class="parameter">table_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] )</literal></term>
    +    <term><literal>WITH ( <replaceable
    class="parameter">index_storage_parameter</replaceable> [= <replaceable
    class="parameter">value</replaceable>] [, ... ] )</literal></term>
         <listitem>
          <para>
           This clause specifies optional storage parameters for a table or
    index;
           see <xref linkend="sql-createtable-storage-parameters"/> below for
    more
    -      information.  For backward-compatibility the <literal>WITH</literal>
    +      information on table storage parameters. For index storage parameters
    +      see <xref linkend="sql-createindex-storage-parameters"/>.
    +     </para>
    +     <para>
    +      For backward-compatibility the <literal>WITH</literal>
           clause for a table can also include <literal>OIDS=FALSE</literal> to
           specify that rows of the new table should not contain OIDs (object
           identifiers), <literal>OIDS=TRUE</literal> is not supported anymore.
    
    We already name Index Storage Parameters, we should add "Table" here.
    
    @@ -1555,8 +1560,8 @@ WITH ( MODULUS <replaceable
    class="parameter">numeric_literal</replaceable>, REM
    
       </variablelist>
    
    -  <refsect2 id="sql-createtable-storage-parameters" xreflabel="Storage
    Parameters">
    -   <title>Storage Parameters</title>
    +  <refsect2 id="sql-createtable-storage-parameters" xreflabel="Table
    Storage Parameters">
    +   <title>Table Storage Parameters</title>
    
      <indexterm zone="sql-createtable-storage-parameters">
       <primary>storage parameters</primary>
    
    And point to the actual storage parameter section directly instead of the
    whole page.
    
    @@ -1567,7 +1572,7 @@ WITH ( MODULUS <replaceable
    class="parameter">numeric_literal</replaceable>, REM
         for tables, and for indexes associated with a
    <literal>UNIQUE</literal>,
         <literal>PRIMARY KEY</literal>, or <literal>EXCLUDE</literal>
    constraint.
         Storage parameters for
    -    indexes are documented in <xref linkend="sql-createindex"/>.
    +    indexes are documented in <xref
    linkend="sql-createindex-storage-parameters"/>
         The storage parameters currently
         available for tables are listed below.  For many of these parameters,
    as
         shown, there is an additional parameter with the same name prefixed
    with
    
    
    
    We continue to speak of "storage parameters" in each page without
    qualification, just adding table/index for titles and syntax labels for the
    specific clarity needed in those cases.
    
    David J.
    
  20. Re: CREATE TABLE fails

    Adrian Klaver <adrian.klaver@aklaver.com> — 2026-03-09T01:22:12Z

    On 3/8/26 6:08 PM, Igor Korot wrote:
    > David,
    > 
    
    > I am not sure. But looking at the docs I point to it’s confusing.
    > 
    > It doesn’t say that they are documented in CREATE INDEX.
    > 
    > Maybe just add something like:
    > 
    > “Those storage parameters are for table only. If you need ones for index 
    > - check CREATE INDEX page.”
    
    I thought it already did:
    
    https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
    
    "Storage Parameters
    
    The WITH clause can specify storage parameters for tables, and for 
    indexes associated with a UNIQUE, PRIMARY KEY, or EXCLUDE constraint. 
    Storage parameters for indexes are documented in CREATE INDEX. The 
    storage parameters currently available for tables are listed below. ..."
    
    > 
    > Maybe put that where the WITH clause is explained.
    > 
    > This emphasizes the difference between them.
    > 
    > What do you think?
    > 
    > Thank you.
    > 
    > 
    >     David J.
    > 
    
    
    -- 
    Adrian Klaver
    adrian.klaver@aklaver.com
    
    
    
    
  21. Re: CREATE TABLE fails

    Christoph Moench-Tegeder <cmt@burggraben.net> — 2026-03-09T07:18:25Z

    ## Igor Korot (ikorot01@gmail.com):
    
    > > It's available as a TABLE storage parameter, but you put it on the index
    > > definition (where it's not valid) - this could be a conceptual mistake
    > > or a misplaced right parenthesis.
    > > See the example on your linked page:
    > > https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS:~:text=fill%20factor%20for%20both%20the%20table%20and%20its%20unique%20index
    > 
    > Please check the PRIMARY KEY clause on that same linked page.
    > It says "Storage Parameters" are definitely supported there.
    
    As I wrote earlier: autovacuum_enabled is not a valid storage parameter
    for indexes. The exact sentence after the one you're refering to tells
    you that "Storage parameters for indexes are documented in CREATE INDEX"
    and autovacuum_enabled is not documented there - it's valid for tables
    only. (On the other hand, there are index storage parameters which are
    not available for tables - they might make no sense on a table or refer
    to specific index types only).
    
    Regards,
    Christoph
    
    -- 
    Spare Space.