Re: Postgresql HA cluster

2023-10-18 Thread Jehan-Guillaume de Rorthais
Hi Jason, On Tue, 17 Oct 2023 19:59:00 + Jason Grammenos wrote: [...] > If you have 2 PostgreSQL nodes hooked up to a Load balancer (haproxy), and > you move take node1 out of load balancing, you now have connections on node1 > and connections on node2, as the Load balancer drains the connec

Re: Index based search have issues with 11.20

2023-10-18 Thread Hafeez Rahim
Thanks for the providing the references we will go through the wiki link and identify the glibc version updates during the OS patching. On Tue, Oct 17, 2023 at 10:18 PM Tom Lane wrote: > Hafeez Rahim writes: > > Issue : > > > One of the table query not woks when string values are filtered wit

Re: Index based search have issues with 11.20

2023-10-18 Thread Hafeez Rahim
Thanks for the details We will further check on the references given On Tue, Oct 17, 2023 at 10:20 PM Adrian Klaver wrote: > On 10/17/23 11:24, Hafeez Rahim wrote: > > > > Hi > > > > This is to check regarding an issue we came across on postgreSQL > > community version 11 with minor patch 11.20

A few questions about foreign tables

2023-10-18 Thread Marcin Borkowski
Hello, I want to set up a few foreign tables (to access tables from one PostgreSQL database in another one). However, I want to do it "properly", using a database migration tool, so I need to have a "down" migration to revert to the previous state. How to revert the effect of "import foreign sch

postgres keeps having blocks

2023-10-18 Thread Shaozhong SHI
My postgres is playing up. I terminated session that is causing blocks many time. New block appears. Endless. What should I do? Regards, David

Re: Inheritance in PostgreSQL

2023-10-18 Thread Luis Bruno
> Thank you all for your responses. I appreciate the input on the use of > table inheritance in PostgreSQL, and I will take your recommendations into > consideration. The provided link is also quite useful, and I'm grateful for > the solution provided by Ron regarding normalization. Thanks! >

Re: postgres keeps having blocks

2023-10-18 Thread David G. Johnston
On Wednesday, October 18, 2023, Shaozhong SHI wrote: > My postgres is playing up. > > I terminated session that is causing blocks many time. > > New block appears. > > Endless. > > What should I do? > PostgreSQL is probably just doing what you told it. Not possible to give advice without knowin

Re: Inheritance in PostgreSQL

2023-10-18 Thread Thomas Kellerer
Merlin Moncure schrieb am 18.10.2023 um 03:20: > The only thing you can't really do in SQL easily without writing > nasty triggers are things like, 'this table must be linked from one > and only one of these candidate tables'. I think the language > probably ought to support this, but I don't thin

Re: postgres keeps having blocks

2023-10-18 Thread Ron
On 10/18/23 07:40, David G. Johnston wrote: On Wednesday, October 18, 2023, Shaozhong SHI wrote: My postgres is playing up. I terminated session that is causing blocks many time. New block appears. Endless. What should I do? PostgreSQL is probably just doing what you t

Re: A few questions about foreign tables

2023-10-18 Thread Laurenz Albe
On Wed, 2023-10-18 at 10:24 +0200, Marcin Borkowski wrote: > How to revert the effect of "import foreign schema"?  Is just dropping > the imported tables enough? Running DROP FOREIGN TABLE ... for all imported tables is enough. > Also, how can I check the definitions (i.e., what tables on the ser

Re: A few questions about foreign tables

2023-10-18 Thread Ron
And SELECT relnamespace::regnamespace::text, relname FROM pg_class WHERE relkind='f'; tells you all of the foreign tables. Thus, this (untested) query generate all of the DROP FOREIGN TABLE statements: SELECT format('DROP FOREIGN TABLE IF EXISTS %I.%I RESTRICT;'   , relnamespace::reg

Re: postgres keeps having blocks

2023-10-18 Thread Adrian Klaver
On 10/18/23 04:27, Shaozhong SHI wrote: My postgres is playing up. I terminated session that is causing blocks many time. New block appears. Endless. What should I do? Provide more information. 1) Postgres version. 2) Define what blocks means. 3) Show us the statements/code that is causi

Re: postgres keeps having blocks

2023-10-18 Thread Rob Sargent
On 10/18/23 10:15, Adrian Klaver wrote: On 10/18/23 04:27, Shaozhong SHI wrote: My postgres is playing up. I terminated session that is causing blocks many time. New block appears. Endless. What should I do? Provide more information. 1) Postgres version. 2) Define what blocks means. 3)

Re: psql \du no more showing "member of" column

2023-10-18 Thread Bruce Momjian
On Fri, Oct 13, 2023 at 05:45:35PM +0200, Lele Gaifax wrote: > Ian Lawrence Barwick writes: > > > and also noted in the release notes: > > > > https://www.postgresql.org/docs/16/release-16.html#RELEASE-16-PSQL > > FWIW, I noticed a small typo in the relevant entry: s/informaion/information/ >

Re: Inheritance in PostgreSQL

2023-10-18 Thread Merlin Moncure
On Wed, Oct 18, 2023 at 7:43 AM Thomas Kellerer wrote: > Merlin Moncure schrieb am 18.10.2023 um 03:20: > > The only thing you can't really do in SQL easily without writing > > nasty triggers are things like, 'this table must be linked from one > > and only one of these candidate tables'. I thin

How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?

2023-10-18 Thread 毛毛
Hi, Do we have a rule by follow which one can accurately info the output of a SELECT statment FROM a table with floating-point data type? I am working with PostgreSQL 16 and pgAdmin 7.6. Here is my SQL script: ``` CREATE TABLE TEST (REAL_COLUMN real); INSERT INTO TEST VALUES (12345.12345

Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?

2023-10-18 Thread Tom Lane
=?GBK?B?w6vDqw==?= writes: > Do we have a rule by follow which one can accurately info the output of a > SELECT statment FROM a table with floating-point data type? The goal of our floating-point output functions is to produce the shortest representation from which the stored value could be reco

Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?

2023-10-18 Thread David G. Johnston
On Wednesday, October 18, 2023, 毛毛 wrote: > > > I consulted the following doc and found that the range of real type is 6 > decimal digits precision. > https://www.postgresql.org/docs/current/datatype-numeric. > html#DATATYPE-NUMERIC > You also need to consult: https://www.postgresql.org/docs/cur