Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PCTFREE to FILLFACTOR conversion #673

Merged
merged 1 commit into from Aug 12, 2018
Merged

Conversation

Maxime2
Copy link
Contributor

@Maxime2 Maxime2 commented Aug 12, 2018

I see conversion PCTFREE to FILLFACTOR has been semi-implemented for parsing schema from an input file, though a bit incorrect. This pull-request fix it and makes conversion PCTFREE to FILLFACTOR for reading schema directly from Oracle DB.

@darold darold merged commit e76cecb into darold:master Aug 12, 2018
@darold
Copy link
Owner

darold commented Aug 15, 2018

Hi Maxim,

For your information commit c699fd6 change the behavior of your patch:

Limit translation of PCTFREE into FILLFACTOR when PCTFREE is upper than the
Oracle default value: 10. With PostgreSQL 100 (complete packing) is the default.

I think it is important to preserve the default bevahior related to each SGBD.

Regards,

@Maxime2 Maxime2 deleted the _pctfree branch August 16, 2018 11:21
@Maxime2
Copy link
Contributor Author

Maxime2 commented Aug 16, 2018

Hi Gilles,

PCTFREE and FILLFACTOR are complementary to the value of 100% for each other, i.e.
FILLFACTOR = 100 - PCTFREE

Since FILLFACTOR must be 10 or more, then 100 - min(90, PCTFREE) ensures FILLFACTOR >= 10 as 90 is the maximum value of min(90, PCTFREE).

And thus additional check in if statement around it is redundant.

@darold
Copy link
Owner

darold commented Aug 16, 2018

Yes I know. The problem is that Oracle have a default PCTFREE to 10% but PostgreSQL have a default FILLFACTOR to 100%. With your patch that mean that all PostgreSQL tables will have a FILLFACTOR to 90 which is not exactly the default for PostgreSQL. My patch just apply your FILLFACTOR conversion when PCTFREE > 10.

For people who want to force the default to 90 we can add a configuration directive that can force the FILLFACTOR to the wanted value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants