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

Improve docs on PostgreSQL Extensions #1433

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,24 @@

namespace FluentMigrator.Builder.Create.Index
{
/// <summary>
/// The buffering options
/// </summary>
public enum GistBuffering
{
/// <summary>
/// It is initially disabled, but turned on on-the-fly.
/// </summary>
Auto,

/// <summary>
/// Enabled buffering
/// </summary>
On,
Off,
Auto

jzabroski marked this conversation as resolved.
Show resolved Hide resolved
/// <summary>
/// Disabled buffering
/// </summary>
Off
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ public interface ICreateGiSTIndexOptionsSyntax : ICreateIndexMethodOptionsSyntax
new ICreateGiSTIndexOptionsSyntax Fillfactor(int fillfactor);

/// <summary>
/// Building large GiST indexes by simply inserting all the tuples tends to be slow, because if the index tuples are scattered across the index and the index is large enough to not fit in cache, the insertions need to perform a lot of random I/O.
/// Building large GiST indexes by simply inserting all the tuples tends to be slow, because if the index
/// tuples are scattered across the index and the index is large enough to not fit in cache, the insertions need
/// to perform a lot of random I/O.
/// For more information about it see: https://www.postgresql.org/docs/current/gist-implementation.html#GIST-BUFFERING-BUILD
/// </summary>
/// <param name="buffering">The buffering value.</param>
/// <param name="buffering">The <see cref="GistBuffering"/> value.</param>
/// <returns>The next step</returns>
ICreateGiSTIndexOptionsSyntax Buffering(GistBuffering buffering);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static partial class PostgresExtensions

/// <summary>
/// The constraint expression for a partial index.
/// For more information about partial index see: https://www.postgresql.org/docs/current/indexes-partial.html
/// </summary>
/// <param name="expression"></param>
/// <param name="filter">The constraint expression</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace FluentMigrator.Postgres
{
public static partial class PostgresExtensions
{

/// <summary>
/// The fillfactor for an index is a percentage that determines how full the index method will try to pack index pages.
/// </summary>
Expand All @@ -44,38 +43,5 @@ public static ICreateBTreeIndexOptionsSyntax Fillfactor(this ICreateIndexOptions
return expression.UsingBTree()
.Fillfactor(fillfactor) as ICreateBTreeIndexOptionsSyntax;
}

jzabroski marked this conversation as resolved.
Show resolved Hide resolved
#region BRIN
public const string IndexPagesPerRange = "PostgresBrinPagesPerRange";

/// <summary>
/// Exclusive for BRIN index. Defines the number of table blocks that make up one block range for each entry of a BRIN index.
/// For more information about it see: https://www.postgresql.org/docs/current/brin-intro.html
/// </summary>
/// <param name="expression"></param>
/// <param name="range">The page per range</param>
/// <returns>The next step</returns>
public static ICreateIndexOptionsSyntax PagesPerRange(this ICreateIndexOptionsSyntax expression, int range)
{
var additionalFeatures = expression as ISupportAdditionalFeatures;
additionalFeatures.SetAdditionalFeature(IndexPagesPerRange, range);
return expression;
}

public const string IndexAutosummarize = "PostgresBrinautosummarize";

/// <summary>
/// Exclusive for BRIN index. Defines whether a summarization run is invoked for the previous page range whenever an insertion is detected on the next one.
/// </summary>
/// <param name="expression"></param>
/// <param name="autosummarize">True to enable fast autosummarize or false to disable.</param>
/// <returns>The next step</returns>
public static ICreateIndexOptionsSyntax Autosummarize(this ICreateIndexOptionsSyntax expression, bool autosummarize)
{
var additionalFeatures = expression as ISupportAdditionalFeatures;
additionalFeatures.SetAdditionalFeature(IndexAutosummarize, autosummarize);
return expression;
}
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public static partial class PostgresExtensions
public const string IndexFastUpdate = "PostgresGinFastUpdate";
public const string IndexGinPendingListLimit = "PostgresGinPendingListLimit";
public const string IndexBuffering = "PostgresGiSTBuffering";
public const string IndexPagesPerRange = "PostgresBrinPagesPerRange";
public const string IndexAutosummarize = "PostgresBrinautosummarize";

/// <summary>
/// Column identity generation ability for PostgreSQL 10 and above
Expand Down