Skip to content

Releases: mfvanek/pg-index-health

v.0.30.2

02 Dec 18:48
d60bd49

Choose a tag to compare

What's Changed

Full Changelog: v.0.30.1...v.0.30.2

v.0.30.1

29 Nov 15:08
cc2e01f

Choose a tag to compare

What's Changed

  • Next development iteration 0.30.1 by @mfvanek in #736
  • Bump io.github.classgraph:classgraph from 4.8.181 to 4.8.184 by @dependabot[bot] in #737
  • Bump org.junit:junit-bom from 6.0.0 to 6.0.1 by @dependabot[bot] in #743
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.2 to 4.2.1 by @dependabot[bot] in #742
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.2.1 to 4.2.2 by @dependabot[bot] in #748
  • Bump io.freefair.lombok from 9.0.0 to 9.1.0 by @dependabot[bot] in #749
  • Fix bloat calculation on indexes in partitioned tables by @mfvanek in #750
  • Add new check "Don't use char(n)" [pgwiki] [squawk] by @mfvanek in #751
  • Add support for Spring Boot 4 by @mfvanek in #755
  • Add tests to ensure that Jackson 2 is supported by @mfvanek in #757
  • Add ArchUnit tests for auto-configuration by @mfvanek in #758
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.2.2 to 4.2.3 by @dependabot[bot] in #762
  • Bump actions/checkout from 5 to 6 by @dependabot[bot] in #759
  • Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0 by @dependabot[bot] in #761
  • Bump com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin from 0.34.0 to 0.35.0 by @dependabot[bot] in #763
  • Add a check "Don't use table inheritance" [pgwiki] by @mfvanek in #765

Full Changelog: v.0.30.0...v.0.30.1

v.0.30.0

12 Oct 07:51
d718fc7

Choose a tag to compare

Important updates

  • The project has been moved to Gradle 9
  • The Spring Boot version has been updated to version 3.4.10
  • Added support for PostgreSQL 18
  • Added the ability to write custom checks. More details in the documentation

Breaking changes

  • DatabaseChecksOnCluster class has been renamed to StandardChecksOnCluster and moved to io.github.mfvanek.pg.health.checks.cluster package of pg-index-health module.
    Now it implements Function<HighAvailabilityPgConnection, List<DatabaseCheckOnCluster<? extends DbObject>>>.
  • The getAll() method has beed removed from the StandardChecksOnCluster class.
  • The getDuplicatedIndexes() method has beed removed from DuplicatedIndexes class. Use getIndexes() instead
  • For checks
    • ColumnsWithFixedLengthVarcharCheckOnHost, ColumnsWithJsonTypeCheckOnHost, ColumnsWithMoneyTypeCheckOnHost
      and corresponding
    • ColumnsWithFixedLengthVarcharCheckOnCluster, ColumnsWithJsonTypeCheckOnCluster, ColumnsWithMoneyTypeCheckOnCluster
      the target model type has been changed from Column to ColumnWithType
  • ExecutionTopology enum has been extracted from Diagnostic enum
  • Added the new TopologyAware interface
  • Added the new CheckInfo interface
  • Added the new CheckNameAware interface. Now each check must have a name.
    You need to update the standard test according to the documentation
  • DiagnosticAware interface has been removed.
  • A new class StandardChecksOnHost has been added.
  • Reworked PostgreSqlClusterWrapper and added support for custom Bitnami images

A full examples of upgrading to the new version can be found here or here

