Re: [HACKERS] [v9.3] writable foreign tables

2012-11-08 Thread Albe Laurenz
Alexander Korotkov wrote: > 2) You wrote that FDW can support or don't support write depending on having corresponding functions. > However it's likely some tables of same FDW could be writable while another are not. I think we should > have some mechanism for FDW telling whether particular table i

Re: [HACKERS] Fix errcontext() function

2012-11-08 Thread Heikki Linnakangas
On 08.11.2012 07:59, Chen Huajun wrote: I am sending patch for errcontext() function. I use procedural languages to do some operation, but when error occurs ,the CONTEXT error messages from procedural languages doesn't display in local language. for example:

Re: [HACKERS] Extend libpq to support mixed text and binary results

2012-11-08 Thread Albe Laurenz
Simon Riggs wrote: >> - I think that every feature of the line protocol should >> be exposed in the C API. > > Exposing every possible bug in ther underlying protocol isn't the best > plan though, especially when doing so complicates the API just to > support this. Well, I wouldn't call this a

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 03:10, Tom Lane wrote: > Dean Rasheed writes: >> On 7 November 2012 22:04, Tom Lane wrote: >>> This seems to me to be dangerous and unintuitive, not to mention >>> underdocumented. I think it would be better to just not do anything if >>> there is any INSTEAD rule, period. >

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Heikki Linnakangas
On 19.10.2012 14:42, Amit kapila wrote: On Thursday, October 18, 2012 8:49 PM Fujii Masao wrote: Before implementing the timeout parameter, I think that it's better to change both pg_basebackup background process and pg_receivexlog so that they send back the reply message immediately when they r

[HACKERS] Fwd: question on foreign key lock

2012-11-08 Thread Filip Rembiałkowski
Hi, maybe this is a better group for this question? I can't see why creating foreign key on table A referencing table B, generates an AccessExclusiveLock on B. It seems (to a layman :-) ) that only writes to B should be blocked. I'm really interested if this is either expected effect or any open

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 2:04 PM Heikki Linnakangas wrote: > On 19.10.2012 14:42, Amit kapila wrote: > > On Thursday, October 18, 2012 8:49 PM Fujii Masao wrote: > >> Before implementing the timeout parameter, I think that it's better > to change > >> both pg_basebackup background process and

[HACKERS] Deferrable NOT NULL constraints in 9.3?

2012-11-08 Thread andreak
Hi hackers.   Are there any plans to include DEFERRABLE NOT NULL constraints in 9.3 so one can do this? create table test(a varchar not null deferrable initially deferred); This works in Oracle and is quite handy when working with ORMs.   Thanks.   -- Andreas Joseph Krogh       mob: +47

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 1:45 AM Robert Haas wrote: > On Wed, Nov 7, 2012 at 2:50 PM, Josh Berkus wrote: > >> Well, Magnus' proposed implementation supposed that the existing > values > >> *have* been loaded into the current session. I agree that with some > >> locking and yet more code you

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Alvaro Herrera
Amit Kapila escribió: > 3. Two backends trying to write to .auto file >we can use ".auto.lock" as the the lock by trying to create it in > exclusive mode as the first step >of the command. If it already exists then backend needs to wait. So changing .auto settings would be nontr

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 08:33, Dean Rasheed wrote: > OK, yes I think we do need to be throwing the error at runtime rather > than at plan time. That's pretty easy if we just keep the current > error message... Oh wait, that's nonsense (not enough caffeine). The rewrite code needs to know whether there

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 12:28 AM Tom Lane wrote: > Robert Haas writes: > > On Wed, Nov 7, 2012 at 12:29 PM, Tom Lane wrote: > >> ... we don't normally read the config file within-commands, > >> and there are both semantic and implementation problems to overcome > >> if you want to do so. >

Re: [HACKERS] [v9.3] writable foreign tables

