Re: [HACKERS] Wal sync odirect

2013-07-22 Thread Craig Ringer
On 07/21/2013 10:01 PM, Миша Тюрин wrote: hi, list. there are my proposal. i would like to tell about odirect in wal sync in wal_level is higher than minimal. i think in my case when wal traffic is up to 1gb per 2-3 minutes but discs hardware with 2gb bbu cache (or maybe ssd under wal) -

Re: [HACKERS] Proposal: template-ify (binary) extensions

2013-07-22 Thread Markus Wanner
On 07/22/2013 12:11 AM, Hannu Krosing wrote: Dropping this barrier by installing an untrusted PL (or equally insecure extensions), an attacker with superuser rights can trivially gain root. Could you elaborate ? This is equivalent to claiming that any linux user can trivially gain root.

Re: [HACKERS] Reduce maximum error in tuples estimation after vacuum.

2013-07-22 Thread Kyotaro HORIGUCHI
Hello, I'm very sory to take your time on this mess. ul 2013 16:06:11 +0530, Amit Kapila amit.kap...@huawei.com wrote in 014201ce7bc6$f71eb950$e55c2bf0$@kap...@huawei.com I understood your patch's algorithm, but still I have doubt in my mind that if the next analyze can correct the estimates,

[HACKERS] Re: [HACKERS] Wal sync odirect

2013-07-22 Thread Миша Тюрин
i tell about wal_level is higher than MINIMAL wal_level != minimal http://doxygen.postgresql.org/xlogdefs_8h_source.html 48   * Because O_DIRECT bypasses the kernel buffers, and because we never 49   * read those buffers except during crash recovery or if wal_level != minimal hi, list.

Re: [HACKERS] Re: [HACKERS] Wal sync odirect

2013-07-22 Thread Craig Ringer
On 07/22/2013 03:30 PM, Миша Тюрин wrote: i tell about wal_level is higher than MINIMAL OK, so you want to be able to force O_DIRECT for wal_level = archive ? I guess that makes sense if you expect the archive_command to read the file out of the RAID controller's write cache before it gets

Re: [HACKERS] Adding new joining alghoritm to postgresql

2013-07-22 Thread Craig Ringer
On 07/19/2013 09:47 PM, tubadzin wrote: Hi. I'm a little confused. 1.I have source code 9.2.4. version from http://www.postgresql.org/ftp/source/ 2.I want to add new alghoritm to index nested loops join, merge join and hash join. I have Executor catalog in src catalag containing

Re: [HACKERS] improve Chinese locale performance

2013-07-22 Thread Craig Ringer
On 07/22/2013 12:17 PM, Quan Zongliang wrote: Hi hackers, I tried to improve performance when database is Chinese. Under openSUSE, create index on table with 54996 rows locale=C, 140ms locale=zh_CN, 985ms I think the function strcoll() of Linux is too slow. So, I made a new utf8 to

Re: [HACKERS] Improvement of checkpoint IO scheduler for stable transaction responses

2013-07-22 Thread KONDO Mitsumasa
(2013/07/19 22:48), Greg Smith wrote: On 7/19/13 3:53 AM, KONDO Mitsumasa wrote: Recently, a user who think system availability is important uses synchronous replication cluster. If your argument for why it's OK to ignore bounding crash recovery on the master is that it's possible to failover

Re: [HACKERS] improve Chinese locale performance

2013-07-22 Thread Quan Zongliang
On 07/22/2013 03:54 PM, Craig Ringer wrote: On 07/22/2013 12:17 PM, Quan Zongliang wrote: Hi hackers, I tried to improve performance when database is Chinese. Under openSUSE, create index on table with 54996 rows locale=C, 140ms locale=zh_CN, 985ms I think the function strcoll() of Linux is

Re: [HACKERS] Improvement of checkpoint IO scheduler for stable transaction responses

2013-07-22 Thread KONDO Mitsumasa
(2013/07/21 4:37), Heikki Linnakangas wrote: Mitsumasa-san, since you have the test rig ready, could you try the attached patch please? It scans the buffer cache several times, writing out all the dirty buffers for segment A first, then fsyncs it, then all dirty buffers for segment B, and so on.

