1. 06 Apr, 2021 6 commits
    • Fujii Masao's avatar
      Add function to log the memory contexts of specified backend process. · 43620e32
      Fujii Masao authored
      Commit 3e98c0ba added pg_backend_memory_contexts view to display
      the memory contexts of the backend process. However its target process
      is limited to the backend that is accessing to the view. So this is
      not so convenient when investigating the local memory bloat of other
      backend process. To improve this situation, this commit adds
      pg_log_backend_memory_contexts() function that requests to log
      the memory contexts of the specified backend process.
      
      This information can be also collected by calling
      MemoryContextStats(TopMemoryContext) via a debugger. But
      this technique cannot be used in some environments because no debugger
      is available there. So, pg_log_backend_memory_contexts() allows us to
      see the memory contexts of specified backend more easily.
      
      Only superusers are allowed to request to log the memory contexts
      because allowing any users to issue this request at an unbounded rate
      would cause lots of log messages and which can lead to denial of service.
      
      On receipt of the request, at the next CHECK_FOR_INTERRUPTS(),
      the target backend logs its memory contexts at LOG_SERVER_ONLY level,
      so that these memory contexts will appear in the server log but not
      be sent to the client. It logs one message per memory context.
      Because if it buffers all memory contexts into StringInfo to log them
      as one message, which may require the buffer to be enlarged very much
      and lead to OOM error since there can be a large number of memory
      contexts in a backend.
      
      When a backend process is consuming huge memory, logging all its
      memory contexts might overrun available disk space. To prevent this,
      now this patch limits the number of child contexts to log per parent
      to 100. As with MemoryContextStats(), it supposes that practical cases
      where the log gets long will typically be huge numbers of siblings
      under the same parent context; while the additional debugging value
      from seeing details about individual siblings beyond 100 will not be large.
      
      There was another proposed patch to add the function to return
      the memory contexts of specified backend as the result sets,
      instead of logging them, in the discussion. However that patch is
      not included in this commit because it had several issues to address.
      
      Thanks to Tatsuhito Kasahara, Andres Freund, Tom Lane, Tomas Vondra,
      Michael Paquier, Kyotaro Horiguchi and Zhihong Yu for the discussion.
      
      Bump catalog version.
      
      Author: Atsushi Torikoshi
      Reviewed-by: Kyotaro Horiguchi, Zhihong Yu, Fujii Masao
      Discussion: https://postgr.es/m/0271f440ac77f2a4180e0e56ebd944d1@oss.nttdata.com
      43620e32
    • Michael Paquier's avatar
      Fix some issues with SSL and Kerberos tests · 5a71964a
      Michael Paquier authored
      The recent refactoring done in c50624cd accidentally broke a portion of
      the kerberos tests checking after a query, so add its functionality
      back.  Some inactive SSL tests had their arguments in an incorrect
      order, which would cause them to fail if they were to run.
      
      Author: Jacob Champion
      Discussion: https://postgr.es/m/4f5b0b3dc0b6fe9ae6a34886b4d4000f61eb567e.camel@vmware.com
      5a71964a
    • Amit Kapila's avatar
      Allow pgoutput to send logical decoding messages. · ac4645c0
      Amit Kapila authored
      The output plugin accepts a new parameter (messages) that controls if
      logical decoding messages are written into the replication stream. It is
      useful for those clients that use pgoutput as an output plugin and needs
      to process messages that were written by pg_logical_emit_message().
      
      Although logical streaming replication protocol supports logical
      decoding messages now, logical replication does not use this feature yet.
      
      Author: David Pirotte, Euler Taveira
      Reviewed-by: Euler Taveira, Andres Freund, Ashutosh Bapat, Amit Kapila
      Discussion: https://postgr.es/m/CADK3HHJ-+9SO7KuRLH=9Wa1rAo60Yreq1GFNkH_kd0=CdaWM+A@mail.gmail.com
      ac4645c0
    • Amit Kapila's avatar
      Refactor function parse_output_parameters. · 531737dd
      Amit Kapila authored
      Instead of using multiple parameters in parse_ouput_parameters function
      signature, use the struct PGOutputData that encapsulates all pgoutput
      options. It will be useful for future work where we need to add other
      options in pgoutput.
      
      Author: Euler Taveira
      Reviewed-by: Amit Kapila
      Discussion: https://postgr.es/m/CADK3HHJ-+9SO7KuRLH=9Wa1rAo60Yreq1GFNkH_kd0=CdaWM+A@mail.gmail.com
      531737dd
    • Michael Paquier's avatar
      Change PostgresNode::connect_fails() to never send down queries · 6d41dd04
      Michael Paquier authored
      This type of failure is similar to what has been fixed in c757a3da,
      where an authentication failure combined with psql pushing a command
      down its communication pipe causes a test failure.  This routine is
      designed to fail, so sending a query has little sense anyway.
      
      Per buildfarm members gaur and hoverfly, based on an analysis and fix
      from Tom Lane.
      
      Discussion: https://postgr.es/m/513200.1617634642@sss.pgh.pa.us
      6d41dd04
    • Peter Geoghegan's avatar
      Allocate access strategy in parallel VACUUM workers. · f6b8f19a
      Peter Geoghegan authored
      Commit 49f49def took entirely the wrong approach to fixing this issue.
      Just allocate a local buffer access strategy in each individual worker
      instead of trying to propagate state.  This state was never propagated
      by parallel VACUUM in the first place.
      
      It looks like the only reason that this worked following commit 40d964ec
      was that it involved static global variables, which are initialized to 0
      per the C standard.
      
      A more comprehensive fix may be necessary, even on HEAD.  This fix
      should at least get the buildfarm green once again.
      
      Thanks once again to Thomas Munro for continued off-list assistance with
      the issue.
      f6b8f19a
  2. 05 Apr, 2021 9 commits
    • Tom Lane's avatar
      Support INCLUDE'd columns in SP-GiST. · 09c1c6ab
      Tom Lane authored
      Not much to say here: does what it says on the tin.
      We steal a previously-always-zero bit from the nextOffset
      field of leaf index tuples in order to track whether there
      is a nulls bitmap.  Otherwise it works about like included
      columns in other index types.
      
      Pavel Borisov, reviewed by Andrey Borodin and Anastasia Lubennikova,
      and rather heavily editorialized on by me
      
      Discussion: https://postgr.es/m/CALT9ZEFi-vMp4faht9f9Junb1nO3NOSjhpxTmbm1UGLMsLqiEQ@mail.gmail.com
      09c1c6ab
    • Peter Geoghegan's avatar
      Propagate parallel VACUUM's buffer access strategy. · 49f49def
      Peter Geoghegan authored
      Parallel VACUUM relied on global variable state from the leader process
      being propagated to workers on fork().  Commit b4af70cb removed most
      uses of global variables inside vacuumlazy.c, but did not account for
      the buffer access strategy state.
      
      To fix, propagate the state through shared memory instead.
      
      Per buildfarm failures on elver, curculio, and morepork.
      
      Many thanks to Thomas Munro for off-list assistance with this issue.
      49f49def
    • Peter Geoghegan's avatar
      Simplify state managed by VACUUM. · b4af70cb
      Peter Geoghegan authored
      Reorganize the state struct used by VACUUM -- group related items
      together to make it easier to understand.  Also stop relying on stack
      variables inside lazy_scan_heap() -- move those into the state struct
      instead.  Doing things this way simplifies large groups of related
      functions whose function signatures had a lot of unnecessary redundancy.
      
      Switch over to using int64 for the struct fields used to count things
      that are reported to the user via log_autovacuum and VACUUM VERBOSE
      output.  We were using double, but that doesn't seem to have any
      advantages.  Using int64 makes it possible to add assertions that verify
      that the first pass over the heap (pruning) encounters precisely the
      same number of LP_DEAD items that get deleted from indexes later on, in
      the second pass over the heap.  These assertions will be added in later
      commits.
      
      Finally, adjust the signatures of functions with IndexBulkDeleteResult
      pointer arguments in cases where there was ambiguity about whether or
      not the argument relates to a single index or all indexes.  Functions
      now use the idiom that both ambulkdelete() and amvacuumcleanup() have
      always used (where appropriate): accept a mutable IndexBulkDeleteResult
      pointer argument, and return a result IndexBulkDeleteResult pointer to
      caller.
      
      Author: Peter Geoghegan <pg@bowt.ie>
      Reviewed-By: default avatarMasahiko Sawada <sawada.mshk@gmail.com>
      Reviewed-By: default avatarRobert Haas <robertmhaas@gmail.com>
      Discussion: https://postgr.es/m/CAH2-WzkeOSYwC6KNckbhk2b1aNnWum6Yyn0NKP9D-Hq1LGTDPw@mail.gmail.com
      b4af70cb
    • Stephen Frost's avatar
      Add pg_read_all_data and pg_write_all_data roles · 6c3ffd69
      Stephen Frost authored
      A commonly requested use-case is to have a role who can run an
      unfettered pg_dump without having to explicitly GRANT that user access
      to all tables, schemas, et al, without that role being a superuser.
      This address that by adding a "pg_read_all_data" role which implicitly
      gives any member of this role SELECT rights on all tables, views and
      sequences, and USAGE rights on all schemas.
      
      As there may be cases where it's also useful to have a role who has
      write access to all objects, pg_write_all_data is also introduced and
      gives users implicit INSERT, UPDATE and DELETE rights on all tables,
      views and sequences.
      
      These roles can not be logged into directly but instead should be
      GRANT'd to a role which is able to log in.  As noted in the
      documentation, if RLS is being used then an administrator may (or may
      not) wish to set BYPASSRLS on the login role which these predefined
      roles are GRANT'd to.
      
      Reviewed-by: Georgios Kokolatos
      Discussion: https://postgr.es/m/20200828003023.GU29590@tamriel.snowman.net
      6c3ffd69
    • Fujii Masao's avatar
      Shut down transaction tracking at startup process exit. · ad8b6749
      Fujii Masao authored
      Maxim Orlov reported that the shutdown of standby server could result in
      the following assertion failure. The cause of this issue was that,
      when the shutdown caused the startup process to exit, recovery-time
      transaction tracking was not shut down even if it's already initialized,
      and some locks the tracked transactions were holding could not be released.
      At this situation, if other process was invoked and the PGPROC entry that
      the startup process used was assigned to it, it found such unreleased locks
      and caused the assertion failure, during the initialization of it.
      
          TRAP: FailedAssertion("SHMQueueEmpty(&(MyProc->myProcLocks[i]))"
      
      This commit fixes this issue by making the startup process shut down
      transaction tracking and release all locks, at the exit of it.
      
      Back-patch to all supported branches.
      
      Reported-by: Maxim Orlov
      Author: Fujii Masao
      Reviewed-by: Maxim Orlov
      Discussion: https://postgr.es/m/ad4ce692cc1d89a093b471ab1d969b0b@postgrespro.ru
      ad8b6749
    • Alvaro Herrera's avatar
      Align some terms in arch-dev.sgml to glossary · 6734e806
      Alvaro Herrera authored
      This mostly adds links to the glossary to the existing text, instead of
      using <firstterm>.  Heikki left this out of 29ad6595 out of
      stylistic concerns; these have since been addressed.
      
      Author: Jürgen Purtz <juergen@purtz.de>
      Discussion: https://postgr.es/m/67d7240f-8596-83fc-5e15-af06c128a0f5@purtz.de
      6734e806
    • Peter Eisentraut's avatar
      Renumber cursor option flags · a63dd8af
      Peter Eisentraut authored
      Move the planner-control flags up so that there is more room for parse
      options.  Some pending patches need some room there, so do this
      renumbering separately so that there is less potential for conflicts.
      a63dd8af
    • Michael Paquier's avatar
      Fix typo in collationcmds.c · 9f6f1f9b
      Michael Paquier authored
      Introduced by 51e225da.
      
      Author: Anton Voloshin
      Discussion: https://postgr.es/m/05477da0-703c-7de7-998c-5879738e8f39@postgrespro.ru
      9f6f1f9b
    • Michael Paquier's avatar
      Refactor all TAP test suites doing connection checks · c50624cd
      Michael Paquier authored
      This commit refactors more TAP tests to adapt with the recent
      introduction of connect_ok() and connect_fails() in PostgresNode,
      introduced by 0d1a3343.  This changes the following test suites to use
      the same code paths for connection checks:
      - Kerberos
      - LDAP
      - SSL
      - Authentication
      
      Those routines are extended to be able to handle optional parameters
      that are set depending on each suite's needs, as of:
      - custom SQL query.
      - expected stderr matching pattern.
      - expected stdout matching pattern.
      The new design is extensible with more parameters, and there are some
      plans for those routines in the future with checks based on the contents
      of the backend logs.
      
      Author: Jacob Champion, Michael Paquier
      Discussion: https://postgr.es/m/d17b919e27474abfa55d97786cb9cfadfe2b59e9.camel@vmware.com
      c50624cd
  3. 04 Apr, 2021 8 commits
    • Tom Lane's avatar
      Fix more confusion in SP-GiST. · dfc843d4
      Tom Lane authored
      spg_box_quad_leaf_consistent unconditionally returned the leaf
      datum as leafValue, even though in its usage for poly_ops that
      value is of completely the wrong type.
      
      In versions before 12, that was harmless because the core code did
      nothing with leafValue in non-index-only scans ... but since commit
      2a636834, if we were doing a KNN-style scan, spgNewHeapItem would
      unconditionally try to copy the value using the wrong datatype
      parameters.  Said copying is a waste of time and space if we're not
      going to return the data, but it accidentally failed to fail until
      I fixed the datatype confusion in ac9099fc.
      
      Hence, change spgNewHeapItem to not copy the datum unless we're
      actually going to return it later.  This saves cycles and dodges
      the question of whether lossy opclasses are returning the right
      type.  Also change spg_box_quad_leaf_consistent to not return
      data that might be of the wrong type, as insurance against
      somebody introducing a similar bug into the core code in future.
      
      It seems like a good idea to back-patch these two changes into
      v12 and v13, although I'm afraid to change spgNewHeapItem's
      mistaken idea of which datatype to use in those branches.
      
      Per buildfarm results from ac9099fc.
      
      Discussion: https://postgr.es/m/3728741.1617381471@sss.pgh.pa.us
      dfc843d4
    • Tom Lane's avatar
      Fix confusion in SP-GiST between attribute type and leaf storage type. · ac9099fc
      Tom Lane authored
      According to the documentation, the attType passed to the opclass
      config function (and also relied on by the core code) is the type
      of the heap column or expression being indexed.  But what was
      actually being passed was the type stored for the index column.
      This made no difference for user-defined SP-GiST opclasses,
      because we weren't allowing the STORAGE clause of CREATE OPCLASS
      to be used, so the two types would be the same.  But it's silly
      not to allow that, seeing that the built-in poly_ops opclass
      has a different value for opckeytype than opcintype, and that if you
      want to do lossy storage then the types must really be different.
      (Thus, user-defined opclasses doing lossy storage had to lie about
      what type is in the index.)  Hence, remove the restriction, and make
      sure that we use the input column type not opckeytype where relevant.
      
      For reasons of backwards compatibility with existing user-defined
      opclasses, we can't quite insist that the specified leafType match
      the STORAGE clause; instead just add an amvalidate() warning if
      they don't match.
      
      Also fix some bugs that would only manifest when trying to return
      index entries when attType is different from attLeafType.  It's not
      too surprising that these have not been reported, because the only
      usual reason for such a difference is to store the leaf value
      lossily, rendering index-only scans impossible.
      
      Add a src/test/modules module to exercise cases where attType is
      different from attLeafType and yet index-only scan is supported.
      
      Discussion: https://postgr.es/m/3728741.1617381471@sss.pgh.pa.us
      ac9099fc
    • Tomas Vondra's avatar
      Fix bug in brin_minmax_multi_union · d9c5b9a9
      Tomas Vondra authored
      When calling sort_expanded_ranges() we need to remember the return
      value, because the function sorts and also deduplicates the ranges. So
      the number of ranges may decrease. brin_minmax_multi_union failed to do
      that, which resulted in crashes due to bogus ranges (equal minval/maxval
      but not marked as compacted).
      
      Reported-by: Jaime Casanova
      Discussion: https://postgr.es/m/20210404052550.GA4376%40ahch-to
      d9c5b9a9
    • Tomas Vondra's avatar
      Add regression test for minmax-multi macaddr8 type · 4908684d
      Tomas Vondra authored
      The regression test for BRIN minmax-multi opclasses tested almost all
      supported data types, with the exception of macaddr8. So this adds it.
      4908684d
    • Tomas Vondra's avatar
      Fix order of parameters in BRIN minmax-multi calls · 1dad2a5e
      Tomas Vondra authored
      The BRIN minmax-multi consistent function incorrectly assumed it can
      lookup an operator, and then swap the arguments to get the commutator.
      For example <(a,b) would be called as <(b,a) to get >(a,b). This works
      when the arguments are of the same type, but with cross-type opclasses
      this fails. We can't swap <(float4,float8) arguments, for example.
      
      Fixed by passing arguments in the right order.
      
      Discussion: https://postgr.es/m/CAJKUy5jLZFLCxyxfT%3DMfK5mtPfSzHA1rVLowR-j4RRsFVvKm7A%40mail.gmail.com
      1dad2a5e
    • Tomas Vondra's avatar
      Fix BRIN minmax-multi distance for inet type · e1fbe118
      Tomas Vondra authored
      The distance calculation ignored the mask, unlike the inet comparator,
      which resulted in negative distance in some cases. Fixed by applying the
      mask in brin_minmax_multi_distance_inet. I've considered simply calling
      inetmi() to calculate the delta, but that does not consider mask either.
      
      Reviewed-by: Zhihong Yu
      Discussion: https://postgr.es/m/1a0a7b9d-9bda-e3a2-7fa4-88f15042a051%40enterprisedb.com
      e1fbe118
    • Tomas Vondra's avatar
      Fix BRIN minmax-multi distance for timetz type · 7262f242
      Tomas Vondra authored
      The distance calculation ignored the time zone, so the result of (b-a)
      might have ended negative even if (b > a). Fixed by considering the time
      zone difference.
      
      Reported-by: Jaime Casanova
      Discussion: https://postgr.es/m/CAJKUy5jLZFLCxyxfT%3DMfK5mtPfSzHA1rVLowR-j4RRsFVvKm7A%40mail.gmail.com
      7262f242
    • Tomas Vondra's avatar
      Fix BRIN minmax-multi distance for interval type · 2b10e0e3
      Tomas Vondra authored
      The distance calculation for interval type was treating months as having
      31 days, which is inconsistent with the interval comparator (using 30
      days). Due to this it was possible to get negative distance (b-a) when
      (a<b), trigerring an assert.
      
      Fixed by adopting the same logic as interval_cmp_value.
      
      Reported-by: Jaime Casanova
      Discussion: https://postgr.es/m/CAJKUy5jKH0Xhneau2mNftNPtTy-BVgQfXc8zQkEvRvBHfeUThQ%40mail.gmail.com
      2b10e0e3
  4. 03 Apr, 2021 7 commits
    • Tom Lane's avatar
      Improve psql's behavior when the editor is exited without saving. · 55873a00
      Tom Lane authored
      When editing the previous query buffer, if the editor is exited
      without modifying the temp file then clear the query buffer,
      rather than re-loading (and probably re-executing) the previous
      query buffer.  This reduces the probability of accidentally
      re-executing something you didn't intend to.
      
      Similarly, in "\e file", if the file isn't actually modified
      then don't load it into the query buffer.  And in "\ef" and
      "\ev", if no changes are made then clear the query buffer
      instead of loading the function or view definition into it.
      
      Cases where we fail to invoke the editor at all, or it returns
      a nonzero status, are treated like the no-file-modification case.
      
      Laurenz Albe, reviewed by Jacob Champion
      
      Discussion: https://postgr.es/m/0ba3f2a658bac6546d9934ab6ba63a805d46a49b.camel@cybertec.at
      55873a00
    • Andres Freund's avatar
      Improve efficiency of wait event reporting, remove proc.h dependency. · 225a22b1
      Andres Freund authored
      pgstat_report_wait_start() and pgstat_report_wait_end() required two
      conditional branches so far. One to check if MyProc is NULL, the other to
      check if pgstat_track_activities is set. As wait events are used around
      comparatively lightweight operations, and are inlined (reducing branch
      predictor effectiveness), that's not great.
      
      The dependency on MyProc has a second disadvantage: Low-level subsystems, like
      storage/file/fd.c, report wait events, but architecturally it is preferable
      for them to not depend on inter-process subsystems like proc.h (defining
      PGPROC).  After this change including pgstat.h (nor obviously its
      sub-components like backend_status.h, wait_event.h, ...) does not pull in IPC
      related headers anymore.
      
      These goals, efficiency and abstraction, are achieved by having
      pgstat_report_wait_start/end() not interact with MyProc, but instead a new
      my_wait_event_info variable. At backend startup it points to a local variable,
      removing the need to check for MyProc being NULL. During process
      initialization my_wait_event_info is redirected to MyProc->wait_event_info. At
      shutdown this is reversed. Because wait event reporting now does not need to
      know about where the wait event is stored, it does not need to know about
      PGPROC anymore.
      
      The removal of the branch for checking pgstat_track_activities is simpler:
      Don't check anymore. The cost due to the branch are often higher than the
      store - and even if not, pgstat_track_activities is rarely disabled.
      
      The main motivator to commit this work now is that removing the (indirect)
      pgproc.h include from pgstat.h simplifies a patch to move statistics reporting
      to shared memory (which still has a chance to get into 14).
      
      Author: Andres Freund <andres@anarazel.de>
      Discussion: https://postgr.es/m/20210402194458.2vu324hkk2djq6ce@alap3.anarazel.de
      225a22b1
    • Andres Freund's avatar
      Split backend status and progress related functionality out of pgstat.c. · e1025044
      Andres Freund authored
      Backend status (supporting pg_stat_activity) and command
      progress (supporting pg_stat_progress*) related code is largely
      independent from the rest of pgstat.[ch] (supporting views like
      pg_stat_all_tables that accumulate data over time). See also
      a333476b.
      
      This commit doesn't rename the function names to make the distinction
      from the rest of pgstat_ clearer - that'd be more invasive and not
      clearly beneficial. If we were to decide to do such a rename at some
      point, it's better done separately from moving the code as well.
      
      Robert's review was of an earlier version.
      Reviewed-By: default avatarRobert Haas <robertmhaas@gmail.com>
      Discussion: https://postgr.es/m/20210316195440.twxmlov24rr2nxrg@alap3.anarazel.de
      e1025044
    • Michael Paquier's avatar
      Use more verbose matching patterns for errors in SSL TAP tests · 8d3a4c3e
      Michael Paquier authored
      The TAP tests of src/test/ssl/ have been using rather generic matching
      patterns to check some failure scenarios, like "SSL error" or just
      "FATAL".  These have been introduced in 081bfc19.
      
      Those messages are not wrong per se, but when working on the integration
      of new SSL libraries it becomes hard to know if those errors are legit
      or not, and existing scenarios may fail in incorrect ways.  This commit
      makes all those messages more verbose by adding the information
      generated by OpenSSL.  Fortunately, the same error messages are used for
      all the versions supported on HEAD (checked that after running the tests
      from 1.0.1 to 1.1.1), so the change is straight-forward.
      
      Reported-by: Jacob Champion, Álvaro Herrera
      Discussion: https://postgr.es/m/YGU3AxQh0zBMMW8m@paquier.xyz
      8d3a4c3e
    • Michael Paquier's avatar
      Refactor HMAC implementations · e6bdfd97
      Michael Paquier authored
      Similarly to the cryptohash implementations, this refactors the existing
      HMAC code into a single set of APIs that can be plugged with any crypto
      libraries PostgreSQL is built with (only OpenSSL currently).  If there
      is no such libraries, a fallback implementation is available.  Those new
      APIs are designed similarly to the existing cryptohash layer, so there
      is no real new design here, with the same logic around buffer bound
      checks and memory handling.
      
      HMAC has a dependency on cryptohashes, so all the cryptohash types
      supported by cryptohash{_openssl}.c can be used with HMAC.  This
      refactoring is an advantage mainly for SCRAM, that included its own
      implementation of HMAC with SHA256 without relying on the existing
      crypto libraries even if PostgreSQL was built with their support.
      
      This code has been tested on Windows and Linux, with and without
      OpenSSL, across all the versions supported on HEAD from 1.1.1 down to
      1.0.1.  I have also checked that the implementations are working fine
      using some sample results, a custom extension of my own, and doing
      cross-checks across different major versions with SCRAM with the client
      and the backend.
      
      Author: Michael Paquier
      Reviewed-by: Bruce Momjian
      Discussion: https://postgr.es/m/X9m0nkEJEzIPXjeZ@paquier.xyz
      e6bdfd97
    • Andres Freund's avatar
      Do not rely on pgstat.h to indirectly include storage/ headers. · 1d9c5d0c
      Andres Freund authored
      An upcoming patch might remove the (now indirect) proc.h
      include (which in turn includes other headers), and it's cleaner for
      the modified files to include their dependencies directly anyway...
      
      Discussion: https://postgr.es/m/20210402194458.2vu324hkk2djq6ce@alap3.anarazel.de
      1d9c5d0c
    • Andres Freund's avatar
      Split wait event related code from pgstat.[ch] into wait_event.[ch]. · a333476b
      Andres Freund authored
      The wait event related code is independent from the rest of the
      pgstat.[ch] code, of nontrivial size and changes on a regular
      basis. Put it into its own set of files.
      
      As there doesn't seem to be a good pre-existing directory for code
      like this, add src/backend/utils/activity.
      Reviewed-By: default avatarRobert Haas <robertmhaas@gmail.com>
      Discussion: https://postgr.es/m/20210316195440.twxmlov24rr2nxrg@alap3.anarazel.de
      a333476b
  5. 02 Apr, 2021 10 commits