Re: [HACKERS] patch: psql variables tabcomplete

2010-10-11 Thread Pavel Stehule
2010/10/11 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2010/10/4 Itagaki Takahiro itagaki.takah...@gmail.com: We don't have commands for display a list of such variables and \echo is not tab-completed even with the patch. Only supported by \set might be a bit

[HACKERS] Support for JDBC setQueryTimeout, et al.

2010-10-11 Thread David Fetter
Folks, Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that uses it. I think this is an especially handy capability, and goes to the number one TODO on the JDBC compliance list.

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Pavel Stehule
2010/10/10 Tom Lane t...@sss.pgh.pa.us: Dean Rasheed dean.a.rash...@gmail.com writes: In the meantime, the attached variation of the patch fixes the temp file issue and will support all 3 cases. It gives OK performance for (1) and (2), and poor performance for (3). That could be viewed as a

Re: [HACKERS] Debugging initdb breakage

2010-10-11 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Might have something to do with using the same OID for the catalog and its index ... Ahah, that's how obvious it was, thank you. I feel ashamed, but at the same time, thanks to your answer, it now feels like the week-end was a good preparatory step for

Re: [HACKERS] .gitignore files, take two

2010-10-11 Thread Florian Weimer
* James Cloos: I'm reading this a bit late, but... We (Xorg) found that ignoring: *~ *.bak *.patch in addition to the files generated by building is very helpful. I tend to put those into .git/info/exclude. They are somewhat developer-specific, after all. -- Florian Weimer

Re: [HACKERS] WIP: Triggers on VIEWs