[HACKERS] small typo in src/backend/access/transam/xlog.c

2013-07-22 Thread didier
Hi in void BootStrapXLOG(void) * to seed it other than the system clock value...) The upper half of the * uint64 value is just the tv_sec part, while the lower half is the XOR * of tv_sec and tv_usec. This is to ensure that we don't lose uniqueness *

[HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Andres Freund
Hi, Would somebody object to making the rmgr's invo value #defines like: /* XLOG info values for XLOG rmgr */ #define XLOG_CHECKPOINT_SHUTDOWN0x00 #define XLOG_CHECKPOINT_ONLINE 0x10 #define XLOG_NOOP 0x20 #define

Re: [HACKERS] Using ini file to setup replication

2013-07-22 Thread Sawada Masahiko
On Fri, Jul 19, 2013 at 6:53 PM, Andres Freund and...@2ndquadrant.com wrote: So you can just do stuff like: server.foo.grand_unified_config = value. it looks good to me too. when server parse values which is written in postgresql.conf, server handles those parameter as item list value. after

Re: [HACKERS] improve Chinese locale performance

2013-07-22 Thread Peter Eisentraut
On 7/22/13 3:54 AM, Craig Ringer wrote: It might be worth looking at gcc's strcoll() implementation. See if it performs better when you use the latest gcc, and if not try to improve gcc's strcoll() . I think part of the problem is that we call strcoll for each comparison, instead of doing

Re: [HACKERS] REINDEX checking of index constraints

2013-07-22 Thread k...@rice.edu
On Sun, Jul 21, 2013 at 11:30:54AM -0700, Josh Berkus wrote: Noah, Attached patch just restores the old behavior. Would it be worth preserving the ability to fix an index consistency problem with a REINDEX independent from related heap consistency problems such as duplicate keys? I

Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Would somebody object to making the rmgr's invo value #defines like: into enums? I think that will create more problems than it fixes. For one thing, the same field is used to store values that would need to be multiple independent enum types; and

Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Andres Freund
On 2013-07-22 08:53:53 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Would somebody object to making the rmgr's invo value #defines like: into enums? I think that will create more problems than it fixes. For one thing, the same field is used to store values that

Re: [HACKERS] Using ini file to setup replication

2013-07-22 Thread Greg Stark
On Fri, Jul 19, 2013 at 2:20 PM, Samrat Revagade revagade.sam...@gmail.com wrote: for example: if i want to configure 2 servers then it will add 6 lines,for 3 -9, for 4-12 setting's for particular server will be: considering the way of setting value to conf parameters : guc . value

Re: [HACKERS] Re: [HACKERS] Wal sync odirect

2013-07-22 Thread Cédric Villemain
Le lundi 22 juillet 2013 09:39:50, Craig Ringer a écrit : On 07/22/2013 03:30 PM, Миша Тюрин wrote: i tell about wal_level is higher than MINIMAL OK, so you want to be able to force O_DIRECT for wal_level = archive ? I guess that makes sense if you expect the archive_command to read

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-22 Thread Tom Lane
Greg Stark st...@mit.edu writes: I do find the logic and variable names a bit confusing so I'm tempted to add some comments based on my initial confusion. And I'm tempted to add an ordinalityAttNum field to the executor node so we don't need to make these odd scanslot means this unless we have

Re: [HACKERS] changeset generation v5-01 - Patches git tree

2013-07-22 Thread Robert Haas
On Tue, Jul 16, 2013 at 9:00 AM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jul 7, 2013 at 4:34 PM, Andres Freund and...@2ndquadrant.com wrote: On 2013-07-07 15:43:17 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: 3b) Add catcache 'filter' that ensures the cache

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-22 Thread Greg Stark
So the more I look at this patch the fewer things I want to change in it. I've several times thought I should make an improvement and then realized I was really just making unnecessary tweaks that didn't really make much difference. It seems a shame that the node has to call the function and get

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Greg Smith
Attached is an update that I think sorts out all of the documentation concerns. I broke this section into paragraphs now that it's getting so long too. The only code change is that this now labels the controversial lag here average rate limit schedule lag. That way if someone wants to

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-22 Thread Greg Stark
On Mon, Jul 22, 2013 at 4:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: I haven't read this patch, but that comment scares the heck out of me. Even if the patch isn't broken today, it will be tomorrow, if it's making random changes like that in data structure semantics. It's not making random

