agora inbox for pgsql-hackers@postgresql.orghelp / color / mirror / Atom feed
[PATCH 6/8] cirrus/ccache: add explicit cache keys.. 7+ messages / 2 participants [nested] [flat]
* [PATCH 6/8] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 37fd79e5b77..221431e70c4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -87,6 +87,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -181,6 +184,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -359,6 +364,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}" @@ -513,6 +521,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.25.1 --rPFbv4B2w2tcwGo5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0007-cirrus-ccache-disable-compression-and-show-stats.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 03/11] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index a3b84d3b1c0..061c8e1c7df 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -87,6 +87,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -181,6 +184,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -359,6 +364,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}" @@ -510,6 +518,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.25.1 --I4VOKWutKNZEOIPu Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-cirrus-ccache-avoid-clearing-cache-until-after-all-c.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 03/11] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index a3b84d3b1c0..061c8e1c7df 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -87,6 +87,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -181,6 +184,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -359,6 +364,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}" @@ -510,6 +518,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.25.1 --I4VOKWutKNZEOIPu Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-cirrus-ccache-avoid-clearing-cache-until-after-all-c.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 6/8] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 37fd79e5b77..221431e70c4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -87,6 +87,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -181,6 +184,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -359,6 +364,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}" @@ -513,6 +521,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.25.1 --rPFbv4B2w2tcwGo5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0007-cirrus-ccache-disable-compression-and-show-stats.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 04/23] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 54256570030..183e8746ce6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -68,6 +68,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -175,6 +178,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -289,6 +294,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" INCLUDES="${brewpath}/include:${INCLUDES}" @@ -519,6 +527,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.17.1 --tKkaNMvYmhQvRCRK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0005-cirrus-enable-various-runtime-checks-on-macos-and-fr.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 04/25] cirrus/ccache: add explicit cache keys.. @ 2022-07-27 01:30 Justin Pryzby <pryzbyj@telsasoft.com> 0 siblings, 0 replies; 7+ messages in thread From: Justin Pryzby @ 2022-07-27 01:30 UTC (permalink / raw) Since otherwise, building with ci-os-only will probably fail to use the normal cache, since the cache key is computed using both the task name and its *index* in the list of caches (internal/executor/cache.go:184). --- .cirrus.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index c0616e8560d..4af6105aac7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -68,6 +68,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/freebsd + reupload_on_changes: true + # Workaround around performance issues due to 32KB block size repartition_script: src/tools/ci/gcp_freebsd_repartition.sh create_user_script: | @@ -175,6 +178,8 @@ task: ccache_cache: folder: ${CCACHE_DIR} + fingerprint_key: ccache/linux + reupload_on_changes: true sysinfo_script: | id @@ -289,6 +294,9 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/macos + reupload_on_changes: true + configure_script: | brewpath="/usr/local" INCLUDES="${brewpath}/include:${INCLUDES}" @@ -513,6 +521,8 @@ task: ccache_cache: folder: $CCACHE_DIR + fingerprint_key: ccache/warnings + reupload_on_changes: true setup_additional_packages_script: | #apt-get update -- 2.17.1 --IS0zKkzwUGydFO0o Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0005-silence-make-distprep-and-generated-headers.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v4 2/3] Adding XID generation count per backend @ 2025-08-08 15:58 Bertrand Drouvot <bertranddrouvot.pg@gmail.com> 0 siblings, 0 replies; 7+ messages in thread From: Bertrand Drouvot @ 2025-08-08 15:58 UTC (permalink / raw) This commit adds a new counter to record the number of XIDs generated per backend. It will help to detect if a backend is consuming XIDs at a high rate. Virtual transactions are not taken into account on purpose, we do want to track only the XID where there is a risk of wraparound. --- src/backend/access/transam/varsup.c | 4 ++++ src/backend/utils/activity/pgstat_backend.c | 2 ++ src/include/pgstat.h | 2 ++ 3 files changed, 8 insertions(+) 43.8% src/backend/access/transam/ 36.6% src/backend/utils/activity/ 19.4% src/include/ diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index f8c4dada7c9..72c8aa7650b 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -24,6 +24,7 @@ #include "storage/pmsignal.h" #include "storage/proc.h" #include "utils/lsyscache.h" +#include "utils/pgstat_internal.h" #include "utils/syscache.h" @@ -257,6 +258,9 @@ GetNewTransactionId(bool isSubXact) /* LWLockRelease acts as barrier */ MyProc->xid = xid; ProcGlobal->xids[MyProc->pgxactoff] = xid; + PendingBackendStats.pending_xid_count++; + backend_has_xactstats = true; + pgstat_report_fixed = true; } else { diff --git a/src/backend/utils/activity/pgstat_backend.c b/src/backend/utils/activity/pgstat_backend.c index 47ce61e5093..5e509153656 100644 --- a/src/backend/utils/activity/pgstat_backend.c +++ b/src/backend/utils/activity/pgstat_backend.c @@ -285,9 +285,11 @@ pgstat_flush_backend_entry_xact(PgStat_EntryRef *entry_ref) shbackendent->stats.xact_commit += PendingBackendStats.pending_xact_commit; shbackendent->stats.xact_rollback += PendingBackendStats.pending_xact_rollback; + shbackendent->stats.xid_count += PendingBackendStats.pending_xid_count; PendingBackendStats.pending_xact_commit = 0; PendingBackendStats.pending_xact_rollback = 0; + PendingBackendStats.pending_xid_count = 0; backend_has_xactstats = false; } diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 0fdbaf79780..d78633cae44 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -492,6 +492,7 @@ typedef struct PgStat_Backend PgStat_WalCounters wal_counters; PgStat_Counter xact_commit; PgStat_Counter xact_rollback; + PgStat_Counter xid_count; } PgStat_Backend; /* --------- @@ -510,6 +511,7 @@ typedef struct PgStat_BackendPending */ PgStat_Counter pending_xact_commit; PgStat_Counter pending_xact_rollback; + PgStat_Counter pending_xid_count; } PgStat_BackendPending; /* -- 2.34.1 --jg9kqX3osLGO+8A7 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v4-0003-Adding-the-pg_stat_backend_transaction-view.patch" ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-08-08 15:58 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-07-27 01:30 [PATCH 6/8] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2022-07-27 01:30 [PATCH 03/11] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2022-07-27 01:30 [PATCH 03/11] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2022-07-27 01:30 [PATCH 6/8] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2022-07-27 01:30 [PATCH 04/23] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2022-07-27 01:30 [PATCH 04/25] cirrus/ccache: add explicit cache keys.. Justin Pryzby <pryzbyj@telsasoft.com> 2025-08-08 15:58 [PATCH v4 2/3] Adding XID generation count per backend Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox