Re: Query performance going from Oracle to Postgres

2023-09-06 Thread Peter Geoghegan
On Wed, Sep 6, 2023 at 1:07 PM Dirschel, Steve wrote: > Oracle will find the same 332 rows using the same index but in Oracle it only > does 20 logical reads. I thought maybe the index was fragmented so I > reindexed that index: It seems likely that the problem here is that some of the predica

Re: Query performance going from Oracle to Postgres

2023-09-06 Thread David Rowley
On Thu, 7 Sept 2023 at 11:14, Dirschel, Steve wrote: > select count(historyeve0_.HISTORY_EVENT_SID) as col_0_0_ from > hist28.history_event_display_timestamp_20230301 historyeve0_ where > historyeve0_.IS_DELETED=0 > history_event_sid | character varying(32) | | not > nu

Re: Query performance going from Oracle to Postgres

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 20:06 +, Dirschel, Steve wrote: > We are in the process of converting from Oracle to Postgres and I have a > query that is using > the same index in Postgres as is used in Oracle but in Postgres the query > does 16x more > buffer/logical reads.  I’d like to understand wh

Query performance going from Oracle to Postgres

2023-09-06 Thread Dirschel, Steve
We are in the process of converting from Oracle to Postgres and I have a query that is using the same index in Postgres as is used in Oracle but in Postgres the query does 16x more buffer/logical reads. I'd like to understand why. The query is hitting a partitioned table but to simply things I

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Jehan-Guillaume de Rorthais
On Wed, 6 Sep 2023 19:34:40 +0530 Sai Teja wrote: > In my local it is windows OS and locale is English_united_states.1252 and > in local it is converting as expected ( testµ into TESTµ) I'm not familiar with PostgreSQL under Windows. Maybe collation from locale "English_united_states.1252" is av

Re: Ynt: Pgbackrest Restore Error - Segmentation fault (core dumped)

2023-09-06 Thread Rob Sargent
On 9/6/23 11:27, pgdba pgdba wrote: I removed  it but I keep getting the same error OK.  The custom here is to put your response at the bottom  of short messages ("bottom post") or intermixed with original as appropriate on

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Imre Samu
> But how is that corruption happening - I mean it is a docker image, > freshly fetched from the registry. Hi Torsten, Maybe you have to increase the "*--stop-timeout" value ; ( or "*stop_grace_period" in docker-compose ) https://github.com/docker-library/postgres/issues/544#issuecomment-455738

Re: Q: inet operators for IPv4 encapsulated in IPv6

2023-09-06 Thread Albrecht Dreß
Am 06.09.23 19:41 schrieb(en) Erik Wienhold: The docs don't spell it out, but inet operators and functions expect values of the same inet family. Comparing IPv4 and IPv6 always returns false, e.g. [1]. The only hint in the docs that may imply this is [2]: "When sorting inet or cidr dat

Re: Q: inet operators for IPv4 encapsulated in IPv6

2023-09-06 Thread Erik Wienhold
On 06/09/2023 16:51 CEST Albrecht Dreß wrote: > I have a question regarding the use of inet operators in environments with > mixed IPv4 and IPv6 notations. > > Consider the example from sect. 9.12. “Network Address Functions and > Operators” > in the docs which returns properly > > > postgres=#

Ynt: Pgbackrest Restore Error - Segmentation fault (core dumped)

2023-09-06 Thread pgdba pgdba
I removed it but I keep getting the same error Gönderen: Rob Sargent Gönderildi: 6 Eylül 2023 Çarşamba 16:32 Kime: pgsql-general@lists.postgresql.org Konu: Re: Pgbackrest Restore Error - Segmentation fault (core dumped) On 9/6/23 05:08, pgdba pgdba wrote: Hello,

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
I added one column with generated always column with UPPER CASE like below:- Alter table table_name t add column data varchar(8000) generated always as (UPPER(t.content)) stored Data column is generated always constraint here This column has many sentences for each row in which some of the chara

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 18:37 CEST Erik Wienhold wrote: > Homoglyphs are one explanation if you get 'µass' from the generated column as > described. postgres=# SELECT upper('𝝻𝚊𝚜𝚜'); upper --- 𝝻𝚊𝚜𝚜 (1 row) The codepoints I picked are: * MATHEMATICAL SANS-SERI

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 18:04 CEST Sai Teja wrote: > When I'm trying the below command > Select UPPER('Mass') > I'm getting MASS as output . > But when I created the column with generated always constraint > For example > Alter table xyz add column xyz varchar(800) generated always as > (UPPER(content)) s

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Thank you all for your response. Got one more query, When I'm trying the below command Select UPPER('Mass') I'm getting MASS as output . But when I created the column with generated always constraint For example Alter table xyz add column xyz varchar(800) generated always as (UPPER(content)) store

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Francisco Olarte
On Wed, 6 Sept 2023 at 16:40, Sai Teja wrote: > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the > upper method is converting µ as µ only but not as M. > So, while validating the data we have encountered this problem. > > We want to have the data in both DB's should be sim

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Hi Tom Lane, Thank you for your reply! Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the upper method is converting µ as µ only but not as M. So, while validating the data we have encountered this problem. We want to have the data in both DB's should be similar (db2 and po

