Thread: Fill factor cannot be modified

Fill factor cannot be modified

From
Thom Brown
Date:
Hi,

I'm using PgAdmin III 1.14.0 beta 1 and noticed that if I go into the
properties dialog box for a table, the Fill Factor field cannot be
modified.  I've manually altered a table so that the fill factor is
set to a valid value, re-checked the properties box and can see my new
value in the Fill Factor field.  However, it still cannot be modified.

Also, the properties dialog box for a primary key also has a Fill
Factor field, and values can be entered into it, but the OK button
stays greyed out and the SQL tab shows nothing to be changed.

Thanks

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Fill factor cannot be modified

From
Dave Page
Date:
On Thu, Jun 16, 2011 at 2:45 PM, Thom Brown <thom@linux.com> wrote:
> Hi,
>
> I'm using PgAdmin III 1.14.0 beta 1 and noticed that if I go into the
> properties dialog box for a table, the Fill Factor field cannot be
> modified.  I've manually altered a table so that the fill factor is
> set to a valid value, re-checked the properties box and can see my new
> value in the Fill Factor field.  However, it still cannot be modified.

This appears to be a missing feature. We need to add code to support
adjustment of the fill factor on existing tables.

> Also, the properties dialog box for a primary key also has a Fill
> Factor field, and values can be entered into it, but the OK button
> stays greyed out and the SQL tab shows nothing to be changed.

That has the same issue, plus a bug which leaves the field enabled.
I'll push a fix for the bug - a patch would be cool for the new
feature though :-p

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Fill factor cannot be modified

From
Thom Brown
Date:
On 16 June 2011 15:41, Dave Page <dpage@pgadmin.org> wrote:
> On Thu, Jun 16, 2011 at 2:45 PM, Thom Brown <thom@linux.com> wrote:
>> Hi,
>>
>> I'm using PgAdmin III 1.14.0 beta 1 and noticed that if I go into the
>> properties dialog box for a table, the Fill Factor field cannot be
>> modified.  I've manually altered a table so that the fill factor is
>> set to a valid value, re-checked the properties box and can see my new
>> value in the Fill Factor field.  However, it still cannot be modified.
>
> This appears to be a missing feature. We need to add code to support
> adjustment of the fill factor on existing tables.
>
>> Also, the properties dialog box for a primary key also has a Fill
>> Factor field, and values can be entered into it, but the OK button
>> stays greyed out and the SQL tab shows nothing to be changed.
>
> That has the same issue, plus a bug which leaves the field enabled.
> I'll push a fix for the bug - a patch would be cool for the new
> feature though :-p

Very well then.  Dodgy patch attached.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: Fill factor cannot be modified

From
Thom Brown
Date:
On 17 June 2011 18:16, Thom Brown <thom@linux.com> wrote:
> On 16 June 2011 15:41, Dave Page <dpage@pgadmin.org> wrote:
>> On Thu, Jun 16, 2011 at 2:45 PM, Thom Brown <thom@linux.com> wrote:
>>> Hi,
>>>
>>> I'm using PgAdmin III 1.14.0 beta 1 and noticed that if I go into the
>>> properties dialog box for a table, the Fill Factor field cannot be
>>> modified.  I've manually altered a table so that the fill factor is
>>> set to a valid value, re-checked the properties box and can see my new
>>> value in the Fill Factor field.  However, it still cannot be modified.
>>
>> This appears to be a missing feature. We need to add code to support
>> adjustment of the fill factor on existing tables.
>>
>>> Also, the properties dialog box for a primary key also has a Fill
>>> Factor field, and values can be entered into it, but the OK button
>>> stays greyed out and the SQL tab shows nothing to be changed.
>>
>> That has the same issue, plus a bug which leaves the field enabled.
>> I'll push a fix for the bug - a patch would be cool for the new
>> feature though :-p
>
> Very well then.  Dodgy patch attached.

And again without ugly whitespace.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: Fill factor cannot be modified

