public inbox for [email protected]  
help / color / mirror / Atom feed
Upgrading from postgresql 11 to postgresql 17 using pg_upgrade
4+ messages / 4 participants
[nested] [flat]

* Upgrading from postgresql 11 to postgresql 17 using pg_upgrade
@ 2025-09-18 12:11 Muhammet Kurtoğlu <[email protected]>
  2025-09-18 14:15 ` Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Ron Johnson <[email protected]>
  2025-09-19 04:50 ` Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Holger Jakobs <[email protected]>
  2025-09-19 05:01 ` Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade concur dev <[email protected]>
  0 siblings, 3 replies; 4+ messages in thread

From: Muhammet Kurtoğlu @ 2025-09-18 12:11 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

Hi
 during upgrade we encounter

pg_restore: error: could not execute query: ERROR: encoding "UTF8" does not
match locale "tr_TR.iso88599" DETAIL: The chosen LC_CTYPE setting requires
encoding "LATIN5". Command was: CREATE DATABASE "zzz" WITH TEMPLATE =
template0 OID = 84322 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE =
'tr_TR.iso88599' TABLESPACE = "zz";

postgresql 11 database list


[image: image.png]

please help



-- 

*Muhammet KURTOĞLU*

T:  +90(312) 220 12 20 <%2B90%28374%29%20262%2098%2000>

F:  +90(312) 286 00 10 <%2B90%28374%29%20262%2090%2091>

[email protected] <[email protected]>


Attachments:

  [image/png] image.png (220.2K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade
  2025-09-18 12:11 Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Muhammet Kurtoğlu <[email protected]>
@ 2025-09-18 14:15 ` Ron Johnson <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Ron Johnson @ 2025-09-18 14:15 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

On Thu, Sep 18, 2025 at 8:12 AM Muhammet Kurtoğlu <
[email protected]> wrote:

> Hi
>  during upgrade we encounter
>
> pg_restore: error: could not execute query: ERROR: encoding "UTF8" does
> not match locale "tr_TR.iso88599" DETAIL: The chosen LC_CTYPE setting
> requires encoding "LATIN5". Command was: CREATE DATABASE "zzz" WITH
> TEMPLATE = template0 OID = 84322 ENCODING = 'UTF8' LOCALE_PROVIDER = libc
> LOCALE = 'tr_TR.iso88599' TABLESPACE = "zz";
>
> postgresql 11 database list
>
>
> [image: image.png]
>
> please help
>
>
What PG17 version?
What exact pg_upgrade command (with options, and all output) did you run?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


Attachments:

  [image/png] image.png (220.2K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade
  2025-09-18 12:11 Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Muhammet Kurtoğlu <[email protected]>
@ 2025-09-19 04:50 ` Holger Jakobs <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Holger Jakobs @ 2025-09-19 04:50 UTC (permalink / raw)
  To: [email protected]

Am 18.09.25 um 14:11 schrieb Muhammet Kurtoğlu:
> Hi
>  during upgrade we encounter
>
> pg_restore: error: could not execute query: ERROR: encoding "UTF8" 
> does not match locale "tr_TR.iso88599" DETAIL: The chosen LC_CTYPE 
> setting requires encoding "LATIN5". Command was: CREATE DATABASE "zzz" 
> WITH TEMPLATE = template0 OID = 84322 ENCODING = 'UTF8' 
> LOCALE_PROVIDER = libc LOCALE = 'tr_TR.iso88599' TABLESPACE = "zz";
>
> postgresql 11 database list
>
>
> image.png
>
> please help
>
>
>
>
> -- 
>
> *Muhammet KURTOĞLU*
>
> T: +90(312) 220 12 20 <tel:%2B90%28374%29%20262%2098%2000>
>
> F: +90(312) 286 00 10 <tel:%2B90%28374%29%20262%2090%2091>
>
> [email protected] <mailto:[email protected]>
>
>
>
>
>
Hi Muhammet,

You aren't using pg_upgrade as you are saying in the subject line, but 
pg_restore for restoring, which means you did a pg_dump -Fc before.

In order to avoid the errors you have encountered, the safest bet ist 
ALWAYS to use UTF8. Use UTF8 as encoding for ALL databases, and Collate 
and CType language_country.UTF-8, in your case tr_TR.UTF-8. Don't bother 
with the outdated iso8859x character sets.

UTF8 can handle all characters from all languages, special characters, 
emojis and so on.

Make sure that the database cluster also has been initialised with the 
correct encoding. Check whether the encoding of template1 database is 
the same. Otherwise, run the initdb command again with correct settings, 
see manpage of initdb.

This command works nonetheless

create database kurt with encoding = utf8 locale = tr_TR lc_collate = 
'tr_TR.UTF-8' lc_ctype = 'tr_TR.UTF-8' locale_provider = libc template = 
template0;

Selamlar

Holger

-- 

Holger Jakobs, Bergisch Gladbach, Germany


Attachments:

  [image/png] image.png (220.2K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrading from postgresql 11 to postgresql 17 using pg_upgrade
  2025-09-18 12:11 Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Muhammet Kurtoğlu <[email protected]>
@ 2025-09-19 05:01 ` concur dev <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: concur dev @ 2025-09-19 05:01 UTC (permalink / raw)
  To: Muhammet Kurtoğlu <[email protected]>; +Cc: Pgsql-admin <[email protected]>

hi Muhammet!
The locale tr_TR.iso88599 only works with LATIN5, not UTF-8. Either create
the DB with tr_TR.UTF-8 and restore without --create, or switch to LATIN5.
Locale and encoding must match.

Regards
Ashish

On Thu, Sep 18, 2025 at 2:12 PM Muhammet Kurtoğlu <
[email protected]> wrote:

> Hi
>  during upgrade we encounter
>
> pg_restore: error: could not execute query: ERROR: encoding "UTF8" does
> not match locale "tr_TR.iso88599" DETAIL: The chosen LC_CTYPE setting
> requires encoding "LATIN5". Command was: CREATE DATABASE "zzz" WITH
> TEMPLATE = template0 OID = 84322 ENCODING = 'UTF8' LOCALE_PROVIDER = libc
> LOCALE = 'tr_TR.iso88599' TABLESPACE = "zz";
>
> postgresql 11 database list
>
>
> [image: image.png]
>
> please help
>
>
>
> --
>
> *Muhammet KURTOĞLU*
>
> T:  +90(312) 220 12 20 <%2B90%28374%29%20262%2098%2000>
>
> F:  +90(312) 286 00 10 <%2B90%28374%29%20262%2090%2091>
>
> [email protected] <[email protected]>
>
>
>
>
>
>
>
>


Attachments:

  [image/png] image.png (220.2K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-09-19 05:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18 12:11 Upgrading from postgresql 11 to postgresql 17 using pg_upgrade Muhammet Kurtoğlu <[email protected]>
2025-09-18 14:15 ` Ron Johnson <[email protected]>
2025-09-19 04:50 ` Holger Jakobs <[email protected]>
2025-09-19 05:01 ` concur dev <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox