Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-08-14 Thread Alexander Korotkov
On Mon, Aug 13, 2012 at 1:11 AM, Alexander Korotkov aekorot...@gmail.comwrote: On Thu, Aug 9, 2012 at 12:44 AM, Alexander Korotkov aekorot...@gmail.comwrote: My conclusion is so, that current errors are probably ok for selectivity estimation. But taking into attention that generated

[HACKERS] patch: shared session variables

2012-08-14 Thread Pavel Stehule
Hello patch that implements shared client/server session variables Regards Pavel Stehule shared_variables-01.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] betatesting: ERROR: failed to build any 2-way joins on 9.2

2012-08-14 Thread Pavel Stehule
Hello My colleague found a issue on 9.2 - sorry for query formatting - this query is generated from ours query engine testdb=# \i planbug.sql DROP TABLE DROP TABLE DROP TABLE DROP TABLE DROP TABLE CREATE TABLE CREATE TABLE CREATE TABLE CREATE TABLE CREATE TABLE psql:planbug.sql:66: ERROR:

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Heikki Linnakangas
On 14.08.2012 08:23, Kevin Grittner wrote: OK, attached is a first cut to confirm that the approach looks sane to everyone; I *think* it is along the lines that we reached consensus. After moving the check to the point where we get a serializable snapshot, it was still behaving badly. It took

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Nils Goroll
Should we do something to plug this, and if so, what? If not, should we document the danger? I am not sure if I really understood the intention of the question correctly, but if the question was if pg should try to work around misuse of signals, then my answer would be a definite no. IMHO,

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Greg Stark
It is possible to check if the signal was synchronous or was sent from an external process. You can check siginfo-si_pid to see who sent you the signal. I'm not sure checking that and handling it at check_for_interrupts if it's asynchronous is the best solution or not though. I'm a bit confused.

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Kevin Grittner
Heikki Linnakangas wrote: On 14.08.2012 08:23, Kevin Grittner wrote: OK, attached is a first cut to confirm that the approach looks sane to everyone; I *think* it is along the lines that we reached consensus. After moving the check to the point where we get a serializable snapshot, it was

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Robert Haas
On Mon, Aug 13, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 13, 2012 at 10:14 PM, Noah Misch n...@leadboat.com wrote: Overall, though, I think it best to plug this. We could set a flag before each operation, like evaluation of SQL

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Robert Haas
On Tue, Aug 14, 2012 at 6:50 AM, Greg Stark st...@mit.edu wrote: It is possible to check if the signal was synchronous or was sent from an external process. You can check siginfo-si_pid to see who sent you the signal. I'm not sure checking that and handling it at check_for_interrupts if it's

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread k...@rice.edu
On Mon, Aug 13, 2012 at 11:52:06PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 13, 2012 at 10:14 PM, Noah Misch n...@leadboat.com wrote: Overall, though, I think it best to plug this. We could set a flag before each operation, like evaluation of SQL

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Kevin Grittner
Heikki Linnakangas wrote: we have to somehow fix the crash and the assertion failure on 9.1. Here's a revision with some changes based on your feedback. I have to go to my day job now, and I was unable to find the right place to fix the streaming replication problem. I fear I won't be able

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Noah Misch
On Tue, Aug 14, 2012 at 08:38:44AM -0400, Robert Haas wrote: On Mon, Aug 13, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: That would depend on how many places there are where SIGFPE is expected. Are we sure there are any? Maybe we should just remove the handler and let SIGFPE be

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Robert Haas
On Tue, Aug 14, 2012 at 8:55 AM, k...@rice.edu k...@rice.edu wrote: On Mon, Aug 13, 2012 at 11:52:06PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 13, 2012 at 10:14 PM, Noah Misch n...@leadboat.com wrote: Overall, though, I think it best to plug this. We

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Tue, Aug 14, 2012 at 08:38:44AM -0400, Robert Haas wrote: On Mon, Aug 13, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: That would depend on how many places there are where SIGFPE is expected. Are we sure there are any? Maybe we should just

Re: [HACKERS] WIP patch for consolidating misplaced-aggregate checks

2012-08-14 Thread Alvaro Herrera
Excerpts from Greg Stark's message of vie ago 10 12:57:25 -0400 2012: On Thu, Aug 9, 2012 at 5:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fair enough. I was not sold on doing that either. I would still like to know if it's okay to use one string with %s for the cases where there's not a

Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-08-14 Thread Heikki Linnakangas
On 14.08.2012 09:45, Alexander Korotkov wrote: After fixing few more bugs, I've a version with much more reasonable accuracy. Great! One little thing just occurred to me: You're relying on the regular scalar selectivity estimators for the , , and operators. That seems bogus, in particular

Re: [HACKERS] WIP patch for consolidating misplaced-aggregate checks

2012-08-14 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Speaking of english words, I was wondering at check the other day. For example, we have #: catalog/heap.c:2171 #, c-format msgid check constraint \%s\ already exists #: catalog/heap.c:2534 #, c-format msgid only table \%s\ can be referenced

