Max connections reached without max connections reached

2021-11-22 Thread James Sewell
Hi, This is a bit of an odd one - I'm on PostgreSQL 11.9 with a single streaming replica. The system handles a lot of connections - we have a max_connections of 600. Most are long lived JDBC, but there are a lot of ETL / ad-hoc jobs etc. Connections normally sit at 300ish, with 70 active at the

Re: Why swirling circles in pgAdmin?

2021-11-22 Thread Adrian Klaver
On 11/22/21 18:14, Shaozhong SHI wrote: Why there are swirling circles in pgAdmin and no expansion to view details? Huh? This is going to need more detail in order to get an answer. In particular: 1) What action is causing swirling circles? 2) Expansion of what? Regards, David -- Ad

Why swirling circles in pgAdmin?

2021-11-22 Thread Shaozhong SHI
Why there are swirling circles in pgAdmin and no expansion to view details? Regards, David

Re:

2021-11-22 Thread Tom Lane
AC Gomez writes: > REASSIGN OWNED BY old_role TO masteruser; > DROP OWNED BY old_role; > DROP USER old_role; > The consensus online is that these are the steps to be taken to > successfully remove roles, yet we get this error below: > ERROR: role "old_role" cannot be dropped because some objects

[no subject]

2021-11-22 Thread AC Gomez
Postgres 9.6. We're attempting to delete some old users from a DB. Log into DB as masteruser. Run this block of commands (the_schema=public, and it's the only schema in this particular DB): REVOKE ALL PRIVILEGES ON DATABASE the_database FROM old_role; REVOKE USAGE ON SCHEMA the_schema FROM old_r

Re: insert column monetary type ver 2

2021-11-22 Thread Tom Lane
Adrian Klaver writes: > On 11/21/21 19:21, Ron wrote: >> Why then does the money type exist?  At the very least, why isn't it >> deprecated? > It was at one point: > https://www.postgresql.org/docs/8.2/datatype-money.html > Not entirely sure why it was revived. You can search the mailing list

Re: pg_dump insert column GENERATED

2021-11-22 Thread Дмитрий Иванов
Thank you, there is a clear logic to it. -- Regards, Dmitry! пн, 22 нояб. 2021 г. в 21:11, Adrian Klaver : > On 11/22/21 03:32, Дмитрий Иванов wrote: > > Got it. > > > > > > >You are going need to provide more information about the above: > > >1) Define regular results. > > >2) Th

Re: insert column monetary type ver 2

2021-11-22 Thread Adrian Klaver
On 11/21/21 19:21, Ron wrote: Which means *that* is broken. Especially since money is a type we advise people avoid anyway.  We can just add this to the list of reasons why. Why then does the money type exist?  At the very least, why isn't it deprecated? It was at one point: https:/

Re: pg_dump insert column GENERATED

2021-11-22 Thread Adrian Klaver
On 11/22/21 03:32, Дмитрий Иванов wrote: Got it. >You are going need to provide more information about the above: >1) Define regular results. >2) The query used. >3) The outcome vs what you expected. I will continue to experiment. The question is which option is better (th

Re: insert column monetary type ver 2

2021-11-22 Thread Дмитрий Иванов
About the locale, I wanted to add a couple of lines. I noticed a strange behavior of the currency symbol. The EDB installer, when specifying the Russian locale, sets the following locale parameters: (PostgreSQL 12.9, compiled by Visual C++ build 1914, 64-bit) (Encoding UTF8) lc_messages = 'Russian_

Re: pg_dump insert column GENERATED

2021-11-22 Thread Дмитрий Иванов
It seems to me that you are right all round (I gave up COPY because of problems with the MONEY type): sudo /usr/lib/postgresql/14/bin/pg_dump --file "/home/dismay/uchet/object.sql" --host "server" --port "5999" --username "back" --no-password --verbose --format=p --quote-all-identifiers --encoding

Re: insert column monetary type ver 2

2021-11-22 Thread Tom Lane
Ron writes: > On 11/21/21 9:35 PM, Rob Sargent wrote: >> Some of us like it as an easy formatter trick for reports > to_char() can do the same, no? to_char doesn't have adequate logic for locale-specific monetary formatting. You can get it to emit a locale-specific currency symbol, but it has no

Re: pg_dump insert column GENERATED

2021-11-22 Thread Дмитрий Иванов
Рад помочь! -- С уважением, Дмитрий! пн, 22 нояб. 2021 г. в 19:55, Tom Lane : > =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= > writes: > > Uchet=# select attname, attgenerated from pg_attribute > > Uchet-# where attrelid = 'bpd.object'::regclass and attnum > 0; > > attname

Doubt regarding Postgres replication issue

2021-11-22 Thread Palani vel
Hi Team, Greetings!  I have a doubt regarding Postgres replication. I am able to create replication setup. But when the network is down for 60 seconds, the replication was broken. Communication is broken between Master and slave. Slave is trying to become master and it is not able to sync with m

Re: pg_dump insert column GENERATED

2021-11-22 Thread Tom Lane
=?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= writes: > Uchet=# select attname, attgenerated from pg_attribute > Uchet-# where attrelid = 'bpd.object'::regclass and attnum > 0; > attname| attgenerated > ---+-- > id

Re: pg_dump insert column GENERATED

2021-11-22 Thread Дмитрий Иванов
Got it. > > >You are going need to provide more information about the above: > >1) Define regular results. > >2) The query used. > >3) The outcome vs what you expected. > > I will continue to experiment. The question is which option is better (this would reduce the number of options): pd_dump is t