How to repair my plan modify error?

2022-12-03 Thread jack...@gmail.com
jacktby(at)gmail(dot)com -- Hello, I'm trying to modify pg codes for my personal project. And after I finish modify planner, I get this. postgres=# create table tt(a int); CREATE TABLE postgres=# \d tt ERROR: btree index keys must be ordered by attribute here are the patches of my mo

Aw: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-03 Thread Karsten Hilbert
> You would need to wrap the function creation calls into some automation to > generate and store those diffs, comparing it back, etc, but that may be > doable. I would also generate new diffs right after major version updates of > the database (a before and after of the output of pg_get_functio

Re: sort performance better with little memory than big memory

2022-12-03 Thread David Rowley
On Sun, 4 Dec 2022 at 00:14, yang zhao wrote: > So,can we try to split memory to pieces and qsort every one,and merge than > all in memory,I have tried this in my local code, and got about 12% > improvement when memory is enough. We're not very good at CPU cache awareness. The hard part here w

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-03 Thread Brad White
On 12/2/2022 9:05 AM, Peter J. Holzer wrote: I don't know how reproducable that tokenization process is. Can you just do it again and compere the results? Right. You can compare passwords, even though you don't store the original. You might be able to run your virgin copy through the tokenizatio

Re: print in plpython not appearing in logs

2022-12-03 Thread Tom Lane
Ludwig Isaac Lim writes: > I'm having problems wherein my print() statements inside my plpython stored > proc are not appearing in postgresql log. I tried setting the file=sys.stderr Hmm. I can tell you that with "logging_collector = on", I would only expect the logs to capture stderr output, n

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-03 Thread Alban Hertroys
> On 2 Dec 2022, at 15:10, DAVID ROTH wrote: > > Is there a way to reverse engineer the original code (or its equivalent) from > what is saved in the database? I’m dumping an idea here… Treading back quite a bit with information from later in this thread. With the original procedure source

sort performance better with little memory than big memory

2022-12-03 Thread yang zhao
hello, I am running some sorting sql on my machine,test data is tpch100g, and sql is:explain analyze verbose select l_shipdate,l_orderkey from lineitem_0 order by l_shipdate,l_orderkey desc . I found that when I set work_mem to 65MB,sort method is external merge with disk,which cost 50s in my serv

ERROR : cannot commit while a portal is pinned from plpython

2022-12-03 Thread Ludwig Isaac Lim
Hello: I noticed the following lines in my PostgreSQL log file today: 2022-12-01 14:16:54.517 UTC [10073] ERROR:  cannot commit while a portal is pinned 2022-12-01 14:16:54.517 UTC [10073] STATEMENT:  call p_annotate_db_stats() The process ID can be traced to plpython procedure call. What is

print in plpython not appearing in logs

2022-12-03 Thread Ludwig Isaac Lim
I'm having problems wherein my print() statements inside my plpython stored proc are not appearing in postgresql log. I tried setting the file=sys.stderr To reproduce: CREATE OR REPLACE PROCEDURE p_ludwig_test() AS $$    import sys    try:   x = 1 / 0    except:  

Re: PostgreSQL extension for processing Graph queries (Apache AGE)

2022-12-03 Thread Young Seung Andrew Ko
Hello Alvaro, With AGE running on PostgreSQL, you can store and query Graph data (in JSON document) using openCypher based graph queries, Graph data is a set of nodes (objects / entities / records) and edges (relationships between nodes). You can also run some Graph algorithms on these data such a