Re: [HACKERS] 9.2 Cascading replication after slave promotion

2012-08-14 Thread Josh Berkus
Yeah, I think there's more people that agree with this use-case than you seem to think.. That said, I appreciate that it's not a trivial thing to support cleanly. Not trivial, no, but not major either. Really what needs to happen is for the timeline change record to get transmitted over the

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Heikki Linnakangas
On 14.08.2012 14:25, Kevin Grittner wrote: Heikki Linnakangas wrote: On 14.08.2012 08:23, Kevin Grittner wrote: OK, attached is a first cut to confirm that the approach looks sane to everyone; I *think* it is along the lines that we reached consensus. After moving the check to the point

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-14 Thread Bruce Momjian
On Thu, Aug 4, 2011 at 09:00:11PM +0300, Peter Eisentraut wrote: On tor, 2011-08-04 at 14:44 +0200, Boszormenyi Zoltan wrote: 2011-08-04 14:32 keltezéssel, Robert Haas írta: 2011/8/4 Boszormenyi Zoltan z...@cybertec.at: Shouldn't these get fixed to be consistent? I believe I already

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Noah Misch
On Tue, Aug 14, 2012 at 08:40:06AM -0400, Robert Haas wrote: On Tue, Aug 14, 2012 at 6:50 AM, Greg Stark st...@mit.edu wrote: It is possible to check if the signal was synchronous or was sent from an external process. You can check siginfo-si_pid to see who sent you the signal. I'm not sure

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 14.08.2012 14:25, Kevin Grittner wrote: Heikki Linnakangas wrote: On 14.08.2012 08:23, Kevin Grittner wrote: Oh, further testing this morning shows that while *queries* on the HS seem OK, streaming replication is now broken.

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-14 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Thu, Aug 4, 2011 at 09:00:11PM +0300, Peter Eisentraut wrote: On tor, 2011-08-04 at 14:44 +0200, Boszormenyi Zoltan wrote: I meant a mass sed -e 's/TRUE/true/g' -e 's/FALSE/false/g' run so all the ~200 occurrences of both TRUE and FALSE get

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-14 Thread Bruce Momjian
On Tue, Aug 14, 2012 at 05:34:02PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Aug 4, 2011 at 09:00:11PM +0300, Peter Eisentraut wrote: On tor, 2011-08-04 at 14:44 +0200, Boszormenyi Zoltan wrote: I meant a mass sed -e 's/TRUE/true/g' -e 's/FALSE/false/g' run

Re: [HACKERS] GetSnapshotData() comments

2012-08-14 Thread Bruce Momjian
Did these comment updates ever get addressed? --- On Fri, Aug 5, 2011 at 11:02:24AM -0400, Robert Haas wrote: I think that the first sentence, in the following comment within GetSnapshotData(), is not quite right,

Re: [HACKERS] SIGFPE handler is naive

2012-08-14 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Tue, Aug 14, 2012 at 08:40:06AM -0400, Robert Haas wrote: On Tue, Aug 14, 2012 at 6:50 AM, Greg Stark st...@mit.edu wrote: It is possible to check if the signal was synchronous or was sent from an external process. You can check siginfo-si_pid to see who

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Peter Eisentraut
On 8/10/12 7:48 PM, Dimitri Fontaine wrote: Another thing worth considering is to have pg_upgrade init, stop and start clusters as necessary instead of requesting the user to do it. I think this is two less steps. Then you'd need to expose the entire pg_ctl shutdown mode logic through

Re: [HACKERS] macports and brew postgresql --universal builds

2012-08-14 Thread Peter Eisentraut
On 8/10/12 7:12 PM, Doug Coleman wrote: What it looks like is the first line of each section is pattern matching. If __LP64__ is defined, then it's a 64-bit architecture, and we want to use the top part of the if statement. The #defines they target seem to be all of the ones that are different

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 8/10/12 7:48 PM, Dimitri Fontaine wrote: What about having single user mode talk fe/be protocol, and talk to it via a UNIX pipe, with pg_upgrade starting the single user backend as a subprocess? I think that's essentially equivalent to starting the

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Bruce Momjian
On Tue, Aug 14, 2012 at 05:56:39PM -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On 8/10/12 7:48 PM, Dimitri Fontaine wrote: What about having single user mode talk fe/be protocol, and talk to it via a UNIX pipe, with pg_upgrade starting the single user backend as a

Re: [HACKERS] superusers are members of all roles?

2012-08-14 Thread Michael Braun
Hi, I've just recently upgraded to postgrsql 9.1 and also hit bug #5763. Having +group not match all superusers is essential to be able to assign different authentication backends to different superusers with needing to edit configuration files on the radius host system. E.g. to be able to

Re: [HACKERS] small issue with host names in hba

2012-08-14 Thread Bruce Momjian
I assume we didn't feel any action was necessary on this issue. --- On Thu, Aug 11, 2011 at 01:50:02PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Aug 9, 2011 at 2:16 PM, Peter Eisentraut

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Tue, Aug 14, 2012 at 05:56:39PM -0400, Tom Lane wrote: The implementation I'm visualizing is that a would-be client (think psql or pg_dump, though the code would actually be in libpq) forks off a process that becomes a standalone backend, and then they

