Open stefanoric opened 1 month ago
I took a look, the relevant code
/*
* It's now possible to do real access to the system catalogs.
*
* Load relcache entries for the system catalogs. This must create at
* least the minimum set of "nailed-in" cache entries.
*/
RelationCacheInitializePhase3();
/* set up ACL framework (so CheckMyDatabase can check permissions) */
initialize_acl();
/*
* Re-read the pg_database row for our database, check permissions and set
* up database-specific GUC settings. We can't do this until all the
* database-access infrastructure is up. (Also, it wants to know if the
* user is a superuser, so the above stuff has to happen first.)
*/
if (!bootstrap)
CheckMyDatabase(dbname, am_superuser,
(flags & INIT_PG_OVERRIDE_ALLOW_CONNS) != 0);
CheckMyDatabase
is called after RelationCacheInitializePhase3
, CheckMyDatabase
sets up database encoding to UTF8
by calling SetDatabaseEncoding(dbform->encoding)
Before that, the database encoding is initialized to SQL_ASCII. There are some YB specific code in doing catalog cache preloading to populate the cache in RelationCacheInitializePhase3
, as a result SQL_ASCII
is used instead of UTF8
. Perhaps we should update YB specific code to SetDatabaseEncoding(dbform->encoding)
to get things right.
The fix typo change that was backported to 2024.1 and 2024.2 need not be backported to 2.20 because the original fix when backported to 2.20 had the typo fixed.
Jira Link: DB-13038
Description
The following error is thrown after changing to a database where a partitioned table exist and a collation is defined for the partition column:
FATAL: encoding "SQL_ASCII" not supported by ICU
Steps to reproduce (assuming 2 tablespaces already exist):
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information