pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix up pg_dump's --binary-upgrade option so that it behaves
3+ messages / 2 participants
[nested] [flat]

* pgsql: Fix up pg_dump's --binary-upgrade option so that it behaves
@ 2009-07-02 21:34  Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: tgl@postgresql.org @ 2009-07-02 21:34 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Fix up pg_dump's --binary-upgrade option so that it behaves properly with
inherited columns and check constraints.  Per my recent trouble report.

Modified Files:
--------------
    pgsql/src/bin/pg_dump:
        pg_dump.c (r1.539 -> r1.540)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.539&r2=1.540)




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

* pgsql: Fix up pg_dump's --binary-upgrade option so that it behaves
@ 2009-07-02 21:34  Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: tgl@postgresql.org @ 2009-07-02 21:34 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Fix up pg_dump's --binary-upgrade option so that it behaves properly with
inherited columns and check constraints.  Per my recent trouble report.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/bin/pg_dump:
        pg_dump.c (r1.539 -> r1.539.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.539&r2=1.539.2.1)




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

* pgsql: Improve consistency of replication slot statistics
@ 2024-03-11 01:26  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2024-03-11 01:26 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve consistency of replication slot statistics

The replication slot stats stored in shared memory rely on an internal
index number.  Both pgstat_reset_replslot() and pgstat_fetch_replslot()
lacked some LWLock protections with ReplicationSlotControlLock while
operating on these index numbers.  This issue could cause these two
functions to potentially operate on incorrect slots when taken in
isolation in the event of slots dropped and/or re-created concurrently.

Note that pg_stat_get_replication_slot() is called once per slot when
querying pg_stat_replication_slots, meaning that the stats are retrieved
across multiple ReplicationSlotControlLock acquisitions.  So, while this
commit improves more consistency, it may still be possible that
statistics are not completely consistent for a single scan of
pg_stat_replication_slots under concurrent replication slot drop or
creation activity.

The issue should unlikely be a problem in practice, causing the report
of inconsistent stats or or the stats reset of an incorrect slot, so no
backpatch is done.

Author: Bertrand Drouvot
Reviewed-by: Heikki Linnakangas, Shveta Malik, Michael Paquier
Discussion: https://postgr.es/m/ZeGq1HDWFfLkjh4o@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b36fbd9f8da140f5b0ef9f7daa6b3cb4cae8a69b

Modified Files
--------------
src/backend/utils/activity/pgstat_replslot.c | 42 +++++++++++++++++-----------
1 file changed, 25 insertions(+), 17 deletions(-)



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


end of thread, other threads:[~2024-03-11 01:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02 21:34 pgsql: Fix up pg_dump's --binary-upgrade option so that it behaves Tom Lane <tgl@postgresql.org>
2009-07-02 21:34 pgsql: Fix up pg_dump's --binary-upgrade option so that it behaves Tom Lane <tgl@postgresql.org>
2024-03-11 01:26 pgsql: Improve consistency of replication slot statistics Michael Paquier <michael@paquier.xyz>

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