Materialized Views - Way to refresh automatically (Incrementaly)

2023-05-11 Thread FOUTE K . Jaurès
Hello Everyone, Is There a way on PostgresQL 14 to automatically increment a Materialized Views ? -- Jaurès FOUTE

Re: Materialized Views - Way to refresh automatically (Incrementaly)

2023-05-11 Thread Thomas Boussekey
Hello Le jeu. 11 mai 2023, 12:46, FOUTE K. Jaurès a écrit : > Hello Everyone, > > Is There a way on PostgresQL 14 to automatically increment a Materialized > Views ? > Have a look at pg_ivm extension https://github.com/sraoss/pg_ivm > > -- > Jaurès FOUTE > Hope this helps, Thomas > >

[Beginner question]How to solve multiple definition of `yylval'?

2023-05-11 Thread Wen Yi
Hi team, I am studying on the yacc & lex to help me understand the parser of the postgres, but now I'm facing some trouble. --- /*   1-3.y */ %{ #include int yylex(); int yyerror(char *s); typedef char* string; #define YYSTPYE string %} %token NUMBER %token ADD SUB MUL DIV A

Re: [Beginner question]How to solve multiple definition of `yylval'?

2023-05-11 Thread Tom Lane
Wen Yi writes: > When I use the yacc & lex to compile, > yacc -d 1-3.y > lex 1-3.l > gcc 1-3.tab.c lex.yy.c > /usr/bin/ld: /tmp/ccYqqE5N.o:(.bss+0x28): multiple definition of `yylval'; > /tmp/ccdJ12gy.o:(.bss+0x4): first defined here Bison provides the declaration of yylval; don't add one yours

Re: Death postgres

2023-05-11 Thread Marc Millas
On Thu, May 11, 2023 at 1:56 AM Peter J. Holzer wrote: > On 2023-05-10 22:52:47 +0200, Marc Millas wrote: > > On Wed, May 10, 2023 at 7:24 PM Peter J. Holzer > wrote: > > > > On 2023-05-10 16:35:04 +0200, Marc Millas wrote: > > > Unique (cost=72377463163.02..201012533981.80 rows=102152

order by

2023-05-11 Thread Marc Millas
Hi, I keep on investigating on the "death postgres" subject but open a new thread as I don't know if it's related to my pb. I have 2 different clusters, on 2 different machines, one is prod, the second test. Same data volumes. On prod if I do select col_a, count(col_a) from table_a group by col_

gather merge

2023-05-11 Thread Marc Millas
Hi, another new thread related to "death postgres": how to stop Gather Merge from going parallel ? ie. not forcing parallel to one thread as limitating max_parallel_workers (per_gatherer) thanks, Marc MILLAS Senior Architect +33607850334 www.mokadb.com

Re: order by

2023-05-11 Thread Adrian Klaver
On 5/11/23 07:29, Marc Millas wrote: Hi, I keep on investigating on the "death postgres" subject but open a new thread as I don't know if it's related to my pb. I have 2 different clusters, on 2 different machines, one is prod, the second test. Same data volumes. How can they be sharing the

Re: order by

2023-05-11 Thread Adam Scott
Check the index creation has NULLS FIRST (or LAST) on both indexes that are used. Use explain to see what indexes are used See docs for create index: https://www.postgresql.org/docs/current/sql-createindex.html On Thu, May 11, 2023, 7:30 AM Marc Millas wrote: > Hi, > > I keep on investigating o

Re: order by

2023-05-11 Thread Marc Millas
Thanks, I do know about index options. that table have NO (zero) indexes. Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, May 11, 2023 at 4:48 PM Adam Scott wrote: > Check the index creation has NULLS FIRST (or LAST) on both indexes that > are used. Use explain to see what

Re: order by

2023-05-11 Thread Marc Millas
On Thu, May 11, 2023 at 4:43 PM Adrian Klaver wrote: > On 5/11/23 07:29, Marc Millas wrote: > > Hi, > > > > I keep on investigating on the "death postgres" subject > > but open a new thread as I don't know if it's related to my pb. > > > > I have 2 different clusters, on 2 different machines, one

Re: order by

2023-05-11 Thread Adrian Klaver
On 5/11/23 08:00, Marc Millas wrote: On Thu, May 11, 2023 at 4:43 PM Adrian Klaver > wrote: On 5/11/23 07:29, Marc Millas wrote: > Hi, > > I keep on investigating on the "death postgres" subject > but open a new thread as I don't know i

Re: order by

2023-05-11 Thread Marc Millas
On Thu, May 11, 2023 at 5:23 PM Adrian Klaver wrote: > On 5/11/23 08:00, Marc Millas wrote: > > > > On Thu, May 11, 2023 at 4:43 PM Adrian Klaver > > wrote: > > > > On 5/11/23 07:29, Marc Millas wrote: > > > Hi, > > > > > > I keep on investiga

Re: order by

2023-05-11 Thread Adrian Klaver
On 5/11/23 08:29, Marc Millas wrote: So how is the data getting from the third database to the prod and test clusters? For the machines hosting the third db, the prod and test clusters what are?: should I understand that you suggest that the way the data is inserted Do cha

Re: gather merge

2023-05-11 Thread Marc Millas
so, I put max_parallel_workers_per_gather to 0, and it does work, no more parallel execution. Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, May 11, 2023 at 4:38 PM Marc Millas wrote: > Hi, > > another new thread related to "death postgres": > how to stop Gather Merge from g

Re: Death postgres

2023-05-11 Thread Marc Millas
On Thu, May 11, 2023 at 1:56 AM Peter J. Holzer wrote: > On 2023-05-10 22:52:47 +0200, Marc Millas wrote: > > On Wed, May 10, 2023 at 7:24 PM Peter J. Holzer > wrote: > > > > On 2023-05-10 16:35:04 +0200, Marc Millas wrote: > > > Unique (cost=72377463163.02..201012533981.80 rows=102152

Re: order by

2023-05-11 Thread Ron
On 5/11/23 09:55, Marc Millas wrote: Thanks, I do know about index options. that table have NO (zero) indexes. If the table has no indices, then why did you write "it looks like there is something different within the *b-tree operator* class of varchar"?  After all, you only care about b-tr

Re: order by

2023-05-11 Thread Ron
On 5/11/23 09:29, Marc Millas wrote: Hi, I keep on investigating on the "death postgres" subject but open a new thread as I don't know if it's related to my pb. I have 2 different clusters, on 2 different machines, one is prod, the second test. Same data volumes. On prod if I do select col_a

Re: order by

2023-05-11 Thread Kirk Wolak
On Thu, May 11, 2023 at 11:30 AM Marc Millas wrote: > On Thu, May 11, 2023 at 5:23 PM Adrian Klaver > wrote: > >> On 5/11/23 08:00, Marc Millas wrote: >> > >> > On Thu, May 11, 2023 at 4:43 PM Adrian Klaver < >> adrian.kla...@aklaver.com >> > > wrote: >> > >> >

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-11 Thread Kirk Wolak
On Wed, May 10, 2023 at 9:32 AM Evgeny Morozov < postgres...@realityexists.net> wrote: > On 10/05/2023 6:39 am, Kirk Wolak wrote: > > It could be as simple as creating temp tables in the other database (since > I believe pg_class was hit). > > We do indeed create temp tables, both in other databas

Re: huge discrepancy between EXPLAIN cost and actual time (but the table has just been ANALYZED)

2023-05-11 Thread Kirk Wolak
On Mon, May 8, 2023 at 8:29 AM Kent Tong wrote: > Hi, > > I have a complex query involving over 15 joins and a CTE query and it > takes over 17s to complete. The output of EXPLAIN ANALYZE includes > (somewhere deep inside): > > Index Scan using document_pkey on document document0_ (cost=0.29..8.

Re: Materialized Views - Way to refresh automatically (Incrementaly)

2023-05-11 Thread FOUTE K . Jaurès
hello Thomas, Thanks, I'll check it out. Le jeu. 11 mai 2023 à 12:01, Thomas Boussekey a écrit : > Hello > > Le jeu. 11 mai 2023, 12:46, FOUTE K. Jaurès a > écrit : > >> Hello Everyone, >> >> Is There a way on PostgresQL 14 to automatically increment a Materialized >> Views ? >> > > Have a look

Re: Death postgres

2023-05-11 Thread Peter J. Holzer
On 2023-05-11 21:27:57 +0200, Marc Millas wrote: > the 75 lines in each tables are not NULLs but '' empty varchar, which, > obviously is not the same thing. > and which perfectly generates 500 billions lines for the left join. > So, no planner or statistics pbs. apologies for the time wasted.