Re: [HACKERS] improve Chinese locale performance

2013-07-22 Thread Greg Stark
On Mon, Jul 22, 2013 at 12:50 PM, Peter Eisentraut pete...@gmx.net wrote: I think part of the problem is that we call strcoll for each comparison, instead of doing strxfrm once for each datum and then just strcmp for each comparison. That is effectively equivalent to what the proposal

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Alvaro Herrera
Greg Smith wrote: Thanks. I didn't look at the code, but while trying to read the docs: +para + High rate limit schedule lag values, that is values not small with + respect to the actual transaction latency, indicate that something is + amiss in the

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Fabien COELHO
Hello Greg, Thanks for the improvement! I have a small reservation about finish/end time schedule in the second paragraph, or maybe there is something that I do not understand. There is no schedule for finishing anything, only start times are scheduled, so I wish the text could avoid

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Fabien COELHO
Hello Alvaro, Thanks. I didn't look at the code, but while trying to read the docs: +para + High rate limit schedule lag values, that is values not small with + respect to the actual transaction latency, indicate that something is + amiss in the throttling

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-22 Thread Andrew Gierth
Greg Stark said: So the more I look at this patch the fewer things I want to change in it. I've several times thought I should make an improvement and then realized I was really just making unnecessary tweaks that didn't really make much difference. It's almost as though we actually thought

Re: [HACKERS] improve Chinese locale performance

2013-07-22 Thread Andrew Dunstan
On 07/22/2013 12:49 PM, Greg Stark wrote: On Mon, Jul 22, 2013 at 12:50 PM, Peter Eisentraut pete...@gmx.net wrote: I think part of the problem is that we call strcoll for each comparison, instead of doing strxfrm once for each datum and then just strcmp for each comparison. That is

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Greg Smith
Very minor update with V19 here, to reflect Alvaro's comments. The tricky part now reads like this: High rate limit schedule lag values, that is lag values that are large compared to the actual transaction latency, indicate that something is amiss in the throttling process. High schedule

Re: [HACKERS] changeset generation v5-01 - Patches git tree

2013-07-22 Thread Robert Haas
On Fri, Jun 14, 2013 at 6:51 PM, Andres Freund and...@2ndquadrant.com wrote: The git tree is at: git://git.postgresql.org/git/users/andresfreund/postgres.git branch xlog-decoding-rebasing-cf4

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread David Fetter
On Mon, Jul 22, 2013 at 01:49:39PM -0400, Greg Smith wrote: Very minor update with V19 here, to reflect Alvaro's comments. The tricky part now reads like this: High rate limit schedule lag values, High values of the rate limit schedule lag measurement? that is lag values that are large

Re: [HACKERS] Foreign Tables as Partitions

2013-07-22 Thread Robert Haas
On Fri, Jul 19, 2013 at 1:46 PM, David Fetter da...@fetter.org wrote: This functionality was actually present in the original submission for foreign tables. I ripped it out before commit because I didn't think all of the interactions with other commands had been adequately considered. But I

[HACKERS] Expression indexes and dependecies

2013-07-22 Thread Pavan Deolasee
Hello, While doing some tests, I observed that expression indexes can malfunction if the underlying expression changes. For example, say I define a function foo() as: CREATE OR REPLACE FUNCTION foo(a integer) RETURNS integer AS $$ BEGIN RETURN $1 + 1; END; $$ LANGUAGE plpgsql IMMUTABLE; I

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2013-07-22 Thread Greg Smith
The v3 patch applies perfectly here now. Attached is a spreadsheet with test results from two platforms, a Mac laptop and a Linux server. I used systems with high disk speed because that seemed like a worst case for this improvement. The actual improvement for shrinking WAL should be even

Re: [HACKERS] Proposal: template-ify (binary) extensions

2013-07-22 Thread Dimitri Fontaine
Markus Wanner mar...@bluegap.ch writes: - per-installation (not even per-cluster) DSO availability Not sure what the issue is, here, but I agree that should be possible. For any extension where the new package version is shipping the same .so file name, you can only have one module on the

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2013-07-22 Thread Andres Freund
On 2013-07-19 10:40:01 +0530, Hari Babu wrote: On Friday, July 19, 2013 4:11 AM Greg Smith wrote: On 7/9/13 12:09 AM, Amit Kapila wrote: I think the first thing to verify is whether the results posted can be validated in some other environment setup by another person. The testcase

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Robert Haas
On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I very often use a little bit adjusted psql system queries to detection TOP N sized tables. I am thinking so it can be useful for all users I propose a few new commands \dts [N|size] ... show N

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-07-22 Thread Greg Smith
On 7/22/13 12:58 PM, Amit kapila wrote: As per discussion, updated patch contains following changes: 1. Regression tests for Alter System are removed 2. Parsed the auto file automatically after parsing postgresql.conf 3. Removed addition of include directive in postgresql.conf 4. Removed error

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Pavel Stehule
2013/7/22 Robert Haas robertmh...@gmail.com: On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I very often use a little bit adjusted psql system queries to detection TOP N sized tables. I am thinking so it can be useful for all users I propose a

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Merlin Moncure
On Mon, Jul 22, 2013 at 2:03 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I very often use a little bit adjusted psql system queries to detection TOP N sized tables. I am thinking so it can be useful

Re: [HACKERS] [COMMITTERS] pgsql: Allow background workers to be started dynamically.

2013-07-22 Thread Robert Haas
On Sat, Jul 20, 2013 at 12:39 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I don't have a problem with getting rid of those, it's easy enough to register them inside the worker and it's safe since we start with blocked signals. I seem to remember some discussion about why they were added

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Robert Haas
On Mon, Jul 22, 2013 at 3:13 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Jul 22, 2013 at 2:03 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I very often use a little bit adjusted psql system

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-07-22 Thread Alvaro Herrera
Greg Smith escribió: On 7/22/13 12:58 PM, Amit kapila wrote: As per discussion, updated patch contains following changes: 1. Regression tests for Alter System are removed 2. Parsed the auto file automatically after parsing postgresql.conf 3. Removed addition of include directive in

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-22 Thread Andrew Gierth
Tom Lane said: I haven't read this patch, but that comment scares the heck out of me. Even if the patch isn't broken today, it will be tomorrow, if it's making random changes like that in data structure semantics. Also, if you're confused, so will be everybody else who has to deal with the

Re: [HACKERS] Proposal: template-ify (binary) extensions

2013-07-22 Thread Markus Wanner
Dimitri, On 07/22/2013 08:44 PM, Dimitri Fontaine wrote: That's the trade-off we currently need to make to be able to ship with the current security protections we're talking about. Anything wrong with shipping postgis-1.5.so and postgis-2.0.so, as I we for Debian? Ok, here's the full worked

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Pavel Stehule
2013/7/22 Merlin Moncure mmonc...@gmail.com: On Mon, Jul 22, 2013 at 2:03 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I very often use a little bit adjusted psql system queries to detection TOP N

[HACKERS] RangeTblEntry.joinaliasvars representation change

2013-07-22 Thread Tom Lane
In http://www.postgresql.org/message-id/cak_s-g3-fwveer1c0idvtz0745-7ryifi8whbzcnmsn+hwc...@mail.gmail.com it's pointed out that commit 2ffa740b was a few bricks shy of a load, because it failed to cope with the possibility of a joinaliasvars item containing an implicit coercion. That's not too

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Andrew Dunstan
On 07/22/2013 03:11 PM, Pavel Stehule wrote: 2013/7/22 Robert Haas robertmh...@gmail.com: Rather than just continuing to add more imposible-to-remember syntax, we really need a better design here. do you have any tip? I agree with Robert. My tip is this: when you're in a hole, the first

Re: [HACKERS] [COMMITTERS] pgsql: Allow background workers to be started dynamically.

2013-07-22 Thread Robert Haas
On Mon, Jul 22, 2013 at 3:16 PM, Robert Haas robertmh...@gmail.com wrote: I think we have consensus to back-patch the other API changes as well. I'll work up a patch for that. Pushed that as well. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --

Re: [HACKERS] GSOC13 proposal - extend RETURNING syntax

2013-07-22 Thread Karol Trzcionka
I've noticed problem with UPDATE ... FROM statement. Fix in new version. Regards, Karol diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 90b9208..eba35f0 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -194,12 +194,27 @@ UPDATE [ ONLY ]

Re: [HACKERS] small typo in src/backend/access/transam/xlog.c

2013-07-22 Thread Robert Haas
On Mon, Jul 22, 2013 at 6:45 AM, didier did...@gmail.com wrote: Hi in void BootStrapXLOG(void) * to seed it other than the system clock value...) The upper half of the * uint64 value is just the tv_sec part, while the lower half is the XOR * of tv_sec and

Re: [HACKERS] small typo in src/backend/access/transam/xlog.c

2013-07-22 Thread Andres Freund
On 2013-07-22 15:55:46 -0400, Robert Haas wrote: On Mon, Jul 22, 2013 at 6:45 AM, didier did...@gmail.com wrote: Hi in void BootStrapXLOG(void) * to seed it other than the system clock value...) The upper half of the * uint64 value is just the tv_sec part, while

Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Peter Eisentraut
On 7/22/13 7:21 AM, Andres Freund wrote: Would somebody object to making the rmgr's invo value #defines like: I'm suspicious of enums that are assigned specific values. Enums should stand by themselves, they shouldn't be a symbolic layer on top of some other numbering or bit-fiddling scheme.

Re: [HACKERS] new row-level lock error messages

2013-07-22 Thread Alvaro Herrera
Peter Eisentraut wrote: I would suggest that these changes be undone, except that the old SELECT FOR ... be replaced by a dynamic string that reverse-parses the LockingClause to provide the actual clause that was used. Here's a patch for this. -- Álvaro Herrera

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2013-07-22 Thread Greg Smith
On 7/22/13 2:57 PM, Andres Freund wrote: * I'd be very surprised if this doesn't make WAL replay of update heavy workloads slower by at least factor of 2. I was thinking about what a benchmark of WAL replay would look like last year. I don't think that data is captured very well yet, and

Re: [HACKERS] getting rid of SnapshotNow

2013-07-22 Thread Robert Haas
On Fri, Jul 19, 2013 at 1:20 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: 4. If we use GetActiveSnapshot, all the comments about about a fresh MVCC snapshot still apply. However, the snapshot in question could be even more stale, especially in repeatable read or serializable mode.

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Jeff Janes
On Mon, Jul 22, 2013 at 12:40 PM, Andrew Dunstan and...@dunslane.net wrote: On 07/22/2013 03:11 PM, Pavel Stehule wrote: 2013/7/22 Robert Haas robertmh...@gmail.com: Rather than just continuing to add more imposible-to-remember syntax, we really need a better design here. do you have any

Re: [HACKERS] [v9.4] row level security

2013-07-22 Thread Greg Smith
On 7/20/13 10:08 AM, Kohei KaiGai wrote: With that change to expand_targetlist(), the change to getrelid() may be unnecessary, and then also the new rowsec_relid field in RangeTblEntry may not be needed. Hmm. I didn't have this idea. It seems to me fair enough and kills necessity to enhance

Re: [HACKERS] Expression indexes and dependecies

2013-07-22 Thread Alvaro Herrera
Pavan Deolasee escribió: Hello, While doing some tests, I observed that expression indexes can malfunction if the underlying expression changes. [...] Perhaps this is a known behaviour/limitation, but I could not find that in the documentation. But I wonder if it makes sense to check for

Re: [HACKERS] Expression indexes and dependecies

2013-07-22 Thread Claudio Freire
On Mon, Jul 22, 2013 at 6:04 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Pavan Deolasee escribió: Hello, While doing some tests, I observed that expression indexes can malfunction if the underlying expression changes. [...] Perhaps this is a known behaviour/limitation, but I could

Re: [HACKERS] Expression indexes and dependecies

2013-07-22 Thread Andres Freund
On 2013-07-22 17:04:06 -0400, Alvaro Herrera wrote: Pavan Deolasee escribió: Hello, While doing some tests, I observed that expression indexes can malfunction if the underlying expression changes. [...] Perhaps this is a known behaviour/limitation, but I could not find that in

[HACKERS] Comma Comma Comma 8601

2013-07-22 Thread David E. Wheeler
Hackers, According to [Wikipedia](https://en.wikipedia.org/wiki/ISO_8601#Times): Decimal fractions may also be added to any of the three time elements. A decimal mark, either a comma or a dot (without any preference as stated in resolution 10 of the 22nd General Conference CGPM in 2003,[11]

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Dimitri Fontaine
Pavel Stehule pavel.steh...@gmail.com writes: SELECT * from top5(); $ TABLE top5; -- add a view on top of the SRF you cannot use parameters - then I have to have prepared files like top10, top20, ... what is not too friendly The SRF could be using custom GUCs so that you can parametrize

Re: [HACKERS] [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-22 Thread Andres Freund
On 2013-07-17 10:11:28 -0400, Tom Lane wrote: Kevin Grittner kgri...@postgresql.org writes: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this patch is broken. Jagarundi still tells that story. At least something like the

Re: [HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2013-07-22 Thread Robert Haas
On Sun, Jul 21, 2013 at 4:44 AM, Ants Aasma ants.aa...@eesti.ee wrote: On Jul 21, 2013 4:06 AM, Noah Misch n...@leadboat.com wrote: If these hooks will need to apply to a larger operation, I think that mandates a different means to reliably expose the before/after object states. I haven't

Re: [HACKERS] [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-22 Thread Robert Haas
On Mon, Jul 22, 2013 at 6:01 PM, Andres Freund and...@2ndquadrant.com wrote: On 2013-07-17 10:11:28 -0400, Tom Lane wrote: Kevin Grittner kgri...@postgresql.org writes: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread David Fetter
On Mon, Jul 22, 2013 at 02:44:59PM -0700, Dimitri Fontaine wrote: Pavel Stehule pavel.steh...@gmail.com writes: SELECT * from top5(); $ TABLE top5; -- add a view on top of the SRF you cannot use parameters - then I have to have prepared files like top10, top20, ... what is not too

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread David Fetter
On Mon, Jul 22, 2013 at 03:55:33PM -0700, David Fetter wrote: On Mon, Jul 22, 2013 at 02:44:59PM -0700, Dimitri Fontaine wrote: Pavel Stehule pavel.steh...@gmail.com writes: SELECT * from top5(); $ TABLE top5; -- add a view on top of the SRF you cannot use parameters - then I

Re: [HACKERS] [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-22 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-07-17 10:11:28 -0400, Tom Lane wrote: The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this patch is broken. Jagarundi still tells that story. Uh, no. Jagarundi was perfectly happy for several build cycles after I committed

Re: [HACKERS] [9.4 CF 1] The Commitfest Slacker List

2013-07-22 Thread Greg Smith
On 6/24/13 12:57 PM, Josh Berkus wrote: Maciej is correct that this policy also belongs on the how to submit a patch wiki page. I will remedy that. I just reviewed and heavily updated the new section you added to https://wiki.postgresql.org/wiki/Submitting_a_Patch That included the idea

Re: [HACKERS] Comma Comma Comma 8601

2013-07-22 Thread Tom Lane
David E. Wheeler da...@justatheory.com writes: But I do wonder if the comma should be allowed for fractional seconds, since the spec says it is preferred (and often used in Javaland, I'm told). As in 14:30:50,232. Thoughts? Does that create any ambiguities against formats we already support?

Re: [HACKERS] [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-22 Thread Andres Freund
On 2013-07-22 19:09:13 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-07-17 10:11:28 -0400, Tom Lane wrote: The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this patch is broken. Jagarundi still tells that story. Uh, no. Jagarundi was perfectly

Re: [HACKERS] Expression indexes and dependecies

2013-07-22 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-07-22 17:04:06 -0400, Alvaro Herrera wrote: One way to attack this would be registering dependencies of a new kind on functions used by index expressions. Then CREATE OR REPLACE function could reject alteration for such functions. I don't

Re: [HACKERS] small typo in src/backend/access/transam/xlog.c

2013-07-22 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-07-22 15:55:46 -0400, Robert Haas wrote: And why is that? The comment above tells: while the lower half is the XOR of tv_sec and tv_usec. Yeah, the code doesn't match the comment; this mistake seems to be aboriginal. I don't think it

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-07-22 Thread Josh Berkus
All, Christophe just discovered something with include files which is going to cause issues with ALTER SYSTEM SET. So, take as a hypothetical that you use the default postgresql.conf file, which sets shared_buffers = 32MB. Instead of editing this file, you do ALTER SYSTEM SET shared_buffers =

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: Is looking for the biggest tables a common enough thing that it should be available to everyone, without needing custom customization? I don't really think so. It's surely not much harder than select relname, pg_relation_size(oid) from pg_class

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Andrew Dunstan
On 07/22/2013 04:26 PM, Jeff Janes wrote: On Mon, Jul 22, 2013 at 12:40 PM, Andrew Dunstan and...@dunslane.net wrote: On 07/22/2013 03:11 PM, Pavel Stehule wrote: 2013/7/22 Robert Haas robertmh...@gmail.com: Rather than just continuing to add more imposible-to-remember syntax, we really

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-07-22 Thread Tatsuo Ishii
Very minor update with V19 here, to reflect Alvaro's comments. The tricky part now reads like this: High rate limit schedule lag values, that is lag values that are large compared to the actual transaction latency, indicate that something is amiss in the throttling process. High schedule

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-07-22 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Christophe just discovered something with include files which is going to cause issues with ALTER SYSTEM SET. So, take as a hypothetical that you use the default postgresql.conf file, which sets shared_buffers = 32MB. Instead of editing this file, you

Re: [HACKERS] [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-22 Thread Andres Freund
On 2013-07-23 00:01:50 +0200, Andres Freund wrote: On 2013-07-17 10:11:28 -0400, Tom Lane wrote: Kevin Grittner kgri...@postgresql.org writes: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this patch is broken.

Re: [HACKERS] [9.4 CF 1] The Commitfest Slacker List

2013-07-22 Thread Greg Smith
On 7/3/13 7:25 PM, Bruce Momjian wrote: The extrapolation of Josh's approach is that committers have to do work that the community wants to maintain their commit rights, but their commit rights are helping the community, so why would people care if you take them away --- you only hurt the

Re: [HACKERS] REINDEX checking of index constraints

2013-07-22 Thread Noah Misch
On Sun, Jul 21, 2013 at 01:47:00PM -0700, Josh Berkus wrote: On 07/21/2013 11:30 AM, Josh Berkus wrote: Attached patch just restores the old behavior. Would it be worth preserving the ability to fix an index consistency problem with a REINDEX independent from related heap consistency

Re: [HACKERS] Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)

2013-07-22 Thread Andrew Gierth
Ok, since Atri posted our work-so-far and there's not been much comment, I'll outline here my proposed plan of attack. Rather than, as in the WIP patch, using the agg finalfn to validate the split between normal args and ORDER BY args, I propose this: Firstly, as in the WIP patch, func(a)

Re: [HACKERS] [PATCH] Revive line type

2013-07-22 Thread Greg Smith
On 6/26/13 9:34 PM, Peter Eisentraut wrote: Still wondering whether to use a A,B,C-based output format per Tom's comment. Wouldn't it also be helpful to remove The points used in the output are not necessarily the points used on input by making that not true? There are three obvious ways

Re: [HACKERS] Preventing tuple-table leakage in plpgsql

2013-07-22 Thread Noah Misch
On Sun, Jul 21, 2013 at 12:40:38PM -0400, Tom Lane wrote: Noah Misch n...@leadboat.com writes: Reasonable enough. Code that does use subtransactions will need to be more careful than before to manually free tuple tables in the non-error case. Failure to do so has been creating a leak that

Re: [HACKERS] Preventing tuple-table leakage in plpgsql

2013-07-22 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Sun, Jul 21, 2013 at 12:40:38PM -0400, Tom Lane wrote: Hmm ... good point. The other plan I'd been considering was to add explicit tracking inside spi.c of all tuple tables created within the current procedure, and then have AtEOSubXact_SPI flush any

Re: [HACKERS] [9.4 CF 1] And then there were 5

2013-07-22 Thread Greg Smith
After pushes from a few people, the remaining submissions are now waiting for commit. I updated each of those to have the latest info in the CF app, and tried to identify what committers have already looked at them. Access to calls stack from GET DIAGNOSTICS statement: ? Add more

Re: [HACKERS] RangeTblEntry.joinaliasvars representation change

2013-07-22 Thread Tom Lane
I wrote: After some reflection I think that the best fix is to redefine AcquireRewriteLocks' processing of dropped columns so that it puts an actual null pointer, not a consed-up Const, into the joinaliasvars list item. Here's a complete patch along that line. Possibly worthy of note is that

Re: [HACKERS] [9.4 CF 1] And then there were 5

2013-07-22 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: Remove unused targets from plan: Alvaro? (He reviewed it already) Really I should do that one, but it seems like all my available cycles have been going into bug fixing lately :-( regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] Improvement of checkpoint IO scheduler for stable transaction responses

2013-07-22 Thread Greg Smith
On 7/22/13 4:52 AM, KONDO Mitsumasa wrote: The writeback source code which I indicated part of writeback is almost same as community kernel (2.6.32.61). I also read linux kernel 3.9.7, but it is almost same this part. The main source code difference comes from going back to the RedHat 5

Re: [HACKERS] [9.4 CF 1] And then there were 5

2013-07-22 Thread Alvaro Herrera
Tom Lane wrote: Greg Smith g...@2ndquadrant.com writes: Remove unused targets from plan: Alvaro? (He reviewed it already) Really I should do that one, but it seems like all my available cycles have been going into bug fixing lately :-( Yeah, I only did a first pass over that patch and

Re: [HACKERS] Auto explain target tables

2013-07-22 Thread Craig Ringer
On 07/21/2013 10:42 PM, Миша Тюрин wrote: hi, list, again. the next proposal into auto explain. one would be happy if could set list of target tables and indexes. sometimes it is very hard to detect who is using your indexes. but turn total logging on under thousands transactions per

Re: [HACKERS] REINDEX checking of index constraints

2013-07-22 Thread Alvaro Herrera
Noah Misch wrote: I meant to ask whether, instead of reverting the accidental behavior change, we should do something like leave the behavior and change the documentation instead. I personally vote no, but that alternative seemed credible enough to justify mentioning it. Something more

Re: [HACKERS] Auto explain target tables

2013-07-22 Thread Craig Ringer
On 07/23/2013 11:24 AM, Craig Ringer wrote: On 07/21/2013 10:42 PM, Миша Тюрин wrote: hi, list, again. the next proposal into auto explain. one would be happy if could set list of target tables and indexes. sometimes it is very hard to detect who is using your indexes. but turn total

[HACKERS] Design proposal: fsync absorb linear slider

2013-07-22 Thread Greg Smith
Recently I've been dismissing a lot of suggested changes to checkpoint fsync timing without suggesting an alternative. I have a simple one in mind that captures the biggest problem I see: that the number of backend and checkpoint writes to a file are not connected at all. We know that a 1GB

Re: [HACKERS] Auto explain target tables

2013-07-22 Thread Craig Ringer
On 07/23/2013 11:41 AM, Craig Ringer wrote: On 07/23/2013 11:24 AM, Craig Ringer wrote: On 07/21/2013 10:42 PM, Миша Тюрин wrote: hi, list, again. the next proposal into auto explain. one would be happy if could set list of target tables and indexes. sometimes it is very hard to detect who

Re: [HACKERS] proposal - psql - show longest tables

2013-07-22 Thread Pavel Stehule
I agree with Robert. My tip is this: when you're in a hole, the first thing to do is to stop digging. I don't think that Pavel believes himself to be in a hole. After setting up my .psqlrc file as I normally do, I could do this: :rtsize limit 10; But it doesn't have the 'MB' feature, and

Re: [HACKERS] [9.4 CF 1] And then there were 5

2013-07-22 Thread Greg Smith
On 7/22/13 10:48 PM, Tom Lane wrote: Greg Smith g...@2ndquadrant.com writes: Remove unused targets from plan: Alvaro? (He reviewed it already) Really I should do that one, but it seems like all my available cycles have been going into bug fixing lately :-( I just put you down as the

  1   2   >