pgsql: Match RelOptInfos by relids not pointer equality.

2018-08-08 Thread Tom Lane
Match RelOptInfos by relids not pointer equality. Commit 1c2cb2744 added some code that tried to detect whether two RelOptInfos were the "same" rel by pointer comparison; but it turns out that inheritance_planner breaks that, through its shenanigans with copying some relations forward into new sub

pgsql: Match RelOptInfos by relids not pointer equality.

2018-08-08 Thread Tom Lane
Match RelOptInfos by relids not pointer equality. Commit 1c2cb2744 added some code that tried to detect whether two RelOptInfos were the "same" rel by pointer comparison; but it turns out that inheritance_planner breaks that, through its shenanigans with copying some relations forward into new sub

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to r

pgsql: Remove unwanted "garbage cleanup" logic in Makefiles.

2018-08-08 Thread Tom Lane
Remove unwanted "garbage cleanup" logic in Makefiles. GNUmakefile.in defined a macro "garbage" that seems to have been meant as a suitable target for automatic "rm -rf" treatment, but it isn't actually used anywhere (and indeed never was, AFAICT). Moreover, we have concluded that the Makefiles sh

pgsql: Doc: Correct description of amcheck example query.

2018-08-08 Thread Peter Geoghegan
Doc: Correct description of amcheck example query. The amcheck documentation incorrectly claimed that its example query verifies every catalog index in the database. In fact, the query only verifies the 10 largest indexes (as determined by pg_class.relpages). Adjust the description accordingly.

pgsql: Doc: Correct description of amcheck example query.

2018-08-08 Thread Peter Geoghegan
Doc: Correct description of amcheck example query. The amcheck documentation incorrectly claimed that its example query verifies every catalog index in the database. In fact, the query only verifies the 10 largest indexes (as determined by pg_class.relpages). Adjust the description accordingly.

pgsql: Doc: Correct description of amcheck example query.

2018-08-08 Thread Peter Geoghegan
Doc: Correct description of amcheck example query. The amcheck documentation incorrectly claimed that its example query verifies every catalog index in the database. In fact, the query only verifies the 10 largest indexes (as determined by pg_class.relpages). Adjust the description accordingly.

pgsql: Remove bogus Assert in make_partitionedrel_pruneinfo().

2018-08-08 Thread Tom Lane
Remove bogus Assert in make_partitionedrel_pruneinfo(). This Assert thought that a given rel couldn't be both leaf and non-leaf, but it turns out that in some unusual plan trees that's wrong, so remove it. The lack of testing for cases like that is quite concerning --- there is little reason for

pgsql: Remove bogus Assert in make_partitionedrel_pruneinfo().

2018-08-08 Thread Tom Lane
Remove bogus Assert in make_partitionedrel_pruneinfo(). This Assert thought that a given rel couldn't be both leaf and non-leaf, but it turns out that in some unusual plan trees that's wrong, so remove it. The lack of testing for cases like that is quite concerning --- there is little reason for