public inbox for [email protected]  
help / color / mirror / Atom feed
CREATE TABLE fails
10+ messages / 4 participants
[nested] [flat]

* CREATE TABLE fails
@ 2026-03-08 22:10 Igor Korot <[email protected]>
  2026-03-08 22:29 ` Re: CREATE TABLE fails Christoph Moench-Tegeder <[email protected]>
  2026-03-08 22:29 ` Re: CREATE TABLE fails Ron Johnson <[email protected]>
  2026-03-08 22:40 ` Re: CREATE TABLE fails Sahul Hameed <[email protected]>
  2026-03-08 23:18 ` Re: CREATE TABLE fails Igor Korot <[email protected]>
  0 siblings, 4 replies; 10+ messages in thread

From: Igor Korot @ 2026-03-08 22:10 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

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.






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
@ 2026-03-08 22:29 ` Christoph Moench-Tegeder <[email protected]>
  2026-03-08 22:32   ` Re: CREATE TABLE fails Ron Johnson <[email protected]>
  2026-03-08 23:28   ` Re: CREATE TABLE fails Igor Korot <[email protected]>
  3 siblings, 2 replies; 10+ messages in thread

From: Christoph Moench-Tegeder @ 2026-03-08 22:29 UTC (permalink / raw)
  To: Igor Korot <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>

## Igor Korot ([email protected]):

> [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=fi...

Regards,
Christoph

-- 
Spare Space






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
  2026-03-08 22:29 ` Re: CREATE TABLE fails Christoph Moench-Tegeder <[email protected]>
@ 2026-03-08 22:32   ` Ron Johnson <[email protected]>
  1 sibling, 0 replies; 10+ messages in thread

From: Ron Johnson @ 2026-03-08 22:32 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

On Sun, Mar 8, 2026 at 6:29 PM Christoph Moench-Tegeder <[email protected]>
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!


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
  2026-03-08 22:29 ` Re: CREATE TABLE fails Christoph Moench-Tegeder <[email protected]>
@ 2026-03-08 23:28   ` Igor Korot <[email protected]>
  1 sibling, 0 replies; 10+ messages in thread

From: Igor Korot @ 2026-03-08 23:28 UTC (permalink / raw)
  To: Christoph Moench-Tegeder <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>

Christoph,

On Sun, Mar 8, 2026 at 5:29 PM Christoph Moench-Tegeder
<[email protected]> wrote:
>
> ## Igor Korot ([email protected]):
>
> > [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=fi...

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






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
@ 2026-03-08 22:29 ` Ron Johnson <[email protected]>
  2026-03-08 23:30   ` Re: CREATE TABLE fails Igor Korot <[email protected]>
  3 siblings, 1 reply; 10+ messages in thread

From: Ron Johnson @ 2026-03-08 22:29 UTC (permalink / raw)
  To: Igor Korot <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>

On Sun, Mar 8, 2026 at 6:10 PM Igor Korot <[email protected]> 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!


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
  2026-03-08 22:29 ` Re: CREATE TABLE fails Ron Johnson <[email protected]>
@ 2026-03-08 23:30   ` Igor Korot <[email protected]>
  0 siblings, 0 replies; 10+ messages in thread

From: Igor Korot @ 2026-03-08 23:30 UTC (permalink / raw)
  To: Ron Johnson <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>

Ron,

On Sun, Mar 8, 2026 at 5:30 PM Ron Johnson <[email protected]> wrote:
>
> On Sun, Mar 8, 2026 at 6:10 PM Igor Korot <[email protected]> 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!






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
@ 2026-03-08 22:40 ` Sahul Hameed <[email protected]>
  2026-03-08 23:32   ` Re: CREATE TABLE fails Igor Korot <[email protected]>
  3 siblings, 1 reply; 10+ messages in thread

From: Sahul Hameed @ 2026-03-08 22:40 UTC (permalink / raw)
  To: Igor Korot <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>

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 <[email protected]> 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.
>
>
>


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
  2026-03-08 22:40 ` Re: CREATE TABLE fails Sahul Hameed <[email protected]>
@ 2026-03-08 23:32   ` Igor Korot <[email protected]>
  2026-03-08 23:38     ` Re: CREATE TABLE fails Igor Korot <[email protected]>
  0 siblings, 1 reply; 10+ messages in thread

From: Igor Korot @ 2026-03-08 23:32 UTC (permalink / raw)
  To: Sahul Hameed <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>

Sahul,

On Sun, Mar 8, 2026 at 5:40 PM Sahul Hameed <[email protected]> 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 <[email protected]> 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.
>>
>>






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
  2026-03-08 22:40 ` Re: CREATE TABLE fails Sahul Hameed <[email protected]>
  2026-03-08 23:32   ` Re: CREATE TABLE fails Igor Korot <[email protected]>
@ 2026-03-08 23:38     ` Igor Korot <[email protected]>
  0 siblings, 0 replies; 10+ messages in thread

From: Igor Korot @ 2026-03-08 23:38 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

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 <[email protected]> wrote:
>
> Sahul,
>
> On Sun, Mar 8, 2026 at 5:40 PM Sahul Hameed <[email protected]> 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 <[email protected]> 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.
> >>
> >>






^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: CREATE TABLE fails
  2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
@ 2026-03-08 23:18 ` Igor Korot <[email protected]>
  3 siblings, 0 replies; 10+ messages in thread

From: Igor Korot @ 2026-03-08 23:18 UTC (permalink / raw)
  To: Ray O'Donnell <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>

Ray,

On Sun, Mar 8, 2026 at 5:26 PM Ray O'Donnell <[email protected]> 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 <[email protected]> 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.
>>
>
>


^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2026-03-08 23:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-08 22:10 CREATE TABLE fails Igor Korot <[email protected]>
2026-03-08 22:29 ` Christoph Moench-Tegeder <[email protected]>
2026-03-08 22:32   ` Ron Johnson <[email protected]>
2026-03-08 23:28   ` Igor Korot <[email protected]>
2026-03-08 22:29 ` Ron Johnson <[email protected]>
2026-03-08 23:30   ` Igor Korot <[email protected]>
2026-03-08 22:40 ` Sahul Hameed <[email protected]>
2026-03-08 23:32   ` Igor Korot <[email protected]>
2026-03-08 23:38     ` Igor Korot <[email protected]>
2026-03-08 23:18 ` Igor Korot <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox