Re: How to explicitly lock and unlock tables in pgsql?

2022-03-17 Thread Laurenz Albe
On Wed, 2022-03-16 at 20:30 +, Shaozhong SHI wrote: > Table locks present a barrier for progressing queries. > > How to explicitly lock and unlock tables in pgsql, so that we can guarantee > the progress of running scripts? You cannot unlock tables except by ending the transaction which took

PSQL bug?

2022-03-17 Thread Dominique Devienne
Made a typo, using } instead of ) to test a weird table name, and got disconnected. Normal? --DD ddevienne=> create table "t |" ( id int}; ddevienne(> ); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the re

Re: PSQL bug?

2022-03-17 Thread Pavel Stehule
Hi čt 17. 3. 2022 v 11:35 odesílatel Dominique Devienne napsal: > Made a typo, using } instead of ) to test a weird table name, and got > disconnected. Normal? --DD > > ddevienne=> create table "t |" ( id int}; > ddevienne(> ); > server closed the connection unexpectedly > This probably

Re: PSQL bug?

2022-03-17 Thread Dominique Devienne
On Thu, Mar 17, 2022 at 11:38 AM Pavel Stehule wrote: >> Made a typo, [...], and got disconnected. Normal? --DD > I don't see any problem on master OK, good. Must have been fixed already then. Or was a fluke. Thanks for checking. --DD

Re: PSQL bug?

2022-03-17 Thread Josef Šimánek
čt 17. 3. 2022 v 12:06 odesílatel Dominique Devienne napsal: > > On Thu, Mar 17, 2022 at 11:38 AM Pavel Stehule > wrote: > >> Made a typo, [...], and got disconnected. Normal? --DD > > I don't see any problem on master > > OK, good. Must have been fixed already then. Or was a fluke. Thanks > for

High Postgres postmaster CPU when My Background Worker is loaded.

2022-03-17 Thread GoLang Developere
Hi, Please help me troubleshoot the issue I am facing currently. I have tried various methods I can think with no success. I am using PostgreSql & golang in my project I have created a postgresql background worker using golang. This background worker listens to LISTEN/NOTIFY channel in postgres a

Query on WAL Optimization and Streaming Replication

2022-03-17 Thread Shukla, Pranjal
During upgrades of our application, we generally shutdown all Secondary servers which are getting stream replicated from Primary Servers. This is to maintain a copy of database on other servers should we wish to revert (of course we take DB Backups too before starting the activity). After the ap

Re: Query on WAL Optimization and Streaming Replication

2022-03-17 Thread Laurenz Albe
On Thu, 2022-03-17 at 12:36 +, Shukla, Pranjal wrote: > uring upgrades of our application, we generally shutdown all Secondary servers > which are getting stream replicated from Primary Servers. This is to maintain > a copy of database on other servers should > we wish to revert (of course we t

Re: Query on WAL Optimization and Streaming Replication

2022-03-17 Thread Laurenz Albe
On Thu, 2022-03-17 at 14:05 +, Shukla, Pranjal wrote: > From the configuration we have, does it mean that the primary will retain 32 > WAL's > of 1 GB each and then start evicting the first WAL as soon as the last one > gets filled? > In layman's term, 32GB is huge amount of data and I don't

Re: Query on WAL Optimization and Streaming Replication

2022-03-17 Thread Shukla, Pranjal
Hi Laurenze, From the configuration we have, does it mean that the primary will retain 32 WAL's of 1 GB each and then start evicting the first WAL as soon as the last one gets filled? In layman's term, 32GB is huge amount of data and I don't think that much changes during upgrades. In fact the t

Re: Query on WAL Optimization and Streaming Replication

2022-03-17 Thread Shukla, Pranjal
Ok, Then what will increase the size of the WAL? Sent from my iPhone > On 17-Mar-2022, at 8:08 PM, Laurenz Albe wrote: > On Thu, 2022-03-17 at 14:05 +, Shukla, Pranjal wrote: >> From the configuration we have, does it mean that the primary will retain 32 >> WAL's >> of 1 GB each and then s

Re[5]: LISTEN/NOTIFY ultra slow speed

2022-03-17 Thread Арсен Арутюнян
I want to tell you about the problem solution. I had to move to postgres 13.            As can be seen from the async.c code, since the 13th version, the implementation of the  LISTEN/NOTIFY mechanism has undergone major changes. The transfer of tables and database data from version 10 to versio

Re: PSQL bug?

2022-03-17 Thread Kyotaro Horiguchi
At Thu, 17 Mar 2022 11:38:30 +0100, Dominique Devienne wrote in > Made a typo, using } instead of ) to test a weird table name, and got > disconnected. Normal? --DD > > ddevienne=> create table "t |" ( id int}; > ddevienne(> ); > server closed the connection unexpectedly > This probably