2010-10-11 Thread Dean Rasheed
On 10 October 2010 19:06, Tom Lane t...@sss.pgh.pa.us wrote: Applied with revisions. Brilliant! Thank you very much. * I took out this change in planmain.c: +       /* +        * If the query target is a VIEW, it won't be in the jointree, but we +        * need a dummy RelOptInfo node for

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 10 October 2010 22:16, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard.  What I read in SQL:2008 is that percentile_cont is defined for all numeric

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Pavel Stehule
2010/10/11 Dean Rasheed dean.a.rash...@gmail.com: On 10 October 2010 22:16, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard.  What I read in SQL:2008

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 10:55, Pavel Stehule pavel.steh...@gmail.com wrote: BTW, why has percentile been removed from this patch? As the more general, and SQL standard function, that would seem to be the more useful one to include. Upthread it was mentioned that there is already an ntile window

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Robert Haas
On Sun, Oct 10, 2010 at 5:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard.  What I read in SQL:2008 is that percentile_cont is defined for all

Re: [HACKERS] Sync Replication with transaction-controlled durability

2010-10-11 Thread Robert Haas
On Sat, Oct 9, 2010 at 3:33 AM, Simon Riggs si...@2ndquadrant.com wrote: On Fri, 2010-10-08 at 12:23 -0400, Robert Haas wrote: It seems like it would be more helpful if you were working on implementing a design that had more than one vote.  As far as I can tell, we have rough consensus that

Re: [HACKERS] Which file does the SELECT?

2010-10-11 Thread Vaibhav Kaushal
Is there something like that in Kdevelop? I dont use CLI editors much. On Mon, Oct 11, 2010 at 7:55 AM, David Christensen da...@endpoint.comwrote: On Oct 10, 2010, at 12:21 PM, Vaibhav Kaushal wrote: Thanks to both hitoshi and tom for your replies. I think I need to look into the

Re: [HACKERS] pgxs docdir question

2010-10-11 Thread Devrim GÜNDÜZ
On Sun, 2010-09-19 at 17:36 -0400, Tom Lane wrote: While building 3rd party RPMs using PGXS, even if I specify docdir in Makefile, README.* files are installed to this directory, which breaks parallel installation path as of 9.0+ Maybe you need to fool with MODULEDIR. See

Re: [HACKERS] Issues with Quorum Commit

2010-10-11 Thread Markus Wanner
Greg, to me it looks like we have very similar goals, but start from different preconditions. I absolutely agree with you given the preconditions you named. On 10/08/2010 10:04 PM, Greg Smith wrote: How is that a new problem? It's already possible to end up with a standby pair that has

[HACKERS] On the usefulness of hint bits

2010-10-11 Thread Leonardo Francalanci
Hi, I was wondering what is the advantage of having hint bits for OLAP -style workloads, that is when the number of transactions is not that high. If I got it right, in 10 pg_clog pages we can store the status for more than 32 transactions. That's a lot, in a very small space (80KB?). So I

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-11 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that uses it. I agree that it would be very nice to support this JDBC feature, but I'm not clear on why this can't be

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 10 October 2010 22:16, Tom Lane t...@sss.pgh.pa.us wrote: BTW, as far as the implementation issues go, telling tuplesort that it can use gigabytes of memory no matter what seems quite unacceptable. Put this thing into a hash aggregation and

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Oct 10, 2010 at 5:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard.  What I read in SQL:2008

Re: [HACKERS] On the usefulness of hint bits

2010-10-11 Thread Tom Lane
Leonardo Francalanci m_li...@yahoo.it writes: I was wondering what is the advantage of having hint bits for OLAP -style workloads, that is when the number of transactions is not that high. If I got it right, in 10 pg_clog pages we can store the status for more than 32 transactions.

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-11 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: David Fetter da...@fetter.org wrote: Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that uses it. I agree that it would be very nice to support this JDBC

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-11 Thread Magnus Hagander
On Mon, Oct 11, 2010 at 16:17, Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: David Fetter da...@fetter.org wrote: Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 10:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Oct 10, 2010 at 5:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-11 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Oct 11, 2010 at 16:17, Tom Lane t...@sss.pgh.pa.us wrote: ... and, if you are seriously expecting to have that happen, why the patch was submitted to pgsql-jdbc not pgsql-hackers? To be fair to David, it was sent to *both* pgsql-jdbc and

Re: [HACKERS] On the usefulness of hint bits

2010-10-11 Thread Leonardo Francalanci
Reduction of contention for pg_clog access, for one thing. If you read the archives, you'll find that pg_clog access contention has been shown to be one cause of context swap storms. Having to go to clog for every single tuple access would make that orders of magnitude worse. Ok; is it

Re: [HACKERS] On the usefulness of hint bits

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us wrote: Reduction of contention for pg_clog access, for one thing.  If you read the archives, you'll find that pg_clog access contention has been shown to be one cause of context swap storms. I wonder if we could improve this with

Re: [HACKERS] On the usefulness of hint bits

2010-10-11 Thread Leonardo Francalanci
I wonder if we could improve this with some sort of process-local cache - not to get rid of hint bits, just to reduce pg_clog contention. We might easily end up testing the same XID many times during the same table scan. I guess that's my scenario... not that many transactions, so even

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 15:03, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 10 October 2010 22:16, Tom Lane t...@sss.pgh.pa.us wrote: BTW, as far as the implementation issues go, telling tuplesort that it can use gigabytes of memory no matter what seems quite

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 15:03, Tom Lane t...@sss.pgh.pa.us wrote: Reflecting on it, I think it'd be best to allow an agg to provide an estimation function that'd be told the input data type and expected number of rows --- even on a per-aggregate basis,

Re: [HACKERS] On the usefulness of hint bits

2010-10-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Oct 11, 2010 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us wrote: Reduction of contention for pg_clog access, for one thing.  If you read the archives, you'll find that pg_clog access contention has been shown to be one cause of context swap storms.

Re: [HACKERS] patch: SQL/MED(FDW) DDL

2010-10-11 Thread Robert Haas
On Thu, Oct 7, 2010 at 7:20 AM, Shigeru HANADA han...@metrosystems.co.jp wrote: [ design for FDW ] This seems mostly sensible. In this step, optimizer calls FdwRoutine-GetStatistics() to get estimated costs of the foreign scan.  FDW can calculate costs by itself with some statistics, or get

Re: [HACKERS] pgxs docdir question

2010-10-11 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= dev...@gunduz.org writes: On Sun, 2010-09-19 at 17:36 -0400, Tom Lane wrote: While building 3rd party RPMs using PGXS, even if I specify docdir in Makefile, README.* files are installed to this directory, which breaks parallel installation path as of 9.0+

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 16:44, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 15:03, Tom Lane t...@sss.pgh.pa.us wrote: Reflecting on it, I think it'd be best to allow an agg to provide an estimation function that'd be told the input data type

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: The estimate of 200 x 8K is below work_mem, so it uses a hash aggregate. In reality, each tuplesort allocates around 30K initially, so it very quickly uses over 1GB. A better estimate for the aggregate wouldn't improve this situation much. Sure it

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 18:37, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: The estimate of 200 x 8K is below work_mem, so it uses a hash aggregate. In reality, each tuplesort allocates around 30K initially, so it very quickly uses over 1GB. A better estimate for

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Thu, Oct 7, 2010 at 2:05 PM, Josh Berkus j...@agliodbs.com wrote: What is the procedure for adding a new synchronous standby in your implementation?  That is, how do we go from having a standby server with an empty PGDATA to having a working synchronous standby? I'll take a crack at

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 18:37, Tom Lane t...@sss.pgh.pa.us wrote: Sure it would: an estimate of 30K would keep the planner from using hash aggregation. Not if work_mem was 10MB. And? If the memory requirement actually fits, you're in good shape.

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 18:48, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 18:37, Tom Lane t...@sss.pgh.pa.us wrote: Sure it would: an estimate of 30K would keep the planner from using hash aggregation. Not if work_mem was 10MB. And?  If

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 18:48, Tom Lane t...@sss.pgh.pa.us wrote: And?  If the memory requirement actually fits, you're in good shape. Yeah but the actual memory requirement, if it uses a hash aggregate, is over 1GB, and could easily be much higher.

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Josh Berkus
Robert, I'll take a crack at answering these. I don't think that the procedure for setting up a standby server is going to change much. The idea is presumably that you set up an async standby more or less as you do now and then make whatever configuration changes are necessary to flip it to

Re: [HACKERS] Which file does the SELECT?

2010-10-11 Thread David Fetter
On Mon, Oct 11, 2010 at 04:14:04PM +0530, Vaibhav Kaushal wrote: Is there something like that in Kdevelop? I dont use CLI editors much. KDevelop is listed as one of the editors that support ctags. http://en.wikipedia.org/wiki/Ctags Cheers, David. -- David Fetter da...@fetter.org

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Dean Rasheed
On 11 October 2010 19:05, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 11 October 2010 18:48, Tom Lane t...@sss.pgh.pa.us wrote: And?  If the memory requirement actually fits, you're in good shape. Yeah but the actual memory requirement, if it uses a

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Greg Stark
On Sun, Oct 10, 2010 at 2:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard. Uhmm, then why don't we implement that? We could provide median() as

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Josh Berkus
Uhmm, then why don't we implement that? We could provide median() as a short-cut but percentile_cont() doesn't sound much harder to implement than median() and more general. I could really use percentile_cont(0.9), actually, for query response-time analysis. --

Re: [HACKERS] host name support in pg_hba.conf

2010-10-11 Thread Peter Eisentraut
On tor, 2010-10-07 at 12:45 +0900, KaiGai Kohei wrote: * The logic is still unclear for me. The check_hostname() immediately returns with false, if the resolved remote hostname is NOT matched with the hostname described in pg_hba.conf. If the resolved hostname is matched with the hostname

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Pavel Stehule
Hello 2010/10/11 Greg Stark gsst...@mit.edu: On Sun, Oct 10, 2010 at 2:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5) which *is* in the standard. Uhmm, then why don't

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 2:07 PM, Josh Berkus j...@agliodbs.com wrote: I'll take a crack at answering these.  I don't think that the procedure for setting up a standby server is going to change much. The idea is presumably that you set up an async standby more or less as you do now and then

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Jeff Davis
On Mon, 2010-10-11 at 15:22 -0400, Robert Haas wrote: This is a completely separate issue from making replication synchronous. And, really? Useless for running read queries? Absolutely. For a synch standby, you can't tolerate any standby delay at all. This means that anywhere from

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 4:01 PM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2010-10-11 at 15:22 -0400, Robert Haas wrote: This is a completely separate issue from making replication synchronous.  And, really?  Useless for running read queries? Absolutely.  For a synch standby, you can't

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Josh Berkus
Obviously. I presume it'll be something like update postgresql.conf or recovery.conf and run pg_ctl reload, but I haven't (yet, anyway) verified the actual behavior of the patches, but if the above isn't feasible then we have a problem. Right. That's why I asked the question. Mind you, a

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Jeff Davis
On Mon, 2010-10-11 at 16:07 -0400, Robert Haas wrote: I was initially taken aback by the word useless as well. However, I had trouble thinking of a use case that isn't better solved by sync rep without HS, or async rep. I don't have the numbers either though, so perhaps someone does have a

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 5:40 PM, Josh Berkus j...@agliodbs.com wrote: Obviously.  I presume it'll be something like update postgresql.conf or recovery.conf and run pg_ctl reload, but I haven't (yet, anyway) verified the actual behavior of the patches, but if the above isn't feasible then we

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 7:16 PM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2010-10-11 at 16:07 -0400, Robert Haas wrote: I was initially taken aback by the word useless as well. However, I had trouble thinking of a use case that isn't better solved by sync rep without HS, or async rep. I

Re: [HACKERS] host name support in pg_hba.conf

2010-10-11 Thread KaiGai Kohei
(2010/10/12 3:34), Peter Eisentraut wrote: On tor, 2010-10-07 at 12:45 +0900, KaiGai Kohei wrote: * The logic is still unclear for me. The check_hostname() immediately returns with false, if the resolved remote hostname is NOT matched with the hostname described in pg_hba.conf. If the

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-11 Thread Steve Singer
On Sun, 10 Oct 2010, Marko Tiikkaja wrote: On 2010-10-07 5:21 AM +0300, Steve Singer wrote: Since no one else has proposed a better idea and the commit fest is ticking away I think you should go ahead and do that. Here's a new version of the patch, deprecating pg_parse_and_rewrite. I

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Josh Berkus
That's probably not going to happen until we have a way to update postgresql.conf via SQL. Which, I maintain, as I have maintained before, is not going to happen until we get rid of the comments, because otherwise absolutely any implementation anyone proposes will get criticized for failing

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 9:29 PM, Josh Berkus j...@agliodbs.com wrote: What is your source for those numbers?  They could be right, but I simply don't know. pg_bench tests with asynch rep and standby_delay = 0.  Not rigorous, but enough to show that there is a problem there.  Doing pg_bench

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Greg Stark
On Mon, Oct 11, 2010 at 5:41 PM, Robert Haas robertmh...@gmail.com wrote: That's probably not going to happen until we have a way to update postgresql.conf via SQL.  Which, I maintain, as I have maintained before, is not going to happen until we get rid of the comments, because otherwise

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 9:44 PM, Greg Stark gsst...@mit.edu wrote: On Mon, Oct 11, 2010 at 5:41 PM, Robert Haas robertmh...@gmail.com wrote: That's probably not going to happen until we have a way to update postgresql.conf via SQL.  Which, I maintain, as I have maintained before, is not going

Re: [HACKERS] security hook on table creation

2010-10-11 Thread KaiGai Kohei
It seems to me the conclusion of this discussion is unclear. We commonly try to find out an approach that minimize code complexity to understand and maintain, so the point of issue is clear, but we still don't reach same conclusion, because both of two ideas have merits and demerits each other.

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Gurjeet Singh
On Mon, Oct 11, 2010 at 7:16 PM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2010-10-11 at 16:07 -0400, Robert Haas wrote: It would be far better if we could decouple master cleanup from standby cleanup, so that only the machine that actually has the old query gets bloated. However, no

Re: [HACKERS] security hook on table creation

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 9:58 PM, KaiGai Kohei kai...@ak.jp.nec.com wrote: It seems to me the conclusion of this discussion is unclear. We commonly try to find out an approach that minimize code complexity to understand and maintain, so the point of issue is clear, but we still don't reach

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-11 Thread Robert Haas
On Mon, Oct 11, 2010 at 10:17 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: Yes.  I had the idea of trying to fix this by allowing the standby to retain old versions of entire pages that got cleaned up on the master, until the transactions that might want to read the old pages were

Re: [HACKERS] security hook on table creation

2010-10-11 Thread KaiGai Kohei
(2010/10/12 11:35), Robert Haas wrote: On Mon, Oct 11, 2010 at 9:58 PM, KaiGai Koheikai...@ak.jp.nec.com wrote: It seems to me the conclusion of this discussion is unclear. We commonly try to find out an approach that minimize code complexity to understand and maintain, so the point of issue

Re: [HACKERS] wip: functions median and percentile

2010-10-11 Thread Hitoshi Harada
2010/10/12 Pavel Stehule pavel.steh...@gmail.com: Hello 2010/10/11 Greg Stark gsst...@mit.edu: On Sun, Oct 10, 2010 at 2:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard, Oracle defines it in terms of percentile_cont(0.5)