What's Changed

  • Prepare for the next iteration by @mfvanek in #719
  • Migrate to Spring Boot 3.4.x and Gradle 9 by @mfvanek in #720
  • Remove all deprecated methods and change signature for some checks by @mfvanek in #721
  • Bump io.freefair.lombok from 8.14.2 to 9.0.0 by @dependabot[bot] in #722
  • Prepare for custom checks by @mfvanek in #723
  • Added StandardChecksOnHost class by @mfvanek in #724
  • Add support for PostgreSQL 18 by @mfvanek in #725
  • CheckInfo should provide an SQL query by @mfvanek in #726
  • Add StandardCheckInfo by @mfvanek in #727
  • Bump org.junit:junit-bom from 5.13.4 to 6.0.0 by @dependabot[bot] in #730
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.1.1 to 4.2 by @dependabot[bot] in #733
  • Bump org.liquibase:liquibase-core from 4.33.0 to 5.0.1 by @dependabot[bot] in #732
  • Bump de.thetaphi:forbiddenapis from 3.9 to 3.10 by @dependabot[bot] in #731
  • Add extractors for all standard models by @mfvanek in #734
  • Rework AbstractCheckOnHost and make internal fields accessible in child classes by @mfvanek in #735

Full Changelog: v.0.20.3...v.0.30.0

v.0.20.3

28 Sep 08:26
1ae0053

Choose a tag to compare

What's Changed

  • Next development iteration v0.20.3 by @mfvanek in #677
  • Bump org.testcontainers:testcontainers-bom from 1.21.2 to 1.21.3 by @dependabot[bot] in #679
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.0.2 to 4.0.3 by @dependabot[bot] in #680
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.0.3 to 4.0.4 by @dependabot[bot] in #682
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.0.4 to 4.0.6 by @dependabot[bot] in #687
  • Bump org.liquibase:liquibase-core from 4.32.0 to 4.33.0 by @dependabot[bot] in #684
  • Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0 by @dependabot[bot] in #685
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.0.6 to 4.0.7 by @dependabot[bot] in #690
  • Bump actions/checkout from 4 to 5 by @dependabot[bot] in #693
  • Make all model serializable to Json by @mfvanek in #688
  • Add a publishing guide by @mfvanek in #697
  • Bump actions/setup-java from 4 to 5 by @dependabot[bot] in #700
  • Add a new check to prefer timestamptz instead of timestamp [pgwiki] by @mfvanek in #702
  • Fix deserialization of invalid jsons by @mfvanek in #704
  • Bump nl.jqno.equalsverifier:equalsverifier from 4.0.9 to 4.1 by @dependabot[bot] in #706
  • Add new rules to detekt by @mfvanek in #709
  • Bump org.postgresql:postgresql from 42.7.7 to 42.7.8 by @dependabot[bot] in #712
  • Add a check for tables where the primary key columns are not first [schemacrawler] by @mfvanek in #715
  • Add a new check "Tables that have all columns besides the primary key that are nullable" [schemacrawler] by @mfvanek in #716
  • Add javadoc by @mfvanek in #718

Added a new module pg-index-health-model-jackson-module

To use it in your Spring Boot application:

  1. Add a new dependency
dependencies {
    implementation("io.github.mfvanek:pg-index-health-model-jackson-module")
}
  1. Attach a new PgIndexHealthModelModule to your Jackson
import io.github.mfvanek.pg.model.jackson.PgIndexHealthModelModule;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class JacksonConfig {

    @Bean
    public Jackson2ObjectMapperBuilderCustomizer customizer() {
        return builder -> builder.modulesToInstall(new PgIndexHealthModelModule());
    }
}

Full Changelog: v.0.20.2...v.0.20.3

v.0.20.2

26 Jun 14:25
01912a2

Choose a tag to compare

What's Changed

  • Next development iteration v.0.20.2 by @mfvanek in #664
  • OSSRH Migration by @mfvanek in #667
  • Update description and add a list of similar solutions by @mfvanek in #670
  • Bump com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin from 0.32.0 to 0.33.0 by @dependabot in #676
  • Bump io.freefair.lombok from 8.13.1 to 8.14 by @dependabot in #673
  • Bump org.testcontainers:testcontainers-bom from 1.21.1 to 1.21.2 by @dependabot in #674
  • Add check for indexes "timestamp in the middle" by @mfvanek in #671

Full Changelog: v.0.20.1...v.0.20.2

v.0.20.1

16 Jun 18:42
737c35a

Choose a tag to compare

What's Changed

Full Changelog: v.0.20.0...v.0.20.1

v.0.20.0

13 Jun 08:47
8309e53

