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 is

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 bug,

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 t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 7 November 2012 22:04, Tom Lane t...@sss.pgh.pa.us wrote: This seems to me to be dangerous and unintuitive, not to mention underdocumented. I think it would be better to just not do

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

[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

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

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 j...@agliodbs.com 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

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

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 dean.a.rash...@gmail.com 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

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 robertmh...@gmail.com writes: On Wed, Nov 7, 2012 at 12:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: ... we don't normally read the config file within-commands, and there are both semantic and implementation problems to

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

2012-11-08 Thread Atri Sharma
On 08-Nov-2012, at 13:35, Albe Laurenz laurenz.a...@wien.gv.at 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

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 work.

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 exists then

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 - .auto rename

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 dean.a.rash...@gmail.com wrote: On 8 November 2012 08:33, Dean Rasheed dean.a.rash...@gmail.com 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...

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 it

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 da...@fetter.org 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

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

2012-11-08 Thread Tom Lane
David Fetter da...@fetter.org 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

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

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 da...@fetter.org 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

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 hlinnakan...@vmware.com 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 hlinnakan...@vmware.com wrote: On 15.10.2012 13:13, Heikki

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 masao.fu...@gmail.com wrote: On Thu, Nov 8, 2012 at 2:22 AM, Heikki Linnakangas hlinnakan...@vmware.com 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

Re: [HACKERS] TRUNCATE SERIALIZABLE and frozen COPY

2012-11-08 Thread Robert Haas
On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs si...@2ndquadrant.com 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

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 k...@meme.com wrote: In your generated output I see: tr td colspan=2span class=bold EMPHASIS c3Class 00 — Successful Completion/span/td /tr It's just matter of CSS rule like td .EMPHASIS { font-size: 140%; } to

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 amit.kap...@huawei.com 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

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

2012-11-08 Thread Robert Haas
On Thu, Nov 8, 2012 at 4:45 AM, andr...@officenet.no 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

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

2012-11-08 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 8 November 2012 14:38, Dean Rasheed dean.a.rash...@gmail.com 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

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 dean.a.rash...@gmail.com 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

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 k...@meme.com wrote: In your generated output I see: tr td colspan=2span class=bold EMPHASIS c3Class 00 — Successful Completion/span/td /tr It's just matter of

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: --snip 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 docs.

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 robertmh...@gmail.com wrote: On Tue, Nov 6, 2012 at 1:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Nov 2, 2012 at 12:48 PM, Fujii Masao masao.fu...@gmail.com wrote: Is there the way to know the number of

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

2012-11-08 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Nov 8, 2012 at 4:45 AM, andr...@officenet.no 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

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 masao.fu...@gmail.com wrote: On Fri, Oct 19, 2012 at 5:46 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Ouch! I'm sorry to have sent truly buggy version, please abandon v2 patch sent just before. Added include access/transam.h to

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 t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com 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

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 masao.fu...@gmail.com wrote: However, I've forgotten to treat other three portions in walsender.c and syncrep.c also does XLogRecPtrIsInvalid(XLogPtr which comes from WAL receiver). This new patch includes the changes

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 makes

[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

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

2012-11-08 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 8 November 2012 17:37, Tom Lane t...@sss.pgh.pa.us 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

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

Re: [HACKERS] Tweaking ResolveNew's API

2012-11-08 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com 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

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 alvhe...@2ndquadrant.com 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

Re: [HACKERS] TRUNCATE SERIALIZABLE and frozen COPY

2012-11-08 Thread Simon Riggs
On 8 November 2012 17:07, Robert Haas robertmh...@gmail.com wrote: On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs si...@2ndquadrant.com 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

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 t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: On 8 November 2012 17:37, Tom Lane t...@sss.pgh.pa.us wrote: I believe that the right way to think about the auto-update transformation is that it should act like a supplied-by-default

[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

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

2012-11-08 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com 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

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com 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

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: On Thu, Nov 8, 2012 at 12:36 PM, Jeff Janes jeff.ja...@gmail.com 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

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
I wrote: Jeff Janes jeff.ja...@gmail.com 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

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Simon Riggs
On 8 November 2012 20:36, Jeff Janes jeff.ja...@gmail.com 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

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 jeff.ja...@gmail.com 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

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 jeff.ja...@gmail.com 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

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 robertmh...@gmail.com wrote: On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs si...@2ndquadrant.com wrote: For 9.2 we discussed having COPY setting tuples as frozen. Various details apply. Earlier threads: RFC:

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 8 November 2012 20:36, Jeff Janes jeff.ja...@gmail.com 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

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 br...@momjian.us 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:

Re: [HACKERS] AutoVacuum starvation from sinval messages

2012-11-08 Thread Jeff Janes
On Thu, Nov 8, 2012 at 2:50 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On 11/08/2012 11:40 PM, Simon Riggs wrote: On 8 November 2012 20:36, Jeff Janes jeff.ja...@gmail.com wrote: It does not seem outrageous to me that there would be real-world conditions in which invalidations would be

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 br...@momjian.us 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

[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

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 after a

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

2012-11-08 Thread Jeff Janes
On Wed, Nov 7, 2012 at 10:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Jeff Janes jeff.ja...@gmail.com writes: Since commit 1eb1dde049ccfffc42c80c2, Have make never delete intermediate files automatically, I've frequently been getting errors doing make -j2 after a maintainer-clean.

Re: [HACKERS] WIP checksums patch

2012-11-08 Thread Christopher Browne
On Mon, Nov 5, 2012 at 12:19 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Oct 29, 2012 at 4:31 PM, Jim Nasby j...@nasby.net 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.

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. Or, if the

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 ran it for 0,

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 br...@momjian.us 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 br...@momjian.us wrote: As a followup to Magnus's report that pg_upgrade was slow for many tables, I did some more

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), it

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

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-08 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com 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

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 amit.kap...@huawei.com 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

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 a...@cybertec.at 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

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 t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com 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 *