2012-11-08 Thread Atri Sharma
On 08-Nov-2012, at 13:35, "Albe Laurenz" wrote: > Alexander Korotkov wrote: >> 2) You wrote that FDW can support or don't support write depending on > having corresponding functions. >> However it's likely some tables of same FDW could be writable while > another are not. I think we should >> h

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 5:24 AM Greg Smith wrote: > On 11/2/12 11:17 AM, Magnus Hagander wrote: > > -Add a configuration subdirectory to the default installation. > > Needs to follow the config file location, so things like the > > Debian relocation of postgresql.conf still wor

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 8:07 PM Alvaro Herrera wrote: > Amit Kapila escribió: > > > 3. Two backends trying to write to .auto file > >we can use ".auto.lock" as the the lock by trying to create it > in > > exclusive mode as the first step > >of the command. If it already exis

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-08 Thread Alvaro Herrera
Amit Kapila escribió: > On Thursday, November 08, 2012 8:07 PM Alvaro Herrera wrote: > >The other way to > > define this would be to have a lock that you grab and keep until end of > > transaction, and the .auto.lock file is deleted if the transaction is > > aborted; so have the .auto.lock -> .aut

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 14:38, Dean Rasheed wrote: > On 8 November 2012 08:33, Dean Rasheed wrote: >> OK, yes I think we do need to be throwing the error at runtime rather >> than at plan time. That's pretty easy if we just keep the current >> error message... > > Oh wait, that's nonsense (not enough

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Bruce Momjian
On Wed, Nov 7, 2012 at 09:17:29PM -0500, Bruce Momjian wrote: > Things look fine through 2k, but at 4k the duration of pg_dump, restore, > and pg_upgrade (which is mostly a combination of these two) is 4x, > rather than the 2x as predicted by the growth in the number of tables. > To see how bad i

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread David Fetter
On Wed, Nov 07, 2012 at 05:55:32PM -0500, Tom Lane wrote: > David Fetter writes: > > On Wed, Nov 07, 2012 at 05:04:48PM -0500, Tom Lane wrote: > >> Should we be doing something > >> about such cases, or is playing dumb correct? > > > The SQL standard handles deciding the behavior based on whether

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Tom Lane
David Fetter writes: > There are three different WITH CHECK OPTION options: > WITH CHECK OPTION > WITH CASCADED CHECK OPTION > WITH LOCAL CHECK OPTION No, there are four: the fourth case being if you leave off the phrase altogether. That's the only case we accept, and it corresponds to the patc

Re: [HACKERS] RFC: New log_destination 'fifo'

2012-11-08 Thread Joshua D. Drake
On 11/07/2012 02:46 PM, David Fetter wrote: On Wed, Nov 07, 2012 at 12:55:03PM -0800, Joshua D. Drake wrote: Hello, So it is possible to do this in other ways but I thought it might be interesting to allow people to define fifo or pipe as a log_desination. This would allow a person to tail

Re: [HACKERS] RFC: New log_destination 'fifo'

2012-11-08 Thread Joshua D. Drake
On 11/07/2012 10:22 PM, Peter Eisentraut wrote: On Wed, 2012-11-07 at 12:55 -0800, Joshua D. Drake wrote: So it is possible to do this in other ways but I thought it might be interesting to allow people to define fifo or pipe as a log_desination. You could do this with a logging hook as a pl

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread David Fetter
On Thu, Nov 08, 2012 at 11:33:47AM -0500, Tom Lane wrote: > David Fetter writes: > > There are three different WITH CHECK OPTION options: > > > WITH CHECK OPTION > > WITH CASCADED CHECK OPTION > > WITH LOCAL CHECK OPTION > > No, there are four: the fourth case being if you leave off the phrase >

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Fujii Masao
On Thu, Nov 8, 2012 at 2:22 AM, Heikki Linnakangas wrote: > On 16.10.2012 15:31, Heikki Linnakangas wrote: >> >> On 15.10.2012 19:31, Fujii Masao wrote: >>> >>> On Mon, Oct 15, 2012 at 11:27 PM, Heikki Linnakangas >>> wrote: On 15.10.2012 13:13, Heikki Linnakangas wrote: > > >>>

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Fujii Masao
On Fri, Nov 9, 2012 at 1:40 AM, Fujii Masao wrote: > On Thu, Nov 8, 2012 at 2:22 AM, Heikki Linnakangas > wrote: >> On 16.10.2012 15:31, Heikki Linnakangas wrote: >>> >>> On 15.10.2012 19:31, Fujii Masao wrote: On Mon, Oct 15, 2012 at 11:27 PM, Heikki Linnakangas wrote: >

Re: [HACKERS] TRUNCATE SERIALIZABLE and frozen COPY

2012-11-08 Thread Robert Haas
On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs wrote: > For 9.2 we discussed having COPY setting tuples as frozen. Various > details apply. > Earlier threads: > "RFC: Making TRUNCATE more "MVCC-safe" > "COPY with hints, rebirth" > > I was unhappy with changing the behaviour of TRUNCATE, and stil

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-08 Thread Robert Haas
On Tue, Nov 6, 2012 at 5:44 PM, Karl O. Pinc wrote: > In your generated output I see: > > > Class 00 — > Successful Completion > > > It's just matter of CSS rule like > > td .EMPHASIS { font-size: 140%; } > > to make such labels more visible. > --

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Fujii Masao
On Thu, Nov 8, 2012 at 5:53 PM, Amit Kapila wrote: > On Thursday, November 08, 2012 2:04 PM Heikki Linnakangas wrote: >> On 19.10.2012 14:42, Amit kapila wrote: >> > On Thursday, October 18, 2012 8:49 PM Fujii Masao wrote: >> >> Before implementing the timeout parameter, I think that it's better >

Re: [HACKERS] Deferrable NOT NULL constraints in 9.3?

2012-11-08 Thread Robert Haas
On Thu, Nov 8, 2012 at 4:45 AM, wrote: > Are there any plans to include DEFERRABLE NOT NULL constraints in 9.3 so one > can do this? > > create table test(a varchar not null deferrable initially deferred); > > This works in Oracle and is quite handy when working with ORMs. Not to my knowledge ..

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Tom Lane
Dean Rasheed writes: > On 8 November 2012 14:38, Dean Rasheed wrote: >> Oh wait, that's nonsense (not enough caffeine). The rewrite code needs >> to know whether there are INSTEAD OF triggers before it decides >> whether it's going to substitute the base relation. The fundamental >> problem is th

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Peter Eisentraut
On 11/7/12 9:17 PM, Bruce Momjian wrote: > As a followup to Magnus's report that pg_upgrade was slow for many > tables, I did some more testing with many tables, e.g.: > > CREATE TABLE test991 (x SERIAL); > > I ran it for 0, 1k, 2k, ... 16k tables, and got these results: > > tables

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Tom Lane
Dean Rasheed writes: > If we did nothing here then it would go on to either fire any INSTEAD > OF triggers or raise an error if there aren't any. The problem with > that is that it makes trigger-updatable views and auto-updatable views > inconsistent in their behaviour with qualified INSTEAD rules

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-08 Thread Karl O. Pinc
On 11/08/2012 11:10:39 AM, Robert Haas wrote: > On Tue, Nov 6, 2012 at 5:44 PM, Karl O. Pinc wrote: > > In your generated output I see: > > > > > > Class 00 — > > Successful Completion > > > > > > It's just matter of CSS rule like > > > > td .EMPHASIS { font-size: 14

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-08 Thread Peter Eisentraut
On 11/6/12 12:09 PM, Karl O. Pinc wrote: > -- > On 11/06/2012 10:41:04 AM, Stefan Seefeld wrote: >> > On 11/06/2012 11:27 AM, Karl O. Pinc wrote: >>> > > Hi, >>> > > >>> > > I'm trying to improve a table of PostgreSQL error codes >>> > > in the PostgreSQL

Re: [HACKERS] the number of pending entries in GIN index with FASTUPDATE=on

2012-11-08 Thread Fujii Masao
On Wed, Nov 7, 2012 at 4:34 AM, Robert Haas wrote: > On Tue, Nov 6, 2012 at 1:01 PM, Tom Lane wrote: >> Robert Haas writes: >>> On Fri, Nov 2, 2012 at 12:48 PM, Fujii Masao wrote: Is there the way to know the number of pending entries in GIN index which was created with FASTUPDATE = o

Re: [HACKERS] Deferrable NOT NULL constraints in 9.3?

2012-11-08 Thread Tom Lane
Robert Haas writes: > On Thu, Nov 8, 2012 at 4:45 AM, wrote: >> Are there any plans to include DEFERRABLE NOT NULL constraints in 9.3 so one >> can do this? >> >> create table test(a varchar not null deferrable initially deferred); >> >> This works in Oracle and is quite handy when working wit

Re: [HACKERS] [BUG] False indication in pg_stat_replication.sync_state

2012-11-08 Thread Fujii Masao
On Fri, Oct 19, 2012 at 10:29 PM, Fujii Masao wrote: > On Fri, Oct 19, 2012 at 5:46 PM, Kyotaro HORIGUCHI > wrote: >> Ouch! I'm sorry to have sent truly buggy version, please abandon >> v2 patch sent just before. >> >> Added include "access/transam.h" to syncrep.c and corrected the >> name of XLB

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 17:37, Tom Lane wrote: > Dean Rasheed writes: >> If we did nothing here then it would go on to either fire any INSTEAD >> OF triggers or raise an error if there aren't any. The problem with >> that is that it makes trigger-updatable views and auto-updatable views >> inconsisten

Re: [HACKERS] [BUG] False indication in pg_stat_replication.sync_state

2012-11-08 Thread Alvaro Herrera
Fujii Masao escribió: > On Fri, Oct 19, 2012 at 10:29 PM, Fujii Masao wrote: > >>> However, I've forgotten to treat other three portions in > >>> walsender.c and syncrep.c also does XLogRecPtrIsInvalid( >>> which comes from WAL receiver>). This new patch includes the > >>> changes for them. > >

Re: [HACKERS] auto_explain WAS: RFC: Timing Events

2012-11-08 Thread Josh Berkus
> For the log volume, would it help if there was some "unexpectedness" > threshold? That is, if a statement exceeds the duration threshold, it > gets explained, But then it only gets logged if the actual duration > divided by the cost estimate exceeds some threshold. Thing is, pg_stat_plans mak

[HACKERS] Tweaking ResolveNew's API

2012-11-08 Thread Tom Lane
The submitted patch for auto-updatable views uses rewriteManip.c's ResolveNew() function to replace Vars referencing the view with Vars referencing the underlying table. That's mostly all right, except that ResolveNew has some hard-wired choices about what it should do if a Var to be replaced does

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Tom Lane
Dean Rasheed writes: > On 8 November 2012 17:37, Tom Lane wrote: >> I believe that the right way to think about the auto-update >> transformation is that it should act like a supplied-by-default >> unconditional INSTEAD rule. > But if you treat the auto-update transformation as a > supplied-by-d

Re: [HACKERS] Tweaking ResolveNew's API

2012-11-08 Thread Alvaro Herrera
Tom Lane wrote: > A possible objection to this is that most C compilers wouldn't complain > if a call site is still trying to use the old convention of passing a > CmdType value. In the core code, there are only four call sites and > three are in rewriteHandler.c itself, so this isn't much of a p

Re: [HACKERS] Tweaking ResolveNew's API

2012-11-08 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> A possible objection to this is that most C compilers wouldn't complain >> if a call site is still trying to use the old convention of passing a >> CmdType value. In the core code, there are only four call sites and >> three are in rewriteHandler.c itse

Re: [HACKERS] Tweaking ResolveNew's API

2012-11-08 Thread David Fetter
On Thu, Nov 08, 2012 at 02:35:34PM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> A possible objection to this is that most C compilers wouldn't complain > >> if a call site is still trying to use the old convention of passing a > >> CmdType value. In the core code, ther

Re: [HACKERS] TRUNCATE SERIALIZABLE and frozen COPY

2012-11-08 Thread Simon Riggs
On 8 November 2012 17:07, Robert Haas wrote: > On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs wrote: >> For 9.2 we discussed having COPY setting tuples as frozen. Various >> details apply. >> Earlier threads: >> "RFC: Making TRUNCATE more "MVCC-safe" >> "COPY with hints, rebirth" >> >> I was un

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 19:29, Tom Lane wrote: > Dean Rasheed writes: >> On 8 November 2012 17:37, Tom Lane wrote: >>> I believe that the right way to think about the auto-update >>> transformation is that it should act like a supplied-by-default >>> unconditional INSTEAD rule. > >> But if you treat

[HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Jeff Janes
While doing a rather contrived test of something else, using: perl -le 'print "create table foo (x serial); drop table foo;" foreach (1..1e6)'|psql I noticed starvation of autovacuum launcher process and bloating of catalogs. Basically the WaitLatch in autovacuum.c line 602 (in head) never retu

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Tom Lane
Dean Rasheed writes: > create table bar(a int); > create view bar_v as select * from bar; > create rule bar_r as on insert to bar_v where new.a < 0 do instead nothing; > insert into bar_v values(-1),(1); > select * from bar_v; > a > --- > 1 > (1 row) > Having that put both -1 and 1 into bar see

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Jeff Janes
On Thu, Nov 8, 2012 at 12:36 PM, Jeff Janes wrote: > > Should gettimeofday be called before and after the poll() and then the > difference deducted from timeout? > Something like this? poll_timeout.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Jeff Janes writes: > Basically the WaitLatch in autovacuum.c line 602 (in head) never returns. > This was introduced by a180776f7a1c4554f214b, "Teach unix_latch.c to > use poll() where available" > When the poll() gets EINTR by SIGUSR1 for the invalidation, it > restarts at the full timeout (60

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Jeff Janes writes: > On Thu, Nov 8, 2012 at 12:36 PM, Jeff Janes wrote: >> Should gettimeofday be called before and after the poll() and then the >> difference deducted from timeout? > Something like this? Meh. Not like that, because (1) we shouldn't add overhead when no timeout is requested.

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
I wrote: > Jeff Janes writes: >> When the poll() gets EINTR by SIGUSR1 for the invalidation, it >> restarts at the full timeout (60 seconds in this case) with no >> accounting for the time already waited. > Hmm. That seems like a problem, all right, but I don't believe the > claim that it applie

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Simon Riggs
On 8 November 2012 20:36, Jeff Janes wrote: > It does not seem outrageous to me that there would be real-world > conditions in which invalidations would be sent more than once a > minute over prolonged periods, so this total starvation seems like a > bug. Yes, its a bug, but do you really believ

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Andres Freund
On 2012-11-08 22:40:43 +, Simon Riggs wrote: > On 8 November 2012 20:36, Jeff Janes wrote: > > > It does not seem outrageous to me that there would be real-world > > conditions in which invalidations would be sent more than once a > > minute over prolonged periods, so this total starvation see

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Hannu Krosing
On 11/08/2012 11:40 PM, Simon Riggs wrote: On 8 November 2012 20:36, Jeff Janes wrote: It does not seem outrageous to me that there would be real-world conditions in which invalidations would be sent more than once a minute over prolonged periods, so this total starvation seems like a bug. Ye

Re: [HACKERS] TRUNCATE SERIALIZABLE and frozen COPY

2012-11-08 Thread Hannu Krosing
On 11/08/2012 08:51 PM, Simon Riggs wrote: On 8 November 2012 17:07, Robert Haas wrote: On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs wrote: For 9.2 we discussed having COPY setting tuples as frozen. Various details apply. Earlier threads: "RFC: Making TRUNCATE more "MVCC-safe" "COPY wit

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Simon Riggs writes: > On 8 November 2012 20:36, Jeff Janes wrote: >> It does not seem outrageous to me that there would be real-world >> conditions in which invalidations would be sent more than once a >> minute over prolonged periods, so this total starvation seems like a >> bug. > Yes, its a b

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Jeff Janes
On Wed, Nov 7, 2012 at 6:17 PM, Bruce Momjian wrote: > As a followup to Magnus's report that pg_upgrade was slow for many > tables, I did some more testing with many tables, e.g.: > ... > > Any ideas? I am attaching my test script. Have you reviewed the thread at: http://archives.postgresql.org/

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Jeff Janes
On Thu, Nov 8, 2012 at 2:50 PM, Hannu Krosing wrote: > On 11/08/2012 11:40 PM, Simon Riggs wrote: >> >> On 8 November 2012 20:36, Jeff Janes wrote: >> >>> It does not seem outrageous to me that there would be real-world >>> conditions in which invalidations would be sent more than once a >>> minu

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Bruce Momjian
On Thu, Nov 8, 2012 at 03:46:09PM -0800, Jeff Janes wrote: > On Wed, Nov 7, 2012 at 6:17 PM, Bruce Momjian wrote: > > As a followup to Magnus's report that pg_upgrade was slow for many > > tables, I did some more testing with many tables, e.g.: > > > ... > > > > Any ideas? I am attaching my test

[HACKERS] Enabling Checksums

2012-11-08 Thread Jeff Davis
As I understand it, the main part of the remaining work to be done for the checksums patch (at least the first commit) is to have a better way to enable/disable them. For the sake of simplicity (implementation as well as usability), it seems like there is agreement that checksums should be enabled

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
I wrote: >> Hmm. That seems like a problem, all right, but I don't believe the >> claim that it applies only to the poll() code path. On many platforms >> the select() path would have the same issue. > BTW, doesn't win32_latch.c have the identical problem? I don't see it > updating the timeout

Re: [HACKERS] commit 1eb1dde049ccfffc42c80c2 broke make -j2

2012-11-08 Thread Jeff Janes
On Wed, Nov 7, 2012 at 10:36 PM, Tom Lane wrote: > I wrote: >> Jeff Janes writes: >>> Since commit 1eb1dde049ccfffc42c80c2, Have make never delete >>> intermediate files automatically, I've frequently been getting errors >>> doing make -j2 after a maintainer-clean. > >> Worksforme on a Fedora 16

Re: [HACKERS] WIP checksums patch

2012-11-08 Thread Christopher Browne
On Mon, Nov 5, 2012 at 12:19 PM, Robert Haas wrote: > On Mon, Oct 29, 2012 at 4:31 PM, Jim Nasby wrote: > > For whatever it's worth... we (and presumably others) still use londiste > (or > > Slony) as our upgrade path, so we could tolerate a cluster-wide setting. > > We'd just set it when buildi

Re: [HACKERS] Enabling Checksums

2012-11-08 Thread Alvaro Herrera
Jeff Davis wrote: > And the next question is what commands to add to change state. Ideas: > >CHECKSUMS ENABLE; -- set state to "Enabling" >CHECKSUMS DISABLE; -- set state to "Off" > > And then to get to the "On" state, you have to run a system-wide VACUUM > while in the "Enabling" state.

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Bruce Momjian
On Thu, Nov 8, 2012 at 12:30:11PM -0500, Peter Eisentraut wrote: > On 11/7/12 9:17 PM, Bruce Momjian wrote: > > As a followup to Magnus's report that pg_upgrade was slow for many > > tables, I did some more testing with many tables, e.g.: > > > > CREATE TABLE test991 (x SERIAL); > > > > I ra

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Jeff Janes
On Thu, Nov 8, 2012 at 4:33 PM, Bruce Momjian wrote: > On Thu, Nov 8, 2012 at 03:46:09PM -0800, Jeff Janes wrote: >> On Wed, Nov 7, 2012 at 6:17 PM, Bruce Momjian wrote: >> > As a followup to Magnus's report that pg_upgrade was slow for many >> > tables, I did some more testing with many tables,

Re: [HACKERS] Enabling Checksums

2012-11-08 Thread Amit Kapila
On Friday, November 09, 2012 6:32 AM Jeff Davis wrote: > As I understand it, the main part of the remaining work to be done for > the checksums patch (at least the first commit) is to have a better way > to enable/disable them. > > For the sake of simplicity (implementation as well as usability),

Re: [HACKERS] Enabling Checksums

2012-11-08 Thread Jesper Krogh
On 09/11/12 02:01, Jeff Davis wrote: As I understand it, the main part of the remaining work to be done for the checksums patch (at least the first commit) is to have a better way to enable/disable them. For the sake of simplicity (implementation as well as usability), it seems like there is agr

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Tom Lane
Jeff Janes writes: > Are sure the server you are dumping out of is head? I experimented a bit with dumping/restoring 16000 tables matching Bruce's test case (ie, one serial column apiece). The pg_dump profile seems fairly flat, without any easy optimization targets. But restoring the dump scrip

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-08 Thread Amit Kapila
On Thursday, November 08, 2012 10:42 PM Fujii Masao wrote: > On Thu, Nov 8, 2012 at 5:53 PM, Amit Kapila > wrote: > > On Thursday, November 08, 2012 2:04 PM Heikki Linnakangas wrote: > >> On 19.10.2012 14:42, Amit kapila wrote: > >> > On Thursday, October 18, 2012 8:49 PM Fujii Masao wrote: > >> >

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Ants Aasma
On Fri, Nov 9, 2012 at 7:53 AM, Ants Aasma wrote: > I also took two profiles (attached). AtEOXact_RelationCache seems to > be the culprit for the quadratic growth. One more thing that jumps out as quadratic from the profiles is transfer_all_new_dbs from pg_upgrade (20% of total CPU time at 64k).

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-11-08 Thread Dean Rasheed
On 8 November 2012 21:13, Tom Lane wrote: > Dean Rasheed writes: >> create table bar(a int); >> create view bar_v as select * from bar; >> create rule bar_r as on insert to bar_v where new.a < 0 do instead nothing; >> insert into bar_v values(-1),(1); >> select * from bar_v; >> a >> --- >> 1 >>