pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Blocking queries on a hot standby?
3+ messages / 3 participants
[nested] [flat]

* Blocking queries on a hot standby?
@ 2023-09-15 04:30  Victor Sudakov <vas@sibptus.ru>
  0 siblings, 2 replies; 3+ messages in thread

From: Victor Sudakov @ 2023-09-15 04:30 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Dear Colleagues,

Can you imagine, at least theoretically, any kind of query on a
physical replica (hot standby) which would block other queries on the
same replica?


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Blocking queries on a hot standby?
@ 2023-09-15 06:24  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Victor Sudakov <vas@sibptus.ru>
  1 sibling, 0 replies; 3+ messages in thread

From: Laurenz Albe @ 2023-09-15 06:24 UTC (permalink / raw)
  To: Victor Sudakov <vas@sibptus.ru>; pgsql-admin@lists.postgresql.org

On Fri, 2023-09-15 at 04:30 +0000, Victor Sudakov wrote:
> Can you imagine, at least theoretically, any kind of query on a
> physical replica (hot standby) which would block other queries on the
> same replica?

I cannot.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Blocking queries on a hot standby?
@ 2023-09-18 03:41  Rui DeSousa <rui@crazybean.net>
  parent: Victor Sudakov <vas@sibptus.ru>
  1 sibling, 0 replies; 3+ messages in thread

From: Rui DeSousa @ 2023-09-18 03:41 UTC (permalink / raw)
  To: Victor Sudakov <vas@sibptus.ru>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>



> On Sep 15, 2023, at 12:30 AM, Victor Sudakov <vas@sibptus.ru> wrote:
> 
> Can you imagine, at least theoretically, any kind of query on a
> physical replica (hot standby) which would block other queries on the
> same replica?


The only thing that comes to mine is advisory locks and also queries can block replication replay.

prod=# select pg_is_in_recovery();
-[ RECORD 1 ]-----+--
pg_is_in_recovery | t

prod=# select * from blocked_session;
-[ RECORD 1 ]---+-----------------------------
pid             | 39330
tree            | 39330
root            | 39330
level           | 0
user            | rui
state           | idle
state_duration  | 00:01:01.663597
wait_event_type | Client
wait_event      | ClientRead
lockmode        | ExclusiveLock
locktype        | advisory
granted         | t
lock_wait       | 
blocked         | 1
query           | select pg_advisory_lock(42);
objects         | 
-[ RECORD 2 ]---+-----------------------------
pid             | 39327
tree            | 39330.39327
root            | 39330
level           | 1
user            | rui
state           | active
state_duration  | 00:00:51.407894
wait_event_type | Lock
wait_event      | advisory
lockmode        | ExclusiveLock
locktype        | advisory
granted         | f
lock_wait       | 00:00:51.407746
blocked         | 0
query           | select pg_advisory_lock(42);
objects         | 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2023-09-18 03:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15 04:30 Blocking queries on a hot standby? Victor Sudakov <vas@sibptus.ru>
2023-09-15 06:24 ` Laurenz Albe <laurenz.albe@cybertec.at>
2023-09-18 03:41 ` Rui DeSousa <rui@crazybean.net>

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