Re: constantly updated table in Amazon RDS

2022-10-21 Thread Julie Nishimura
Thank you all From: Laurenz Albe Sent: Friday, October 21, 2022 8:56 PM To: Julie Nishimura ; pgsql-gene...@postgresql.org Subject: Re: constantly updated table in Amazon RDS On Fri, 2022-10-21 at 18:51 +, Julie Nishimura wrote: > A table is constantly updat

Re: constantly updated table in Amazon RDS

2022-10-21 Thread Laurenz Albe
On Fri, 2022-10-21 at 18:51 +, Julie Nishimura wrote: > A table is constantly updated by inserting new rows. Will it affect select if > where clause is based on > date? > Does "where clause" to specify > date and < now? Potentially yes, if the rows you query are the most recent rows, for whic

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Ron
On 10/21/22 12:13, Dionisis Kontominas wrote: Hello all,     This is my fist email and I ask for leniency on the response. I am quite new to PostgreSQL, and had my first taste of a Windows version. My background is Oracle and I have some questions. I will also post in the admin list. 1. Wh

Re: possible bug

2022-10-21 Thread David G. Johnston
On Fri, Oct 21, 2022 at 6:09 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Fri, Oct 21, 2022 at 4:52 PM Ravi Krishna > wrote: > >> on a diff note, is the word memoize inspired from Perl Module memoize > >> which use to do the same thing. > > > It is a general functional programming co

Re: possible bug

2022-10-21 Thread Tom Lane
"David G. Johnston" writes: > On Fri, Oct 21, 2022 at 4:52 PM Ravi Krishna wrote: >> on a diff note, is the word memoize inspired from Perl Module memoize >> which use to do the same thing. > It is a general functional programming concept - not sure on the history > but probably academic and thu

Re: possible bug

2022-10-21 Thread David G. Johnston
On Fri, Oct 21, 2022 at 4:52 PM Ravi Krishna wrote: > on a diff note, is the word memoize inspired from Perl Module memoize > which use to > do the same thing. > It is a general functional programming concept - not sure on the history but probably academic and thus Perl and others picked it up "

Re: possible bug

2022-10-21 Thread Ravi Krishna
on a diff note, is the word memoize inspired from Perl Module memoize which use todo the same thing.

empty pg_stat_progress_vacuum

2022-10-21 Thread senor
Hi all, I'm not seeing any records in pg_stat_progress_vacuum even though there are always around three autovacuum operations listed in pg_stat_activity and at least one of them is "(to prevent wraparound)". They are in state 'active' and state_change is within the last 3 hours. When logging vac

Re: possible bug

2022-10-21 Thread Tom Lane
Les writes: > As always, you hit the nail on the head. set enable_memoize = on fixes the > problem! > Version is PostgreSQL 14.1, time to upgrade... Yup, very likely fixed by c2dc7b9e1 then. > I'm sorry that I wasted your time. No need to apologize, it was an actual bug.

Re: possible bug

2022-10-21 Thread Les
> Which PG version is this exactly? Given the Memoize node shown > in your plan, I suppose 14.something, but is it up to date? > There were Memoize-related bug fixes in 14.2 and 14.4, and the > one in 14.2 looks particularly likely to be relevant. > > If you are on the current minor release, does

Re: constantly updated table in Amazon RDS

2022-10-21 Thread Michael Nolan
On Fri, Oct 21, 2022 at 1:52 PM Julie Nishimura wrote: > Hello, > A table is constantly updated by inserting new rows. Will it affect select > if where clause is based on > date? > Does "where clause" to specify > date and < now? > You haven't described the table. Is there some kind of a date o

Re: possible bug

2022-10-21 Thread Tom Lane
Les writes: > We had a support request today, and we have narrowed down the problem to a > query that behaves very strangely. The actual query was much more > complicated, but I came up with this minimal example. Which PG version is this exactly? Given the Memoize node shown in your plan, I supp

Re: possible bug

2022-10-21 Thread Les
> > > > So what happens if query the table directly?: > > select * from wf.workflow where head_table_id::float8::int8 = 25408438504; > > vs > > select * from wf.workflow where head_table_id = 25408438504; > > Both return lots of rows. The same number of rows. select count(*) from wf.workflow wh

constantly updated table in Amazon RDS

2022-10-21 Thread Julie Nishimura
Hello, A table is constantly updated by inserting new rows. Will it affect select if where clause is based on > date? Does "where clause" to specify > date and < now? Thanks!

Re: possible bug

