Giter Club home page Giter Club logo

bg_mon's People

Contributors

a1exsh avatar cyberdem0n avatar erthalion avatar hughcapet avatar rafiasabih avatar sdudoladov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bg_mon's Issues

error during bg_mon build for PostgreSQL 15

error during bg_mon build for PostgreSQL 15 (beta 3)

Cloning into 'bg_mon'...
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -DUIFILE='"/usr/share/postgresql/15/contrib/bg_mon.html"' -DHAS_LIBBROTLI -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o bg_mon.o bg_mon.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -DUIFILE='"/usr/share/postgresql/15/contrib/bg_mon.html"' -DHAS_LIBBROTLI -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o brotli_utils.o brotli_utils.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -DUIFILE='"/usr/share/postgresql/15/contrib/bg_mon.html"' -DHAS_LIBBROTLI -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o disk_stats.o disk_stats.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -DUIFILE='"/usr/share/postgresql/15/contrib/bg_mon.html"' -DHAS_LIBBROTLI -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o net_stats.o net_stats.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -DUIFILE='"/usr/share/postgresql/15/contrib/bg_mon.html"' -DHAS_LIBBROTLI -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o postgres_stats.o postgres_stats.c
postgres_stats.c: In function ‘get_pg_stat_activity’:
postgres_stats.c:1131:3: error: too few arguments to function ‘InitPostgres’
 1131 |   InitPostgres("postgres", InvalidOid, NULL, InvalidOid, NULL, false);
      |   ^~~~~~~~~~~~
In file included from postgres_stats.c:6:
/usr/include/postgresql/15/server/miscadmin.h:460:13: note: declared here
  460 | extern void InitPostgres(const char *in_dbname, Oid dboid,
      |             ^~~~~~~~~~~~
make: *** [<builtin>: postgres_stats.o] Error 1

Segmentation fault issue

We have found that PostgreSQL has killed itself after a segmentation fault issued against the bg_mon extension:

2018-11-09 07:54:18 UTC [22072]: [9499-1] user=,db= LOG:  worker process: bg_mon (PID 20867) was terminated by signal 11: Segmentation fault
2018-11-09 07:54:18 UTC [22072]: [9500-1] user=,db= DETAIL:  Failed process was running: WITH locked_processes AS (SELECT this.pid  [ ... ]
2018-11-09 07:54:18 UTC [22072]: [9501-1] user=,db= LOG:  terminating any other active server processes
2018-11-09 07:54:18 UTC [20875]: [1-1] user=postgres,db=[unknown] WARNING:  terminating connection because of crash of another server process
2018-11-09 07:54:18 UTC [20875]: [2-1] user=postgres,db=[unknown] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2018-11-09 07:54:18 UTC [20875]: [3-1] user=postgres,db=[unknown] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2018-11-09 07:54:19 UTC [3580]: [1-1] user=postgres,db=postgres FATAL:  the database system is in recovery mode

Since we've disabled it, we never run into that issue again.
We are using PostgreSQL v10.5 on Ubuntu 16.04 LTS.

Not sure why this happened or if this information is helpful. Let me know if I can provide other information.

[Discuss] Track sizes of certain subdirectories in bg_mon

Hello, @CyberDem0n

I would like to extend bg_mon to report the sizes of pg_replslot and pgsql_tmp. My question is how to do it in the best way.

  1. I can follow the implementation of pg_log directory size . That however will duplicate data bg_mon reports under the device key for the most common case where all subdirectories reside at the same place (such duplication already happens for data, wal, and logentries). This approach also does not look extensible if one needs to add sizes of more subdirectories of $PGDATA to the bg_mon in the future.

  2. Or I can create a separate subdirectories dictionary with "subdirectory": its size in KB key-value pairs. The dictionary will list all subdirectories in $PGDATA

wdyt ?

bg_mon process stuck in uninterruptible sleep

We are looking at an issue that some of our postgres instances running with the Zalando Operator (Version 1.10.1, PVCs on NFS, Spilo Image spilo-15:3.0-p1), sometimes get stuck during restart. The instances cannot be killed with pg_ctl -m immediate stop and when using pg_ctl kill KILL, usually a single process stuck in uninterruptible sleep remains:

1000710+ 1191929  0.0  0.0 630156 26628 ?        Ds   Jan18   2:05 postgres: our-postgres: bg_mon

Unfortunately I missed capturing the stack of that process before finally rebooting the machine (will certainly do it next time), but I would like to start a discussion here if there are any known issues around this or if you have any suspicions what could cause this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.