Re: print in plpython not appearing in logs

2022-12-05 Thread Ludwig Isaac Lim
Hi Tom: >> 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, not s

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:  

Strange behavior between timestamp and date comparison

2022-07-24 Thread Ludwig Isaac Lim
Hello: Below is a sample case that exhibits a behavior that I can't explain: -- create the table create table ts (t timestamp without time zone); -- populate insert into ts(t) values ('2022-07-16 00:22:06.974000'); insert into ts(t) values ('2022-07-16 00:22:06.974000'); insert into ts(t) values

Re: Error when pasting function blocks into psql

2022-07-17 Thread Ludwig Isaac Lim
On Friday, July 8, 2022 at 10:20:52 PM GMT+8, Tom Lane wrote: Ludwig Isaac Lim writes: >> Hello: >> I noticed that I'm getting errors when copy and pasting code for stored >> procedure from Windows directly into psql running in putty. >> To reproduc

Error when pasting function blocks into psql

2022-07-08 Thread Ludwig Isaac Lim
Hello: I noticed that I'm getting errors when copy and pasting code for stored procedure from Windows directly into psql running in putty. To reproduce create a procedure that has multiple statements with each statements having multiple lines, similar to the ones below: CREATE OR REPLACE PROCEDUR

Re: Network Card Not Listening at Startup

2022-02-10 Thread Ludwig Isaac Lim
> On Thursday, February 10, 2022, 01:49:10 AM GMT+8, Tom Lane > wrote: >> Ludwig Isaac Lim writes: >> How do make sure that NIC will be listening every time I started/restarted >> the server? > You need to tell systemd not to start the postgresql servic

Network Card Not Listening at Startup

2022-02-09 Thread Ludwig Isaac Lim
Hello: I'm running postgresql 12.9 on Amazon Linux in AWS.  My listen_addresses in postgresql.conf is configured like below: listen_addresses = '172.17.1.57,localhost'  However, postgresql does not listen on 172..17.1.57. I can reproduce the phenomenon by simply rebooting the server and then r