Re: [HACKERS] superusers are members of all roles?

2012-08-14 Thread Andrew Dunstan
On 08/14/2012 05:03 PM, Michael Braun wrote: Hi, I've just recently upgraded to postgrsql 9.1 and also hit bug #5763. Having +group not match all superusers is essential to be able to assign different authentication backends to different superusers with needing to edit configuration files on

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 17:36 -0400, Bruce Momjian wrote: On Tue, Aug 14, 2012 at 05:34:02PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Aug 4, 2011 at 09:00:11PM +0300, Peter Eisentraut wrote: On tor, 2011-08-04 at 14:44 +0200, Boszormenyi Zoltan wrote: I

[HACKERS] Re: [HACKERS] PL/Perl build problem: error: ‘OP_SETSTATE’ undeclared

2012-08-14 Thread Alex Hunsaker
On Sun, Aug 12, 2012 at 9:57 PM, Peter Eisentraut pete...@gmx.net wrote: It appears that a recent Perl version (I have 5.14.2) has eliminated OP_SETSTATE, which causes the current PostgreSQL build to fail: plperl.c: In function ‘_PG_init’: plperl.c:442:5645: error: ‘OP_SETSTATE’ undeclared

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Bruce Momjian
On Tue, Aug 14, 2012 at 06:53:49PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Tue, Aug 14, 2012 at 05:56:39PM -0400, Tom Lane wrote: The implementation I'm visualizing is that a would-be client (think psql or pg_dump, though the code would actually be in libpq) forks

Re: [HACKERS] sha1, sha2 functions into core?

2012-08-14 Thread Bruce Momjian
Is there a TODO here? --- On Wed, Aug 10, 2011 at 09:43:18PM +0300, Peter Eisentraut wrote: On ons, 2011-08-10 at 19:29 +0100, Dave Page wrote: On Wed, Aug 10, 2011 at 7:06 PM, Peter Eisentraut pete...@gmx.net wrote:

Re: [HACKERS] default_isolation_level='serializable' crashes on Windows

2012-08-14 Thread Kevin Grittner
Kevin Grittner wrote: Heikki Linnakangas wrote: On 14.08.2012 14:25, Kevin Grittner wrote: Attached is version 3. Oh, further testing this morning shows that while *queries* on the HS seem OK, streaming replication is now broken. I probably need to override transaction isolation on the

Re: [HACKERS] WIP patch for consolidating misplaced-aggregate checks

2012-08-14 Thread Peter Eisentraut
On Fri, 2012-08-10 at 17:57 +0100, Greg Stark wrote: On Thu, Aug 9, 2012 at 5:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fair enough. I was not sold on doing that either. I would still like to know if it's okay to use one string with %s for the cases where there's not a good reason for the

Re: [HACKERS] WIP patch for consolidating misplaced-aggregate checks

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 12:04 -0400, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Speaking of english words, I was wondering at check the other day. For example, we have #: catalog/heap.c:2171 #, c-format msgid check constraint \%s\ already exists #:

Re: [HACKERS] WIP patch for consolidating misplaced-aggregate checks

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 11:30 -0400, Alvaro Herrera wrote: And so on (there are several more). Note that here we use check constraint without any capitalization. However this doesn't translate too well as is; I mean, if I were to translate check into its equivalent spanish word, I'm sure to

Re: [HACKERS] -Wformat-zero-length

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 17:56 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On 8/10/12 7:48 PM, Dimitri Fontaine wrote: What about having single user mode talk fe/be protocol, and talk to it via a UNIX pipe, with pg_upgrade starting the single user backend as a

Re: [HACKERS] Re: [HACKERS] PL/Perl build problem: error: ‘OP_SETSTATE’ undeclared

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 20:58 -0600, Alex Hunsaker wrote: I know i've used 5.14 in the past successfully. Wat happens if you regenerate plperl_opmask.h? (rm plperl_opmask.h make) Yeah, it seems to have something to do with a perl upgrade happening between builds. It was fixed by building from

Re: [HACKERS] betatesting: ERROR: failed to build any 2-way joins on 9.2

2012-08-14 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: My colleague found a issue on 9.2 - sorry for query formatting - this query is generated from ours query engine Fixed, thanks for the report. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [COMMITTERS] pgsql: Revert commit_delay change; just add comment that we don't hav

2012-08-14 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: On 14 August 2012 21:26, Bruce Momjian br...@momjian.us wrote: Revert commit_delay change; just add comment that we don't have a microsecond specification. I think that if we eventually decide to change the name of commit_delay for 9.3 (you

Re: [HACKERS] betatesting: ERROR: failed to build any 2-way joins on 9.2

2012-08-14 Thread Pavel Stehule
2012/8/15 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: My colleague found a issue on 9.2 - sorry for query formatting - this query is generated from ours query engine Fixed, thanks for the report. thank you Pavel regards, tom lane --