2022-10-21 Thread Adrian Klaver
On 10/21/22 10:57 AM, Les wrote: One of my colleagues pointed out, that they query returns a different result, if I cast the head_table_id condition to float8 and then back to int8. SELECT c.id ,     tt.code,     c.regno,     (         select count(*)         FROM kap.course_

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
On 10/21/22 10:49 AM, Dionisis Kontominas wrote: 1. I assume you used the Ubuntu Server edition, not the desktop one. Is this correct? Both. They are variations on a theme: https://en.wikipedia.org/wiki/Ubuntu#Official_distributions "Ubuntu has a server edition[113][114] that uses the sa

Re: possible bug

2022-10-21 Thread Les
Not that I know of. I just tried this: reindex table kap.course; reindex table kap.course_user; reindex table wf.workflow; reindex table kap.training_type; But it is still wrong. Adrian Klaver ezt írta (időpont: 2022. okt. 21., P, 19:57): > On 10/21/22 10:50 AM, Les wrote: > > Hello, > > >

Re: possible bug

2022-10-21 Thread Les
One of my colleagues pointed out, that they query returns a different result, if I cast the head_table_id condition to float8 and then back to int8. SELECT c.id, tt.code, c.regno, ( select count(*) FROM kap.course_user cu JOIN wf.workflow w_1 ON w_1.rec_id =

Re: possible bug

2022-10-21 Thread Adrian Klaver
On 10/21/22 10:50 AM, Les wrote: Hello, We had a support request today, and we have narrowed down the problem to a query that behaves very strangely. The actual query was much more complicated, but I came up with this minimal example. This is what we have seen inside our application: select

possible bug

2022-10-21 Thread Les
Hello, We had a support request today, and we have narrowed down the problem to a query that behaves very strangely. The actual query was much more complicated, but I came up with this minimal example. This is what we have seen inside our application: select * from test where id in (26643094740,

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Dionisis Kontominas
1. I assume you used the Ubuntu Server edition, not the desktop one. Is this correct? 2. It depends on whether you keep the GUI in Oracle APEX. If so then yes, as APEX and tomcat and ORDS are free and need only the basic license for the Oracle DB. Otherwise if a free/low cost low cod

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
On 10/21/22 10:25 AM, Dionisis Kontominas wrote: Hello Adam,    Thank you for your response. Regarding the details: 1. I have no experience managing; I know some basic introductory administrator things. Only point I think is important is to consider a server version of Linux and nt a

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Dionisis Kontominas
Hello Adam, Thank you for your response. Regarding the details: 1. I have no experience managing; I know some basic introductory administrator things. Only point I think is important is to consider a server version of Linux and nt a desktop one, i.e. something like Ubuntu Server o

Re: Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Adrian Klaver
On 10/21/22 10:13 AM, Dionisis Kontominas wrote: Hello all,     This is my fist email and I ask for leniency on the response. I am quite new to PostgreSQL, and had my first taste of a Windows version. My background is Oracle and I have some questions. I will also post in the admin list. 1

Asking for existence of a GUI frame work similar to Oracle APEX for PostgreSQL

2022-10-21 Thread Dionisis Kontominas
Hello all, This is my fist email and I ask for leniency on the response. I am quite new to PostgreSQL, and had my first taste of a Windows version. My background is Oracle and I have some questions. I will also post in the admin list. 1. What is the best Linux server for the PostgresQL in

Re: PQconsumeinput() may close the fd

2022-10-21 Thread Tom Lane
Laurenz Albe writes: > On Fri, 2022-10-21 at 07:27 +0300, Vasily Kulikov wrote: >> The problem is that sometimes PQconsumeInput() may close the connection > The function does nothing of the kind. No, he's right: if we detect EOF then we'll close the socket. However, not doing so wouldn't be an i

Re: PQconsumeinput() may close the fd

2022-10-21 Thread Laurenz Albe
On Fri, 2022-10-21 at 07:27 +0300, Vasily Kulikov wrote: > The problem is that sometimes PQconsumeInput() may close the connection The function does nothing of the kind. Is there an error response from the function? Perhaps something else, like a timeout in a network component, closes the connec

Re: Mysterious performance degradation in exceptional cases

2022-10-21 Thread Laurenz Albe
On Fri, 2022-10-21 at 09:48 +0200, Matthias Apitz wrote: > > all this should not take longer than 1-2 seconds, and > > normally it does not take longer. But, in some situations it takes > > longer than 180 seconds, in 10% of the cases. > > DBCEXIT|N|sisisinst|RDIR|4|21.10.2022 06:08:25:594 > DBCEX

Re: Upgrading error

2022-10-21 Thread Tom Lane
chris navarroza writes: > bash-4.4$ /usr/pgsql-14/bin/pg_upgrade > --old-datadir=/home/dmartuser/pgdata/data/ > --new-datadir=/home/dmartuser/pgdata/data/ --old-bindir=/usr/pgsql-12/bin/ > --new-bindir=/usr/pgsql-14/bin/ --check --verbose > Running in verbose mode > Performing Consistency Checks >

Upgrading error

2022-10-21 Thread chris navarroza
Hi, I have a postgresql server version 12.9 and trying to upgrade it to 14.5. My OS is Centos 8 Stream and I already managed to install postgresql14.5 but when I'm trying to upgrade, I am encountering this error bash-4.4$ /usr/pgsql-14/bin/pg_upgrade --old-datadir=/home/dmartuser/pgdata/data/ --n

Re: Mysterious performance degradation in exceptional cases

2022-10-21 Thread Matthias Apitz
El día Mittwoch, September 14, 2022 a las 10:31:26 +0200, Matthias Apitz escribió: > > We have a C-written application server which uses ESQL/C on top > of PostgreSQL 13.1 on Linux. The application in question always serves > the same search in a librarian database, given to the server > as comm

PQconsumeinput() may close the fd

2022-10-21 Thread Vasily Kulikov
Hello, There is an event loop in my program (libev) and I do PQconsumeInput() if there is something ready in the PG socket fd. The problem is that sometimes PQconsumeInput() may close the connection and I learn it by checking for PQsocket() afterwards only. AFAICS, there is no way to learn it befor