public inbox for [email protected]
help / color / mirror / Atom feedRequest to Add New Package: pgsentinel
7+ messages / 4 participants
[nested] [flat]
* Request to Add New Package: pgsentinel
@ 2025-07-21 19:09 Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Huang Yuying @ 2025-07-21 19:09 UTC (permalink / raw)
To: pgsql-pkg-debian; +Cc: [email protected] <[email protected]>; [email protected] <[email protected]>
Dear PostgreSQL Package Debian Team,
My name is Laura Huang, and I am writing to request consideration for adding a new package for the existing PostgreSQL extension, pgsentinel, within the PostgreSQL community. This package was developed under the mentorship and guidance of Jeremy Schneider (cc’d), who has been involved throughout the process.
pgsentinel is used for sampling and recording active session history in PostgreSQL databases. It enables users to monitor session activities, linking it with query statistics from pg_stat_statements, and provides deeper visibility into workload patterns, blocking events, and query performance.
To facilitate easier installation and broader usability, we have created a package for pgsentinel that supports multiple PostgreSQL versions (14 and above). By offering pgsentinel as a package, users benefit from easier upgrades, simplified integration with system package managers, and improved maintainability compared to manual installation methods.
For the recently released PostgreSQL 18-beta, we have manually tested pgsentinel with PostgreSQL 18-beta and confirmed that it works as expected, collecting data and functioning properly.
The packaging code is publicly available at: https://salsa.debian.org/laurah159/pgsentinel/.
To support packaging, we made the following changes to the upstream pgsentinel code:
1. Added a top-Level Makefile
The upstream repo places its Makefile in the src/ directory. However, during debuild, the build process expects a Makefile at the root. To resolve this, we added a top-level Makefile in the root directory that points to src/Makefile.
(Alternatively, we considered adding the '--sourcedirectory=src' suffix to all overrides in the debian/rules file, but opted for the top-level Makefile approach. If there is a preferred or better method, please let us know.)
1. Updated Makefile for Testing
In the original Makefile, the line 'REGRESS_OPTS = --temp-config=./pgsentinel.conf --temp-instance=./tmp_check' causes a conflict, since debuild already creates a temporary cluster for regression checks during installcheck, specifying '--temp-instance=./tmp_check' leads to errors. We adjusted this to avoid the conflict.
Forked repo with changes: https://github.com/laurahuang106/pgsentinel
We plan to open a PR against the upstream pgsentinel repository tomorrow or Wednesday. If you have any guidance or suggestions, we would greatly appreciate your feedback!
By the way, in the debian/control.in file, is it possible to add two uploaders? Jeremy will probably be the ongoing maintainer, and I would like to include him as an uploader.
Thank you for your time and consideration. Looking forward to your response!
Best regards,
Laura
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
@ 2025-07-21 20:06 ` Christoph Berg <[email protected]>
2025-07-21 22:55 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Berg @ 2025-07-21 20:06 UTC (permalink / raw)
To: Huang Yuying <[email protected]>; +Cc: pgsql-pkg-debian; [email protected] <[email protected]>; [email protected] <[email protected]>
Re: Huang Yuying
> The packaging code is publicly available at: https://salsa.debian.org/laurah159/pgsentinel/.
>
> To support packaging, we made the following changes to the upstream pgsentinel code:
>
> 1. Added a top-Level Makefile
Hi,
this doesn't to be present yet in the 1.1.0 tarball. How did you
invoke the build such that it actually worked?
$ dpkg-buildpackage -rfakeroot -us -uc -i -I -j20
dpkg-buildpackage: info: source package pgsentinel
dpkg-buildpackage: info: source version 1.1.0-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Laura H. <[email protected]>
dpkg-buildpackage: info: host architecture amd64
dpkg-source -i -I --before-build .
debian/rules clean
dh clean --with pgxs_loop
dh_auto_clean --buildsystem=pgxs_loop
pg_buildext clean build-%v postgresql-%v-pgsentinel
rm -rf build-*/
rm -rf debian/postgresql-17-pgsentinel/ debian/postgresql-*-pgsentinel.substvars
dh_clean
pg_buildext checkcontrol
dpkg-source -i -I -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building pgsentinel using existing ./pgsentinel_1.1.0.orig.tar.gz
dpkg-source: info: building pgsentinel in pgsentinel_1.1.0-1.debian.tar.xz
dpkg-source: info: building pgsentinel in pgsentinel_1.1.0-1.dsc
debian/rules binary
dh binary --with pgxs_loop
dh_update_autotools_config
dh_autoreconf
dh_auto_build --buildsystem=pgxs_loop
create-stamp debian/debhelper-build-stamp
dh_prep
dh_auto_install --buildsystem=pgxs_loop --destdir=debian/postgresql-17-pgsentinel/
pg_buildext loop postgresql-%v-pgsentinel
### PostgreSQL 17 loop ###
# 17: make
make[1]: Entering directory '/home/myon/projects/postgresql/pgsentinel/pgsentinel'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/home/myon/projects/postgresql/pgsentinel/pgsentinel'
### End 17 loop (FAILED with exit code 2) ###
dh_auto_install: error: pg_buildext loop postgresql-%v-pgsentinel returned exit code 2
make: *** [debian/rules:10: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
> By the way, in the debian/control.in file, is it possible to add two uploaders? Jeremy will probably be the ongoing maintainer, and I would like to include him as an uploader.
It's a comma-separated list.
Christoph
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
@ 2025-07-21 22:55 ` Huang Yuying <[email protected]>
2025-07-22 06:49 ` Re: Request to Add New Package: pgsentinel Jeremy Schneider <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Huang Yuying @ 2025-07-21 22:55 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; +Cc: pgsql-pkg-debian; [email protected] <[email protected]>; [email protected] <[email protected]>
Hi Christoph,
Thank you for your prompt response!
Regarding the build issue you mentioned, for testing, we manually downloaded the code from my GitHub repository (forked repo: https://github.com/laurahuang106/pgsentinel) instead of letting Debian pull it using the watch file.
The Makefile is not yet in the upstream repository. As mentioned in the previous email, we made some changes to the source code, and pushed to my forked repo. Does anyone here think it might be better to add the '--sourcedirectory=src' suffix to all overrides in the debian/rules file instead of creating a top-level Makefile?
Please let me know if you have any questions or suggestions. Thank you!
Sincerely,
Laura
------------------------------------------------------------------------------------------------------------------------------
On 7/21/25, 13:06, "Christoph Berg" <[email protected] <mailto:[email protected]>> wrote:
Re: Huang Yuying
> The packaging code is publicly available at: https://salsa.debian.org/laurah159/pgsentinel/ <https://salsa.debian.org/laurah159/pgsentinel/;.
>
> To support packaging, we made the following changes to the upstream pgsentinel code:
>
> 1. Added a top-Level Makefile
Hi,
this doesn't to be present yet in the 1.1.0 tarball. How did you
invoke the build such that it actually worked?
$ dpkg-buildpackage -rfakeroot -us -uc -i -I -j20
dpkg-buildpackage: info: source package pgsentinel
dpkg-buildpackage: info: source version 1.1.0-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Laura H. <[email protected] <mailto:[email protected]>>
dpkg-buildpackage: info: host architecture amd64
dpkg-source -i -I --before-build .
debian/rules clean
dh clean --with pgxs_loop
dh_auto_clean --buildsystem=pgxs_loop
pg_buildext clean build-%v postgresql-%v-pgsentinel
rm -rf build-*/
rm -rf debian/postgresql-17-pgsentinel/ debian/postgresql-*-pgsentinel.substvars
dh_clean
pg_buildext checkcontrol
dpkg-source -i -I -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building pgsentinel using existing ./pgsentinel_1.1.0.orig.tar.gz
dpkg-source: info: building pgsentinel in pgsentinel_1.1.0-1.debian.tar.xz
dpkg-source: info: building pgsentinel in pgsentinel_1.1.0-1.dsc
debian/rules binary
dh binary --with pgxs_loop
dh_update_autotools_config
dh_autoreconf
dh_auto_build --buildsystem=pgxs_loop
create-stamp debian/debhelper-build-stamp
dh_prep
dh_auto_install --buildsystem=pgxs_loop --destdir=debian/postgresql-17-pgsentinel/
pg_buildext loop postgresql-%v-pgsentinel
### PostgreSQL 17 loop ###
# 17: make
make[1]: Entering directory '/home/myon/projects/postgresql/pgsentinel/pgsentinel'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/home/myon/projects/postgresql/pgsentinel/pgsentinel'
### End 17 loop (FAILED with exit code 2) ###
dh_auto_install: error: pg_buildext loop postgresql-%v-pgsentinel returned exit code 2
make: *** [debian/rules:10: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
> By the way, in the debian/control.in file, is it possible to add two uploaders? Jeremy will probably be the ongoing maintainer, and I would like to include him as an uploader.
It's a comma-separated list.
Christoph
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
2025-07-21 22:55 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
@ 2025-07-22 06:49 ` Jeremy Schneider <[email protected]>
2025-07-30 12:57 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Jeremy Schneider @ 2025-07-22 06:49 UTC (permalink / raw)
To: Huang Yuying <[email protected]>; +Cc: Christoph Berg <[email protected]>; pgsql-pkg-debian; [email protected] <[email protected]>
On Mon, 21 Jul 2025 22:55:28 +0000
Huang Yuying <[email protected]> wrote:
> Regarding the build issue you mentioned, for testing, we manually
> downloaded the code from my GitHub repository (forked repo:
> https://github.com/laurahuang106/pgsentinel) instead of letting
> Debian pull it using the watch file.
FYI - running through it just now, and Laura I think an editor turned
the tabs into spaces at some point while the files were on their way to
GitHub. Should be a quick & easy fix.
After I changed the spaces back to tabs, and updated the file
pgsentinel_1.1.0.orig.tar.gz one level up from my build directory, the
tests succeed and the packages build for me.
I think we can go ahead and send Bertrand a PR with the two Makefile
updates. I suspect the top-level Makefile is the best way to go here.
-Jeremy
--
To know the thoughts and deeds that have marked man's progress is to
feel the great heart throbs of humanity through the centuries; and if
one does not feel in these pulsations a heavenward striving, one must
indeed be deaf to the harmonies of life.
Helen Keller. Let Us Have Faith. Doubleday, Doran & Company, 1940.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
2025-07-21 22:55 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-22 06:49 ` Re: Request to Add New Package: pgsentinel Jeremy Schneider <[email protected]>
@ 2025-07-30 12:57 ` Huang Yuying <[email protected]>
2025-07-30 14:53 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Huang Yuying @ 2025-07-30 12:57 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; +Cc: pgsql-pkg-debian; [email protected] <[email protected]>; Jeremy Schneider <[email protected]>
Hi everyone,
Just wanted to give you a quick update that a new version of pgsentinel has been released with the changes needed to support the Debian build process, as mentioned in the previous email. We’ve also updated the Salsa repo to reflect this new release.
Best regards,
Laura
________________________________
From: Jeremy Schneider <[email protected]>
Sent: Tuesday, July 22, 2025 2:49:59 AM
To: Huang Yuying <[email protected]>
Cc: Christoph Berg <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: Request to Add New Package: pgsentinel
On Mon, 21 Jul 2025 22:55:28 +0000
Huang Yuying <[email protected]> wrote:
> Regarding the build issue you mentioned, for testing, we manually
> downloaded the code from my GitHub repository (forked repo:
> https://github.com/laurahuang106/pgsentinel) instead of letting
> Debian pull it using the watch file.
FYI - running through it just now, and Laura I think an editor turned
the tabs into spaces at some point while the files were on their way to
GitHub. Should be a quick & easy fix.
After I changed the spaces back to tabs, and updated the file
pgsentinel_1.1.0.orig.tar.gz one level up from my build directory, the
tests succeed and the packages build for me.
I think we can go ahead and send Bertrand a PR with the two Makefile
updates. I suspect the top-level Makefile is the best way to go here.
-Jeremy
--
To know the thoughts and deeds that have marked man's progress is to
feel the great heart throbs of humanity through the centuries; and if
one does not feel in these pulsations a heavenward striving, one must
indeed be deaf to the harmonies of life.
Helen Keller. Let Us Have Faith. Doubleday, Doran & Company, 1940.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
2025-07-21 22:55 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-22 06:49 ` Re: Request to Add New Package: pgsentinel Jeremy Schneider <[email protected]>
2025-07-30 12:57 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
@ 2025-07-30 14:53 ` Christoph Berg <[email protected]>
2025-07-31 05:04 ` Re: Request to Add New Package: pgsentinel Bertrand Drouvot <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Berg @ 2025-07-30 14:53 UTC (permalink / raw)
To: Huang Yuying <[email protected]>; +Cc: pgsql-pkg-debian; [email protected] <[email protected]>; Jeremy Schneider <[email protected]>
Re: Huang Yuying
> Just wanted to give you a quick update that a new version of pgsentinel has been released with the changes needed to support the Debian build process, as mentioned in the previous email. We’ve also updated the Salsa repo to reflect this new release.
Hi,
thanks for preparing that, everything looks just fine and I already
built and uploaded the packages.
The repo is now located at https://salsa.debian.org/postgresql/pgsentinel,
I gave you maintainer access to it.
First bugreport: PG18 doesn't work yet :)
16:45:03 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -Wmissing-variable-declarations -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -Werror=implicit-function-declaration -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fno-omit-frame-pointer -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude -I. -I./ -I/usr/include/postgresql/18/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgsentinel.o pgsentinel.c
16:45:03 pgsentinel.c:77:7: error: no previous declaration for ‘pgsentinelDbName’ [-Werror=missing-variable-declarations]
16:45:03 77 | char *pgsentinelDbName = "postgres";
16:45:03 | ^~~~~~~~~~~~~~~~
16:45:03 cc1: all warnings being treated as errors
https://jengus.postgresql.org/job/pgsentinel-binaries-beta/1/architecture=amd64,distribution=sid/con...
Christoph
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Request to Add New Package: pgsentinel
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
2025-07-21 22:55 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-22 06:49 ` Re: Request to Add New Package: pgsentinel Jeremy Schneider <[email protected]>
2025-07-30 12:57 ` Re: Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-30 14:53 ` Re: Request to Add New Package: pgsentinel Christoph Berg <[email protected]>
@ 2025-07-31 05:04 ` Bertrand Drouvot <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Bertrand Drouvot @ 2025-07-31 05:04 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; Huang Yuying <[email protected]>; pgsql-pkg-debian; Jeremy Schneider <[email protected]>
Hi,
On Wed, Jul 30, 2025 at 04:53:16PM +0200, Christoph Berg wrote:
> Re: Huang Yuying
> > Just wanted to give you a quick update that a new version of pgsentinel has been released with the changes needed to support the Debian build process, as mentioned in the previous email. We’ve also updated the Salsa repo to reflect this new release.
Thanks for doing this!
> Hi,
>
> thanks for preparing that, everything looks just fine and I already
> built and uploaded the packages.
>
> The repo is now located at https://salsa.debian.org/postgresql/pgsentinel,
> I gave you maintainer access to it.
>
> First bugreport: PG18 doesn't work yet :)
Thanks for the report! ;-)
> 16:45:03 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -Wmissing-variable-declarations -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -Werror=implicit-function-declaration -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fno-omit-frame-pointer -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude -I. -I./ -I/usr/include/postgresql/18/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgsentinel.o pgsentinel.c
> 16:45:03 pgsentinel.c:77:7: error: no previous declaration for ‘pgsentinelDbName’ [-Werror=missing-variable-declarations]
> 16:45:03 77 | char *pgsentinelDbName = "postgres";
> 16:45:03 | ^~~~~~~~~~~~~~~~
> 16:45:03 cc1: all warnings being treated as errors
>
Just pushed a fix.
Best,
Bertrand
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-07-31 05:04 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-21 19:09 Request to Add New Package: pgsentinel Huang Yuying <[email protected]>
2025-07-21 20:06 ` Christoph Berg <[email protected]>
2025-07-21 22:55 ` Huang Yuying <[email protected]>
2025-07-22 06:49 ` Jeremy Schneider <[email protected]>
2025-07-30 12:57 ` Huang Yuying <[email protected]>
2025-07-30 14:53 ` Christoph Berg <[email protected]>
2025-07-31 05:04 ` Bertrand Drouvot <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox