1. 25 Jun, 2021 1 commit
  2. 12 May, 2021 1 commit
    • Daniel Farina's avatar
      Fix infinite loop in pg_diskusage · 70d717fe
      Daniel Farina authored
      Also, new fields added in Linux 4.18 and 5.7 are now scanned and
      returned.  Some of the code formatting has been tweaked to match
      organization in Linux's genhd.c:diskstats_show code to ease
      comparison.
      
      As new kernels have added fields to /proc/diskstats, the old parsing
      code would fail to scan.  Not matching anything in the scan meant
      never making progress towards EOF.  The result was an infinite loop
      until the tuplestore exhausted resources.
      
      This is addressed several ways:
      
      1) Scanning terminates if there are no matched fields, i.e. no
         progress towards EOF.  Checking for EOF is redundant.
      
      2) Because spaces and even adjacent format characters will consume
         newlines, a "HS" (Horizontal Space) macro is used to terminate
         fscanf matching should a newline character be found in-between
         scanned items.  This is important on any system with fewer fields,
         such that scanning does not jump between lines as one record.
      
      3) In event there is more data on the line, i.e. Linux has added even
         more fields that are otherwise un-scanned, these are consumed up to
         the next newline and discarded.
      70d717fe
  3. 08 May, 2020 3 commits
  4. 02 May, 2020 1 commit
    • Jeremy Schneider's avatar
      Use PG_VERSION_NUM to build with the right query · 4d0eb706
      Jeremy Schneider authored
      The IEEE-compliant "expr" command does not support float comparison,
      and thus the version comparisons in the Makefile were using string
      comparison. This worked fine through PostgreSQL version 9.6 but no
      longer worked when PostgreSQL 10 was released.
      
      This change uses PG_VERSION_NUM directly in the C code to do the
      comparison, and removes the logic from the Makefile.
      4d0eb706
  5. 30 Apr, 2020 1 commit
  6. 05 Sep, 2019 1 commit
  7. 10 Jun, 2019 3 commits
  8. 06 Jun, 2019 3 commits
  9. 25 Jul, 2018 9 commits
  10. 10 Jul, 2018 1 commit
  11. 09 Jul, 2018 1 commit
  12. 29 Jun, 2015 1 commit
  13. 26 Jun, 2015 2 commits
  14. 13 Dec, 2013 1 commit
  15. 06 Dec, 2013 1 commit
  16. 30 Mar, 2013 2 commits
    • Mark Wong's avatar
      Rearrange source code · 2da0ed9d
      Mark Wong authored
      Move all the source and SQL code into a single file.  It seems easier
      to deal with with pgxn this way.
      2da0ed9d
    • Mark Wong's avatar
      Fix Makefile syntax · 8cf81ab3
      Mark Wong authored
      Some version of GNU make seem unaffected but I think this is more
      correct.
      8cf81ab3
  17. 19 Mar, 2013 2 commits
  18. 18 Mar, 2013 1 commit
  19. 27 Mar, 2010 3 commits
  20. 15 Nov, 2009 1 commit
    • gabrielle's avatar
      Combined proc util script with io util script · d6a570d2
      gabrielle authored
      - didn't include stime and utime;  they were unused in the original
      - started squashing the psql command into something more modular
      (will eventually use the DBI to connect)
      - added time calcs
      - added a half-hearted attempt at figuring out local Hz kernel value
      d6a570d2
  21. 24 Apr, 2009 1 commit