| From: | Rui DeSousa <rui(at)crazybean(dot)net> | 
|---|---|
| To: | Pepe TD Vo <pepevo(at)yahoo(dot)com> | 
| Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: database lagging | 
| Date: | 2021-07-23 19:08:55 | 
| Message-ID: | 34014CDE-15BC-481C-9B97-43DB5214657E@crazybean.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin | 
To me that looks like you have synchronous replication and the replica is behind thus your command is waiting for the alter command to be written to the replica’s WAL file. Doing a Ctrl-C terminates the waiting on synchronous replication but the command was already completed on the primary node just not replicated yet.
Can you confirm or deny the use of synchronous replication?
> On Jul 23, 2021, at 1:52 PM, Pepe TD Vo <pepevo(at)yahoo(dot)com> wrote:
> 
> I am doing CIS Benchmart on Postgreql 12.  After alter parameters and when I tried to create a new role.  It's lagging and didn't prompt out the result, until I hit the ctl C key.  Even alter role.  All I needed to hit ctl C key if not, it hung there for ever.  Is there a way to fix it?
> 
> postgres=# create role appuser;
> ^CCancel request sent
> CREATE ROLE
> 
> postgres=# ALTER ROLE appuser NOSUPERUSER;
> ^CCancel request sent
> ALTER ROLE
> 
>  
> postgres=# ALTER ROLE appuser NOREPLICATION;
> ^CCancel request sent
> ALTER ROLE
> 
> postgres=# ALTER ROLE appuser NOCREATEROLE;
> ^CCancel request sent
> ALTER ROLE
> 
> postgres=# ALTER ROLE appuser NOHERIT;
> ^CCancel request sent
> ALTER ROLE
> 
> 
> 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Avinash Kumar | 2021-07-23 19:11:33 | Re: database lagging | 
| Previous Message | Vijaykumar Jain | 2021-07-23 19:03:49 | Re: database lagging |