[COMMITTERS] pgsql: Avoid acquiring spinlock when checking if recovery has finished,

2013-11-22 Thread Heikki Linnakangas
Avoid acquiring spinlock when checking if recovery has finished, for speed. RecoveryIsInProgress() can be called very frequently. During normal operation, it just checks a backend-local variable and returns quickly, but during hot standby, it checks a spinlock-protected shared variable. Those spin

[COMMITTERS] pgsql: Fix Hot-Standby initialization of clog and subtrans.

2013-11-22 Thread Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a hi

[COMMITTERS] pgsql: Fix Hot-Standby initialization of clog and subtrans.

2013-11-22 Thread Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a hi

[COMMITTERS] pgsql: Fix Hot-Standby initialization of clog and subtrans.

2013-11-22 Thread Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a hi

[COMMITTERS] pgsql: Fix Hot-Standby initialization of clog and subtrans.

2013-11-22 Thread Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a hi

[COMMITTERS] pgsql: Fix Hot-Standby initialization of clog and subtrans.

2013-11-22 Thread Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a hi

[COMMITTERS] pgsql: Fix quoting in help messages in uuid-ossp extension scripts.

2013-11-22 Thread Tom Lane
Fix quoting in help messages in uuid-ossp extension scripts. The command we're telling people to type needs to include double-quoting around the unfortunately-chosen extension name. Twiddle the textual quoting so that it looks somewhat sane. Per gripe from roadrunner6. Branch -- REL9_2_STAB

[COMMITTERS] pgsql: Fix quoting in help messages in uuid-ossp extension scripts.

2013-11-22 Thread Tom Lane
Fix quoting in help messages in uuid-ossp extension scripts. The command we're telling people to type needs to include double-quoting around the unfortunately-chosen extension name. Twiddle the textual quoting so that it looks somewhat sane. Per gripe from roadrunner6. Branch -- REL9_3_STAB

[COMMITTERS] pgsql: Fix quoting in help messages in uuid-ossp extension scripts.

2013-11-22 Thread Tom Lane
Fix quoting in help messages in uuid-ossp extension scripts. The command we're telling people to type needs to include double-quoting around the unfortunately-chosen extension name. Twiddle the textual quoting so that it looks somewhat sane. Per gripe from roadrunner6. Branch -- REL9_1_STAB

[COMMITTERS] pgsql: Fix quoting in help messages in uuid-ossp extension scripts.

2013-11-22 Thread Tom Lane
Fix quoting in help messages in uuid-ossp extension scripts. The command we're telling people to type needs to include double-quoting around the unfortunately-chosen extension name. Twiddle the textual quoting so that it looks somewhat sane. Per gripe from roadrunner6. Branch -- master Det

Re: [COMMITTERS] pgsql: Ensure that XLOG_HEAP2_VISIBLE always targets an initialized pag

2013-11-22 Thread Stefan Kaltenbrunner
On 11/18/2013 10:40 PM, Andres Freund wrote: > On 2013-11-18 16:33:25 -0500, Bruce Momjian wrote: >> On Sun, Nov 10, 2013 at 11:51:06PM +0100, Andres Freund wrote: >>> Hi, >>> >>> On 2013-06-06 14:22:12 +, Robert Haas wrote: Ensure that XLOG_HEAP2_VISIBLE always targets an initialized page

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j

[COMMITTERS] pgsql: Flatten join alias Vars before pulling up targetlist items from

2013-11-22 Thread Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a j