1. 13 Jun, 2017 15 commits
  2. 12 Jun, 2017 9 commits
  3. 11 Jun, 2017 2 commits
    • Tom Lane's avatar
      Handle unqualified SEQUENCE NAME options properly in parse_utilcmd.c. · 51893985
      Tom Lane authored
      generateSerialExtraStmts() was sloppy about handling the case where
      SEQUENCE NAME is given with a not-schema-qualified name.  It was generating
      a CreateSeqStmt with an unqualified sequence name, and an AlterSeqStmt
      whose "owned_by" DefElem contained a T_String Value with a null string
      pointer in the schema-name position.  The generated nextval() argument was
      also underqualified.  This accidentally failed to fail at runtime, but only
      so long as the current default creation namespace at runtime is the right
      namespace.  That's bogus; the parse-time transformation is supposed to be
      inserting the right schema name in all cases, so as to avoid any possible
      skew in that selection.  I'm not sure this could fail in pg_dump's usage,
      but it's still wrong; we have had real bugs in this area before adopting
      the policy that parse_utilcmd.c should generate only fully-qualified
      auxiliary commands.  A slightly lesser problem, which is what led me to
      notice this in the first place, is that pprint() dumped core on the
      AlterSeqStmt because of the bogus T_String.
      
      Noted while poking into the open problem with ALTER SEQUENCE breaking
      pg_upgrade.
      51893985
    • Joe Conway's avatar
      Apply RLS policies to partitioned tables. · 4f7a95be
      Joe Conway authored
      The new partitioned table capability added a new relkind, namely
      RELKIND_PARTITIONED_TABLE. Update fireRIRrules() to apply RLS
      policies on RELKIND_PARTITIONED_TABLE as it does RELKIND_RELATION.
      
      In addition, add RLS regression test coverage for partitioned tables.
      
      Issue raised by Fakhroutdinov Evgenievich and patch by Mike Palmiotto.
      Regression test editorializing by me.
      
      Discussion: https://postgr.es/m/flat/20170601065959.1486.69906@wrigleys.postgresql.org
      4f7a95be
  4. 10 Jun, 2017 2 commits
  5. 09 Jun, 2017 10 commits
  6. 08 Jun, 2017 2 commits
    • Andres Freund's avatar
      Use standard interrupt handling in logical replication launcher. · 2c48f5db
      Andres Freund authored
      Previously the exit handling was only able to exit from within the
      main loop, and not from within the backend code it calls.  Fix that by
      using the standard die() SIGTERM handler, and adding the necessary
      CHECK_FOR_INTERRUPTS() call.
      
      This requires adding yet another process-type-specific branch to
      ProcessInterrupts(), which hints that we probably should generalize
      that handling.  But that's work for another day.
      
      Author: Petr Jelinek
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/fe072153-babd-3b5d-8052-73527a6eb657@2ndquadrant.com
      2c48f5db
    • Andres Freund's avatar
      Again report a useful error message when walreceiver's connection closes. · 5fd56b9f
      Andres Freund authored
      Since 7c4f5240 (merged in v10), a shutdown master is reported as
        FATAL:  unexpected result after CommandComplete: server closed the connection unexpectedly
      by walsender. It used to be
        LOG:  replication terminated by primary server
        FATAL:  could not send end-of-streaming message to primary: no COPY in progress
      while the old message clearly is not perfect, it's definitely better
      than what's reported now.
      
      The change comes from the attempt to handle finished COPYs without
      erroring out, needed for the new logical replication, which wasn't
      needed before.
      
      There's probably better ways to handle this, but for now just
      explicitly check for a closed connection.
      
      Author: Petr Jelinek
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/f7c7dd08-855c-e4ed-41f4-d064a6c0665a@2ndquadrant.com
      Backpatch: -
      5fd56b9f