From
Thom Brown
Date:
On 17 June 2011 18:18, Thom Brown <thom@linux.com> wrote:
> On 17 June 2011 18:16, Thom Brown <thom@linux.com> wrote:
>> On 16 June 2011 15:41, Dave Page <dpage@pgadmin.org> wrote:
>>> On Thu, Jun 16, 2011 at 2:45 PM, Thom Brown <thom@linux.com> wrote:
>>>> Hi,
>>>>
>>>> I'm using PgAdmin III 1.14.0 beta 1 and noticed that if I go into the
>>>> properties dialog box for a table, the Fill Factor field cannot be
>>>> modified.  I've manually altered a table so that the fill factor is
>>>> set to a valid value, re-checked the properties box and can see my new
>>>> value in the Fill Factor field.  However, it still cannot be modified.
>>>
>>> This appears to be a missing feature. We need to add code to support
>>> adjustment of the fill factor on existing tables.
>>>
>>>> Also, the properties dialog box for a primary key also has a Fill
>>>> Factor field, and values can be entered into it, but the OK button
>>>> stays greyed out and the SQL tab shows nothing to be changed.
>>>
>>> That has the same issue, plus a bug which leaves the field enabled.
>>> I'll push a fix for the bug - a patch would be cool for the new
>>> feature though :-p
>>
>> Very well then.  Dodgy patch attached.
>
> And again without ugly whitespace.

Erk... just been trying to break it and found that this generates the
alter statement every time once the value has been set, so fixed that
too (attached).

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: Fill factor cannot be modified

From
Dave Page
Date:
On Fri, Jun 17, 2011 at 6:39 PM, Thom Brown <thom@linux.com> wrote:
> On 17 June 2011 18:18, Thom Brown <thom@linux.com> wrote:
>> On 17 June 2011 18:16, Thom Brown <thom@linux.com> wrote:
>>
>>> Very well then.  Dodgy patch attached.
>>
>> And again without ugly whitespace.
>
> Erk... just been trying to break it and found that this generates the
> alter statement every time once the value has been set, so fixed that
> too (attached).

LOL. The patch looks great as far as it goes - not at all dodgy. It
currently only affects tables though - you need to do roughly the same
thing in dlgIndex.cpp and dlgIndexConstraint.cpp to cover the cases
you reported :-)

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Fill factor cannot be modified

From
Thom Brown
Date:
On 20 June 2011 11:00, Dave Page <dpage@pgadmin.org> wrote:
> On Fri, Jun 17, 2011 at 6:39 PM, Thom Brown <thom@linux.com> wrote:
>> On 17 June 2011 18:18, Thom Brown <thom@linux.com> wrote:
>>> On 17 June 2011 18:16, Thom Brown <thom@linux.com> wrote:
>>>
>>>> Very well then.  Dodgy patch attached.
>>>
>>> And again without ugly whitespace.
>>
>> Erk... just been trying to break it and found that this generates the
>> alter statement every time once the value has been set, so fixed that
>> too (attached).
>
> LOL. The patch looks great as far as it goes - not at all dodgy. It
> currently only affects tables though - you need to do roughly the same
> thing in dlgIndex.cpp and dlgIndexConstraint.cpp to cover the cases
> you reported :-)

Okay, updated patch attached.  This enables modification of fill
factor on existing tables and primary keys.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: Fill factor cannot be modified

From
Dave Page
Date:
On Mon, Jun 20, 2011 at 2:42 PM, Thom Brown <thom@linux.com> wrote:
>
> Okay, updated patch attached.  This enables modification of fill
> factor on existing tables and primary keys.

Thanks Thom - patch applied with one minor fix (you missed an &&).

Congrats on being the first change in what will be 1.16 :-)

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Fill factor cannot be modified

From
Thom Brown
Date:
On 20 June 2011 20:20, Dave Page <dpage@pgadmin.org> wrote:
> On Mon, Jun 20, 2011 at 2:42 PM, Thom Brown <thom@linux.com> wrote:
>>
>> Okay, updated patch attached.  This enables modification of fill
>> factor on existing tables and primary keys.
>
> Thanks Thom - patch applied with one minor fix (you missed an &&).

Erk, how the hell did that go missing?! :S

> Congrats on being the first change in what will be 1.16 :-)

W00t!  Thanks Dave.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company