From: Rui DeSousa <rui@crazybean.net>
To: Pepe TD Vo <pepevo@yahoo.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: database lagging
Date: Fri, 23 Jul 2021 15:08:55 -0400
Message-ID: <34014CDE-15BC-481C-9B97-43DB5214657E@crazybean.net> (raw)
In-Reply-To: <1396983439.574027.1627062741652@mail.yahoo.com>
References: <1396983439.574027.1627062741652.ref@mail.yahoo.com>
<1396983439.574027.1627062741652@mail.yahoo.com>
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@yahoo.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
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rui@crazybean.net, pepevo@yahoo.com, pgsql-admin@lists.postgresql.org
Subject: Re: database lagging
In-Reply-To: <34014CDE-15BC-481C-9B97-43DB5214657E@crazybean.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox