HexaCluster LogoHexaCluster Logo
  • Services
  • Products
  • HexaRocket
  • Blog
  • Resources
  • Company
  • Contact Us
Schedule a Demo
Stay Updated

Subscribe to Newsletters

Be the first to know! Stay updated with the latest insights, database migration benchmarks, and technical updates from HexaCluster.

HexaCluster LogoHexaCluster Logo

Enterprise-grade Database migration, modernization, and tooling for teams moving off legacy databases.

  • One Dundas Street West, Suite 2500, Toronto, Ontario, M5G 1Z3, Canada
  • HexaCluster DMCC, Plot No: JLT-PH2-RET-R6 Jumeirah Lakes Towers, Dubai, UAE
connect@hexacluster.ai+1 (902) 221-5976

Security & Compliance

SOC 2 Type 1 reportSOC 2 Type 2 report, monitored by Comp AIGDPR compliantISO 27001AICPA SOC for Service Organizations

Products

  • DMAT
  • HexaRocket
  • HexaBridge
  • HexaTranspile
  • MyBatis2Pg
  • HexaReplicate
  • Download Products

HexaRocket

  • Supported Database Migrations
  • Migrate to Yugabyte
  • About HexaRocket
  • Migrate to Oracle
  • Migrate to PostgreSQL
  • Migrate to MariaDB

Services

  • Database Migration to PostgreSQL
  • Application Migration and Modernization
  • AI/ML and MLOps
  • Architectural Health Audit
  • Managed DBA Services
  • Performance Tuning
  • PostgreSQL Development
  • Training for DBAs & Developers
  • 24/7 Support
  • Supported Tools and Extensions

Company

  • Blog
  • Case Studies
  • Webinars
  • Announcements
  • About Us
  • Referral Program
  • Events
  • Contact Us

© HexaCluster 2026. All rights reserved. Privacy PolicyThis site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

HEXACLUSTERHEXACLUSTERHEXACLUSTER

PostgreSQL v19: Password expiration warnings.

Gilles Darold
Feb 12, 2026
Securitypostgresql#postgresql security

Through this new patch to PostgreSQL, when connecting to the PostgreSQL database, if the user account has a password expiration date set - using the VALID UNTIL clause, by default, the user will be warned 7 days before the password expires. You can control the delay before this warning message appears using a new GUC password_expiration_warning_threshold. A value of 0 disable this feature.

After successful connection the user will received a warning like:

    WARNING:  The password for role "user1" will expire in 4 days.

When using psql, the message will be displayed on stdout, it can be handled in any application by getting the warning message at successfull logon.

Overall this patch introduces a new "connection warning" infrastructure that can be reused elsewhere in PostgreSQL code to emit warnings to the users when they logs.

Before this patch, the only way to do that was to add an ON LOGIN event trigger to check the expiration date. The main problem of this solution is that the trigger must be created in each databases. The credcheck extension uses this workaround, I will modify it soon to disable this feature with PostgreSQL greater or equal to version 19.

Thanks to all reviewers and Nathan Bossart for improving this patch:

Author: Gilles Darold <gilles@hexacluster.ai>
Committer: Nathan Bossart <nathan@postgresql.org>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: songjinzhou <tsinghualucky912@foxmail.com>
Reviewed-by: liu xiaohui <liuxh.zj.cn@gmail.com>
Reviewed-by: Yuefei Shi <shiyuefei1004@gmail.com>
Reviewed-by: Steven Niu <niushiji@gmail.com>
Reviewed-by: Soumya S Murali <soumyamurali.work@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
🔹 HexaRocket Recommendation
To ensure a seamless and end-to-end database migrations, we recommend using HexaRocket, which enables you to automate and manage your migration process with precision. HexaRocket supports Schema conversion with near to 100% accuracy with validation, data migration and cdc for live replication with validation of data at every stage. HexaRocket enables you to perform online migration and rollback capability using its live replication functionality. Supported databases are Oracle, MSSQL (SQL Server), MySQL, MariaDB, Sybase and PostgreSQL

Subscribe to our Newsletters and Stay tuned for more interesting topics.


If you need expert support migrating legacy or complex Oracle, SQL Server, Sybase, MySQL, MariaDB databases to PostgreSQL or distributed databases, we’re here to help. HexaCluster provides end-to-end migration and modernization services, including application migration and modernization, database migration, and PostgreSQL consulting such as performance tuning, health audits, managed DBA services, and 24/7/265 support. To start a conversation or explore how we can support your migration journey, please contact us at connect@hexacluster.ai

Authors

Gilles Darold

Gilles Darold

CTO

Gilles Darold is the CTO of HexaCluster. Gilles is one of the Major PostgreSQL Contributors and the creator of Ora2Pg, pgBadger, and many more popular PostgreSQL tools and extensions. His leadership has enabled HexaCluster in contributing to 50 plus popular PostgreSQL extensions and also create multiple PostgreSQL tools and extensions. Gilles is an expert in all the popular programming languages and is always passionate about contributing to PostgreSQL.

Start your migration journey 🚀

start your migration journey with our expert team

Products

DMAT

Database & Application Migration Assessment Tool

HexaRocket

End-to-End Database Migration & Modernization Tool

HexaTranspile

Database Code Object Conversion to PostgreSQL

MyBatis2Pg

MyBatis Mapper Conversion to PostgreSQL

HexaReplicate

Enterprise Data Replication & Live CDC

HexaBridge

Oracle Compatibility Layer for PostgreSQL

HexaRocket 🚀

Oracle to PostgreSQLSQL Server to PostgreSQLMySQL to PostgreSQLMariaDB to PostgreSQLAny to Any databases

Migration Services

Database MigrationsApplication Modernization

PostgreSQL Consulting

Architectural AuditsPerformance TuningTraining & Support