Automatic renaming of interval fragment identifiers

Some ALTER FRAGMENT operations can change the positional order of existing interval fragments within the fragment list. In these cases, the database server automatically updates the system-defined names of the affected interval fragments.

For tables partitioned by an interval fragmentation scheme, ALTER FRAGMENT operations that add, drop, attach, or detach fragments, or that modify the transition value of the table, can change the sysfragments.evalpos values for existing interval fragments, or can change an interval fragment to a range fragment. To avoid creating new interval fragments with the same system-generated name as an interval fragment that the ALTER FRAGMENT statement has repositioned within the fragment list, the database server automatically replaces the original system-defined names with new identifiers that will not match the names of subsequently created interval fragments of the same table.

The general rules used for system generated range and interval fragment names are as follows:
  • For interval fragments: sys_evalpos
  • For range fragments: sys_evalposrg
Here evalpos is the numeric (ordinal) value of sysfragments.evalpos, where 0 is the evalpos value for the first fragment in the fragment list.

During a fragment renaming operation, an exclusive lock is placed on the fragment while the sysfragments system catalog is being updated with the new partition names, and with new evalpos values for any fragments whose ordinal positions within the fragment list changed during the ALTER FRAGMENT operation.

To avoid declaring non-unique fragment names when new interval fragments are created, the database server renames only system-generated identifiers of interval fragment that are repositioned during ALTER FRAGMENT operations. Automatic renaming does not occur for user-defined identifiers of repositioned fragments.

If you wish to avoid having existing fragments automatically renamed during ALTER FRAGMENT ONLINE ATTACH statements, or during other ALTER FRAGMENT operations on tables that use interval partitioning, you can first use the ALTER FRAGMENT MODIFY statement to rename with user-defined names the interval fragments whose system-generated names might otherwise be changed by the ALTER FRAGMENT operation. User-defined fragment names cannot begin with the string sys_.