Q: inet operators for IPv4 encapsulated in IPv6

2023-09-06 Thread Albrecht Dreß
I have a question regarding the use of inet operators in environments with mixed IPv4 and IPv6 notations. Consider the example from sect. 9.12. “Network Address Functions and Operators” in the docs which returns properly postgres=# select '192.168.1.5'::inet << '192.168.1/24'::inet; ?column?

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 15:42 CEST Sai Teja wrote: > I am using UPPER document name for converting the text from lower case into > upper case. > But here for the below example > Command:- select UPPER(testµ) > Input :- testµ > Output:- TESTM > Expected output :- TESTµ > > Here, that character is converting

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 19:34 +0530, Sai Teja wrote: > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the > upper method is converting µ as µ only but not as M. Then you are using a different collation in DB2, or "upper" (which is not standardized, as far as I know), is defin

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Tom Lane
Sai Teja writes: > I am using UPPER document name for converting the text from lower case into > upper case. > But here for the below example > Command:- select UPPER(testµ) > Input :- testµ > Output:- TESTM > Expected output :- TESTµ According to https://en.wikipedia.org/wiki/Greek_alphabet the

postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Hi team, I am using UPPER document name for converting the text from lower case into upper case. But here for the below example Command:- select UPPER(testµ) Input :- testµ Output:- TESTM Expected output :- TESTµ Here, that character is converting into M which should not be case The postgreSQL i

Re: Pgbackrest Restore Error - Segmentation fault (core dumped)

2023-09-06 Thread Rob Sargent
On 9/6/23 05:08, pgdba pgdba wrote: Hello, when I restore with Pgbackrest, I get the following error, I couldn't find a solution when I researched, can you support? postgres@dev-test:~$ pgbackrest --config=/etc/pgbackrest/pgbackrest.conf --stanza=db3 --log-level-console=info --type=immediate

Re: Pgbackrest Restore Error - Segmentation fault (core dumped)

2023-09-06 Thread Daniel Gustafsson
> On 6 Sep 2023, at 13:08, pgdba pgdba wrote: > > Hello, when I restore with Pgbackrest, I get the following error, I couldn't > find a solution when I researched, can you support? You might be better off raising this question on the pgbackreset Github repo as an issue, where more pgbackrest de

Re: Postgres partition max limit

2023-09-06 Thread Chris Travers
On Wed, Sep 6, 2023 at 5:27 PM Daulat wrote: > Hi Team, > > Do we have a max limit of partitions for a table in postgres? > As far as I can tell, there is no real hard limit to that per se. After all, you will eventually run out of OIDs for pg_attribute but that would affect the number of colum

Pgbackrest Restore Error - Segmentation fault (core dumped)

2023-09-06 Thread pgdba pgdba
Hello, when I restore with Pgbackrest, I get the following error, I couldn't find a solution when I researched, can you support? postgres@dev-test:~$ pgbackrest --config=/etc/pgbackrest/pgbackrest.conf --stanza=db3 --log-level-console=info --type=immediate restore WARN: configuration file contai

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Torsten Krah
Am Mittwoch, dem 06.09.2023 um 12:04 +0200 schrieb Erik Wienhold: > > I am running that one (official docker image) > > > > PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, > > compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit > > Have you also tried with 13.12? Yes, b

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 09:46 CEST Torsten Krah wrote: > I am running that one (official docker image) > > PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, > compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit Have you also tried with 13.12? > and one of my nightly jobs reported

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 10:33 +0200, Torsten Krah wrote: > Am Mittwoch, dem 06.09.2023 um 10:21 +0200 schrieb Laurenz Albe: > > You are lucky that the corrupted table is one that holds data that > > can be rebuilt. > > It is a test instance / container anyway which is deleted afterwards > and can be

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Torsten Krah
Am Mittwoch, dem 06.09.2023 um 10:21 +0200 schrieb Laurenz Albe: > You are lucky that the corrupted table is one that holds data that > can be rebuilt. It is a test instance / container anyway which is deleted afterwards and can be setup again as often as I want. But how is that corruption happen

Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 09:46 +0200, Torsten Krah wrote: > I am running that one (official docker image) > > PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, > compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit > > and one of my nightly jobs reported that error yesterday w

Re: Postgres partition max limit

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 13:35 +0530, Daulat wrote: > Do we have a max limit of partitions for a table in postgres? I don't think there is a technical limit. But as soon as you have more than a few thousand partitions, the experience won't be that great any more. Yours, Laurenz Albe

Postgres partition max limit

2023-09-06 Thread Daulat
Hi Team, Do we have a max limit of partitions for a table in postgres? Thanks.

running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index"

2023-09-06 Thread Torsten Krah
Hi, I am running that one (official docker image) PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit and one of my nightly jobs reported that error yesterday when running an "ANALYZE": FEHLER: doppelter Schlüsselwert ver