Choose a tag to compare

Breaking changes

  • Upgraded Java baseline to Java 17
  • Migrated starter to Spring Boot 3.3

What's Changed

  • Next development iteration 0.20.0 by @mfvanek in #654
  • Upgrade Java baseline to Java 17 and migrate starter to Spring Boot 3 by @mfvanek in #655
  • Update EqualsVerifier to 4.x by @mfvanek in #656
  • Migration generator. Try to handle duplicated objects by @mfvanek in #657
  • Extend documentation and Standard test with filtering examples by @mfvanek in #658

Full Changelog: v.0.15.0...v.0.20.0

v.0.15.0

07 Jun 17:43
c6cc0c5

Choose a tag to compare

Breaking changes in API

  1. Deleted getColumnsInConstraint() method in ForeignKey.
    • Use getColumns() instead.
  2. Deleted ConfigurationAware interface and all related classes
  3. Deleted PgParam interface an all related classes
    Remove usages of
    • io.github.mfvanek.pg.model.settings.PgParam
    • io.github.mfvanek.pg.model.settings.PgParamImpl
    • io.github.mfvanek.pg.model.settings.ServerSpecification
    • io.github.mfvanek.pg.core.settings.ConfigurationMaintenanceOnHostImpl
      This API is no longer supported.
  4. Replace all ofPublic() calls with ofDefault()
  5. IndexWithSize class was deleted.
    • Rename IndexWithSize to Index.
  6. IndexWithNulls class was deleted.
    • Replace all IndexWithNulls.of calls with IndexWithColumns.ofNullable.
    • Replace all getNullableColumn() calls with getFirstColumn().
    • Rename IndexWithNulls to IndexWithColumns.
  7. Removed slf4j and logback dependencies
  8. Deleted class KeyValueFileHealthLogger. Use StandardHealthLogger instead or implement KeyValueFileHealthLogger yourself as shown below:
import io.github.mfvanek.pg.connection.HighAvailabilityPgConnection;
import io.github.mfvanek.pg.connection.factory.ConnectionCredentials;
import io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactory;
import io.github.mfvanek.pg.core.utils.ClockHolder;
import io.github.mfvanek.pg.health.logger.AbstractHealthLogger;
import io.github.mfvanek.pg.health.logger.DatabaseChecksOnCluster;
import io.github.mfvanek.pg.health.logger.LoggingKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.function.Function;

public class KeyValueFileHealthLogger extends AbstractHealthLogger {

    private static final Logger KV_LOG = LoggerFactory.getLogger("key-value.log");

    public KeyValueFileHealthLogger(@Nonnull final ConnectionCredentials credentials,
                                    @Nonnull final HighAvailabilityPgConnectionFactory connectionFactory,
                                    @Nonnull final Function<HighAvailabilityPgConnection, DatabaseChecksOnCluster> databaseChecksFactory) {
        super(credentials, connectionFactory, databaseChecksFactory);
    }

    @Override
    protected String writeToLog(@Nonnull final LoggingKey key, final int value) {
        final String result = format(key.getKeyName(), key.getSubKeyName(), value);
        KV_LOG.info("{}", result);
        return result;
    }

    @Nonnull
    private String format(@Nonnull final String keyName, @Nonnull final String subKeyName, final int value) {
        return DateTimeFormatter.ISO_INSTANT.format(
            ZonedDateTime.now(ClockHolder.clock())) + "\t" + keyName + "\t" + subKeyName + "\t" + value;
    }
}
  1. Column class is now final.
  2. In ColumnsAware interface method getColumns() now returns List<ColumnNameAware>.
  3. ConstraintNameAware now extends TableNameAware.
  4. In ConstraintsAware interface method getConstraints() now returns List<ConstraintNameAware>.
  5. ForeignKey is no longer inherited from Constraint.

What's Changed

Full Changelog: v.0.14.6...v.0.15.0

v.0.14.6

20 Apr 18:10
bc7c385

Choose a tag to compare

What's Changed

  • Next iteration v.0.14.6 by @mfvanek in #597
  • Add a check "Relation without columns or has too few columns" by @mfvanek in #599
  • Bump de.thetaphi:forbiddenapis from 3.8 to 3.9 by @dependabot in #601
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.19.2 to 3.19.3 by @dependabot in #602
  • Add a check to find object names that do not follow naming convention by @mfvanek in #607
  • [not_valid_constraints] Add test with badly named constraints by @mfvanek in #610
  • Add a check to find column names that do not follow naming convention by @mfvanek in #611
  • Add check to find usage of varchar(32/36) instead of uuid for PK by @mfvanek in #612
  • Add check "Don't use varchar(n) by default" by @DGilfanova in #613
  • Extend CONTRIBUTING.md and describe operations with git submodule by @mfvanek in #615
  • Add a check to prevent unnecessary where-clauses in index creating queries on not null columns by @mfvanek in #617

New Contributors

Full Changelog: v.0.14.5...v.0.14.6

v.0.14.5

03 Apr 13:57
9168550

Choose a tag to compare

Full support for partitioned tables

What's Changed

  • Next development iteration 0.14.5 by @mfvanek in #546
  • Bump io.spring.dependency-management from 1.1.6 to 1.1.7 by @dependabot in #548
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.17.5 to 3.18 by @dependabot in #551
  • New year 2025 update by @mfvanek in #552
  • Update sql queries by @mfvanek in #553
  • Add link to article in English by @mfvanek in #555
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.18 to 3.18.1 by @dependabot in #556
  • Bump org.liquibase:liquibase-core from 4.30.0 to 4.31.0 by @dependabot in #557
  • Bump org.postgresql:postgresql from 42.7.4 to 42.7.5 by @dependabot in #558
  • Bump io.freefair.lombok from 8.11 to 8.12 by @dependabot in #561
  • Bump com.github.ben-manes.versions from 0.51.0 to 0.52.0 by @dependabot in #560
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.18.1 to 3.18.2 by @dependabot in #563
  • Bump io.freefair.lombok from 8.12 to 8.12.1 by @dependabot in #565
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.18.2 to 3.19 by @dependabot in #566
  • Bump io.freefair.lombok from 8.12.1 to 8.12.2 by @dependabot in #567
  • Bump org.awaitility:awaitility from 4.2.2 to 4.3.0 by @dependabot in #570
  • Bump org.liquibase:liquibase-core from 4.31.0 to 4.31.1 by @dependabot in #571
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.19 to 3.19.1 by @dependabot in #572
  • Bump org.testcontainers:testcontainers-bom from 1.20.4 to 1.20.5 by @dependabot in #573
  • Bump io.freefair.lombok from 8.12.2 to 8.12.2.1 by @dependabot in #579
  • Bump org.testcontainers:testcontainers-bom from 1.20.5 to 1.20.6 by @dependabot in #578
  • Bump io.freefair.lombok from 8.12.2.1 to 8.13 by @dependabot in #582
  • Bump nl.jqno.equalsverifier:equalsverifier from 3.19.1 to 3.19.2 by @dependabot in #581
  • Support partitioning for unused indexes check by @mfvanek in #586
  • Support for partitioned tables in column checks by @mfvanek in #587
  • Support partitioned tables for FOREIGN_KEYS_WITH_UNMATCHED_COLUMN_TYPE and FOREIGN_KEYS_WITHOUT_INDEX by @mfvanek in #588
  • Support partitioning for indexes with boolean check by @mfvanek in #590
  • Bump io.freefair.lombok from 8.13 to 8.13.1 by @dependabot in #591
  • Support partitioning for duplicated and intersected indexes check by @mfvanek in #592
  • Support partitioning for not valid constraints and btree indexes on array columns by @mfvanek in #593
  • Add docs in russian by @marijarin in #577
  • Support partitioning for duplicated and intersected foreign keys by @mfvanek in #594
  • Extend docs template by @mfvanek in #595
  • Update Gradle and dependencies by @mfvanek in #596

New Contributors

Full Changelog: v.0.14.4...v.0.14.5