[COMMITTERS] pgsql: Don't crash when pg_xlog is empty and pg_basebackup -x is used

2013-08-24 Thread Magnus Hagander
Don't crash when pg_xlog is empty and pg_basebackup -x is used The backup will not work (without a logarchive, and that's the whole point of -x) in this case, this patch just changes it to throw an error instead of crashing when this happens. Noticed and diagnosed by TAKATSUKA Haruka Branch

[COMMITTERS] pgsql: Don't crash when pg_xlog is empty and pg_basebackup -x is used

2013-08-24 Thread Magnus Hagander
Don't crash when pg_xlog is empty and pg_basebackup -x is used The backup will not work (without a logarchive, and that's the whole point of -x) in this case, this patch just changes it to throw an error instead of crashing when this happens. Noticed and diagnosed by TAKATSUKA Haruka Branch

[COMMITTERS] pgsql: Don't crash when pg_xlog is empty and pg_basebackup -x is used

2013-08-24 Thread Magnus Hagander
Don't crash when pg_xlog is empty and pg_basebackup -x is used The backup will not work (without a logarchive, and that's the whole point of -x) in this case, this patch just changes it to throw an error instead of crashing when this happens. Noticed and diagnosed by TAKATSUKA Haruka Branch

[COMMITTERS] pgsql: Account better for planning cost when choosing whether to use cu

2013-08-24 Thread Tom Lane
Account better for planning cost when choosing whether to use custom plans. The previous coding in plancache.c essentially used 10% of the estimated runtime as its cost estimate for planning. This can be pretty bogus, especially when the estimated runtime is very small, such as in a simple expres

[COMMITTERS] pgsql: Account better for planning cost when choosing whether to use cu

2013-08-24 Thread Tom Lane
Account better for planning cost when choosing whether to use custom plans. The previous coding in plancache.c essentially used 10% of the estimated runtime as its cost estimate for planning. This can be pretty bogus, especially when the estimated runtime is very small, such as in a simple expres

[COMMITTERS] pgsql: Account better for planning cost when choosing whether to use cu

2013-08-24 Thread Tom Lane
Account better for planning cost when choosing whether to use custom plans. The previous coding in plancache.c essentially used 10% of the estimated runtime as its cost estimate for planning. This can be pretty bogus, especially when the estimated runtime is very small, such as in a simple expres