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

2013-07-18 Thread Fabien COELHO
Hello Tatsuo, I think I'm starting to understand what's going on. Suppose there are n transactions be issued by pgbench and it decides each schedule d(0), d(1)... d(n). Actually the schedule d(i) (which is stored in st-until) is decided by the following code: int64 wait =

Re: [HACKERS] pgindent behavior we could do without

2013-07-18 Thread Bruce Momjian
On Thu, Jul 18, 2013 at 12:27:21AM -0400, Tom Lane wrote: It's always annoyed me that pgindent insists on adjusting vertical whitespace around #else and related commands. This has, for example, rendered src/include/storage/barrier.h nigh illegible: you get things like /* * lwsync orders

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

2013-07-18 Thread Fabien COELHO
Hello Greg, The lag computation was not the interesting part of this feature to me. As I said before, I considered it more of a debugging level thing than a number people would analyze as much as you did. I understand why you don't like it though. If the reference time was moved forward

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

2013-07-18 Thread Tatsuo Ishii
Fabien, Hello again Tatsuo, For your information, included is the patch against git master head to implement the lag in a way what I proposed. With the patch, I get more consistent number on Linux (and Mac OS X). I must disagree with your proposal: At least, it does not provide the

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

2013-07-18 Thread Fabien COELHO
Hello Tatsuo I think current measurement method will give enough confusion if it's not provided with detailed explanation. Could you please provide doc updatation? Please find a v17 proposition with an updated and extended documentation, focussed on clarifying the lag measure and its

Re: [HACKERS] Add visibility map information to pg_freespace.

2013-07-18 Thread Kyotaro HORIGUCHI
Thank you for the worthwhile additions. At Tue, 16 Jul 2013 16:04:43 +0900, Satoshi Nagayasu sn...@uptime.jp wrote in 51e4f08b.3030...@uptime.jp | postgres=# select * from pg_freespace_with_vminfo('t'::regclass) limit | 10; .. I think we can simply add is_all_viible column to the existing

Re: [HACKERS] Add visibility map information to pg_freespace.

2013-07-18 Thread Kyotaro HORIGUCHI
Hmm. I'm sorry to find that this patch is already marked as 'Return with Feedback' on the CF page around the same time when the preveous review comment has sent. Is it somewhat crossing? Anyway, I'll take a rain check for this. I have simply merged the two regtests separately into two original

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-18 Thread Amit Kapila
On Thursday, July 18, 2013 12:38 AM Josh Berkus wrote: On 07/17/2013 12:01 PM, Alvaro Herrera wrote: Both of these seem like they would make troubleshooters' lives more difficult. I think we should just parse the auto file automatically after parsing postgresql.conf, without requiring the

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

2013-07-18 Thread Amit Kapila
On Wednesday, July 17, 2013 6:08 PM Ants Aasma wrote: On Wed, Jul 17, 2013 at 2:54 PM, Amit Kapila amit.kap...@huawei.com wrote: I think Oracle also use similar concept for making writes efficient, and they have patent also for this technology which you can find at below link:

Re: [HACKERS] Add some regression tests for SEQUENCE

2013-07-18 Thread Fabien COELHO
Hello Robins, Thanks Fabien. This was a wrong attachment to the email. This patch works for me (applied, tested). However, some remarks: seq4: should it check something? How do you know that OWNED BY did anything? regress_role_seq2: shoult check that the sequence owner is the table

[HACKERS] getting rid of SnapshotNow

2013-07-18 Thread Robert Haas
There seems to be a consensus that we should try to get rid of SnapshotNow entirely now that we have MVCC catalog scans, so I'm attaching two patches that together come close to achieving that goal: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases

Re: [HACKERS] Return of can't paste into psql issue

2013-07-18 Thread Merlin Moncure
On Wed, Jul 17, 2013 at 6:30 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Josh Berkus j...@agliodbs.com writes: So, an even more practical workaround (I've been using cat | psql), but still a mysterious issue. As a workaround you might try \e with EDITOR=emacs or some of the other

Re: [HACKERS] Return of can't paste into psql issue

2013-07-18 Thread Merlin Moncure
On Thu, Jul 18, 2013 at 7:57 AM, Merlin Moncure mmonc...@gmail.com wrote: One thing that could solve a lot of issues would be to disable readline when inside a dollar quote etc. actually, that's dumb (pre-coffee). merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] review: Non-recursive processing of AND/OR lists

2013-07-18 Thread Robert Haas
On Wed, Jul 17, 2013 at 2:03 PM, Gurjeet Singh gurj...@singh.im wrote: In v6 of the patch, I have deferred the 'pending' list initialization to until we actually hit a candidate right-branch. So in the common case the pending list will never be populated, and if we find a bushy or right-deep

Re: [HACKERS] Return of can't paste into psql issue

2013-07-18 Thread Andrew Dunstan
On 07/18/2013 08:59 AM, Merlin Moncure wrote: On Thu, Jul 18, 2013 at 7:57 AM, Merlin Moncure mmonc...@gmail.com wrote: One thing that could solve a lot of issues would be to disable readline when inside a dollar quote etc. actually, that's dumb (pre-coffee). Yeah, but what would be

Re: [HACKERS] review: Non-recursive processing of AND/OR lists

2013-07-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Jul 17, 2013 at 2:03 PM, Gurjeet Singh gurj...@singh.im wrote: Agreed that bushy/right-deep trees are a remote corner case, but we are addressing a remote corner case in the first place (insanely long AND lists) and why not handle another

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

2013-07-18 Thread Fabien COELHO
Hello again Tatsuo, For your information, included is the patch against git master head to implement the lag in a way what I proposed. With the patch, I get more consistent number on Linux (and Mac OS X). I must disagree with your proposal: At least, it does not provide the information I

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases where we set SnapshotNow as a sort of default snapshot, this patch changes the code to use SnapshotError instead. This affects scan-xs_snapshot in

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Robert Haas
On Thu, Jul 18, 2013 at 10:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases where we set SnapshotNow as a sort of default snapshot, this patch changes the code

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

2013-07-18 Thread Robert Haas
On Sun, Jul 14, 2013 at 3:13 PM, Greg Smith g...@2ndquadrant.com wrote: Accordingly, the current behavior--no delay--is already the best possible throughput. If you apply a write timing change and it seems to increase TPS, that's almost certainly because it executed less checkpoint writes.

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

2013-07-18 Thread Greg Smith
Please stop all this discussion of patents in this area. Bringing up a US patents here makes US list members more likely to be treated as willful infringers of that patent: http://www.ipwatchdog.com/patent/advanced-patent/willful-patent-infringement/ if the PostgreSQL code duplicates that

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

2013-07-18 Thread Greg Smith
On 7/18/13 11:04 AM, Robert Haas wrote: On a system where fsync is sometimes very very slow, that might result in the checkpoint overrunning its time budget - but SO WHAT? Checkpoints provide a boundary on recovery time. That is their only purpose. You can always do better by postponing

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Alvaro Herrera
Robert Haas escribió: On Thu, Jul 18, 2013 at 10:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases where we set SnapshotNow as a sort of default snapshot,

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

2013-07-18 Thread Robert Haas
On Thu, Jul 18, 2013 at 11:41 AM, Greg Smith g...@2ndquadrant.com wrote: On 7/18/13 11:04 AM, Robert Haas wrote: On a system where fsync is sometimes very very slow, that might result in the checkpoint overrunning its time budget - but SO WHAT? Checkpoints provide a boundary on recovery

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

2013-07-18 Thread Alvaro Herrera
Greg Smith escribió: On 7/18/13 11:04 AM, Robert Haas wrote: On a system where fsync is sometimes very very slow, that might result in the checkpoint overrunning its time budget - but SO WHAT? Checkpoints provide a boundary on recovery time. That is their only purpose. You can always do

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Robert Haas
On Thu, Jul 18, 2013 at 11:54 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: They don't show up in a quick grep of psqlodbc's source code, FWIW. Hmm. Maybe we should just remove them and see if anyone complains. We could always put them back (or make them available via contrib) if it's

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Andres Freund
On 2013-07-18 12:01:39 -0400, Robert Haas wrote: On Thu, Jul 18, 2013 at 11:54 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: They don't show up in a quick grep of psqlodbc's source code, FWIW. Hmm. Maybe we should just remove them and see if anyone complains. We could always put them

Re: [HACKERS] New statistics for WAL buffer dirty writes

2013-07-18 Thread Alvaro Herrera
What happened to this patch? We were waiting on an updated version from you. Satoshi Nagayasu wrote: (2012/12/10 3:06), Tomas Vondra wrote: On 29.10.2012 04:58, Satoshi Nagayasu wrote: 2012/10/24 1:12, Alvaro Herrera wrote: Satoshi Nagayasu escribi�: With this patch, walwriter process

[HACKERS] is a special cost for external sort?

2013-07-18 Thread Pavel Stehule
Hello I found a slow query with large external sort. I expect, so external sort should be penalized. Is it? Regards Pavel -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Alvaro Herrera
Andres Freund escribió: On 2013-07-18 12:01:39 -0400, Robert Haas wrote: On Thu, Jul 18, 2013 at 11:54 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: They don't show up in a quick grep of psqlodbc's source code, FWIW. Hmm. Maybe we should just remove them and see if anyone

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Robert Haas
On Thu, Jul 18, 2013 at 12:25 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Ah, yeah, that does show up. I had grepped for 'currtid_'. Sorry. They're all in positioned_load() in results.c. Well, in that case, we'll have to keep it around. I still wish we could get a clear answer to the

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

2013-07-18 Thread Greg Smith
On 7/18/13 12:00 PM, Alvaro Herrera wrote: I think the idea is to have a system in which most of the time the recovery time will be that for checkpoint_timeout=5, but in those (hopefully rare) cases where checkpoints take a bit longer, the recovery time will be that for checkpoint_timeout=6. I

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-18 Thread Josh Berkus
On 07/18/2013 04:25 AM, Amit Kapila wrote: On Thursday, July 18, 2013 12:38 AM Josh Berkus wrote: On 07/17/2013 12:01 PM, Alvaro Herrera wrote: Both of these seem like they would make troubleshooters' lives more difficult. I think we should just parse the auto file automatically after

Re: [HACKERS] review: Non-recursive processing of AND/OR lists

2013-07-18 Thread Gurjeet Singh
On Thu, Jul 18, 2013 at 10:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Because simpler code is less likely to have bugs and is easier to maintain. I agree with that point, but one should also remember Polya's Inventor's Paradox: the more general problem may be easier to solve. That is, if

[HACKERS] Simple documentation typo patch

2013-07-18 Thread David Christensen
Hey folks, this corrects typos going back to 75c6519ff68dbb97f73b13e9976fb8075bbde7b8 where EUC_JIS_2004 and SHIFT_JIS_2004 were first added. These typos are present in all supported major versions of PostgreSQL, back through 8.3; I didn't look any further than that. :-)

Re: [HACKERS] is a special cost for external sort?

2013-07-18 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I found a slow query with large external sort. I expect, so external sort should be penalized. Is it? See cost_sort() in src/backend/optimizer/path/costsize.c regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Fix pgstattuple/pgstatindex to use regclass-type as the argument

2013-07-18 Thread Fujii Masao
On Thu, Jul 18, 2013 at 1:49 PM, Rushabh Lathia rushabh.lat...@gmail.com wrote: On Thu, Jul 18, 2013 at 9:40 AM, Satoshi Nagayasu sn...@uptime.jp wrote: (2013/07/18 2:31), Fujii Masao wrote: On Tue, Jul 16, 2013 at 3:00 PM, Satoshi Nagayasu sn...@uptime.jp wrote: (2013/07/04 3:58),

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-18 Thread Fujii Masao
On Fri, Jul 19, 2013 at 2:45 AM, Josh Berkus j...@agliodbs.com wrote: On 07/18/2013 04:25 AM, Amit Kapila wrote: On Thursday, July 18, 2013 12:38 AM Josh Berkus wrote: On 07/17/2013 12:01 PM, Alvaro Herrera wrote: Both of these seem like they would make troubleshooters' lives more difficult.

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

2013-07-18 Thread Stephen Frost
* Greg Smith (g...@2ndquadrant.com) wrote: The first word that comes to mind for for just disregarding the end time is that it's a sloppy checkpoint. There is all sorts of sloppy behavior you might do here, but I've worked under the assumption that ignoring the contract with the administrator

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

2013-07-18 Thread Josh Berkus
On 07/17/2013 08:15 PM, Andrew Gierth wrote: The spec defines two types of aggregate function classed as ordered set function, as follows: 1. An inverse distribution function taking one argument (which must be a grouped column or otherwise constant within groups) plus a sorted group

[HACKERS] Settings of SSL context for PGserver and for libpq

2013-07-18 Thread Dmitrij K
Dear Developers. Could you do things written in this message ? /// +/* Target auditorium of this doc are: developers the Postgresql, developers apps c/c++, paranoiacs . A hosting(dedicted/virtual) is not safe place for storing the

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-18 Thread Alvaro Herrera
Fujii Masao escribió: On Fri, Jul 19, 2013 at 2:45 AM, Josh Berkus j...@agliodbs.com wrote: On 07/18/2013 04:25 AM, Amit Kapila wrote: On Thursday, July 18, 2013 12:38 AM Josh Berkus wrote: On 07/17/2013 12:01 PM, Alvaro Herrera wrote: Both of these seem like they would make

Re: [HACKERS] Fatal error after starting postgres : sys identifiers must be different

2013-07-18 Thread Indrajit Roychoudhury
Hi, Could you please let me know what does the error system identifiers are same mean? Below is the snapshot from one of the masters. I am setting up BDR as per the wiki http://wiki.postgresql.org/wiki/BDR_User_Guide#Initial_setup and source @

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-18 Thread Josh Berkus
Alvaro, I think the only drawback of this is that there's no way to disable ALTER SYSTEM (i.e. there's no directory you can remove to prevent the thing from working). But is this a desirable property? I mean, if we want to disallow ALTER SYSTEM I think we should provide a direct way to do

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

2013-07-18 Thread Andrew Gierth
Josh Berkus wrote: On 07/17/2013 08:15 PM, Andrew Gierth wrote: The spec defines two types of aggregate function classed as ordered set function, as follows: 1. An inverse distribution function taking one argument (which must be a grouped column or otherwise constant within groups)

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

2013-07-18 Thread Josh Berkus
Andrew, Well, as you probably know, the spec is a whole pile of random special-case syntax and any similarities are probably more accidental than anything else. Hah, I didn't realize that our ordered aggregate syntax even *was* spec. A major difference is that in agg(x order by y), the

Re: [HACKERS] WITH CHECK OPTION for auto-updatable views

2013-07-18 Thread Stephen Frost
Dean, * Stephen Frost (sfr...@snowman.net) wrote: Thanks! This is really looking quite good, but it's a bit late and I'm going on vacation tomorrow, so I didn't quite want to commit it yet. :) Apologies on this taking a bit longer than I expected, but it's been committed and pushed now.

[HACKERS] [9.4 CF 1] Patches which desperately need code review

2013-07-18 Thread Josh Berkus
Hackers, The following three patches really really need some code review love. Until they get a code review, we can't close out the CommitFest: Row-Level Security: https://commitfest.postgresql.org/action/patch_view?id=874 Revive Line Type:

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-18 Thread Alvaro Herrera
Josh Berkus escribió: We are missing one feature, which is the ability to relocate the postgresql.auto.conf file if relocating it is desireable according to some sysadmin spec. This kind of ties into another patch which was discussed on this list -- the ability to relocate the recovery.conf

Re: [HACKERS] [9.4 CF 1] Patches which desperately need code review

2013-07-18 Thread Alvaro Herrera
Josh Berkus wrote: Revive Line Type: https://commitfest.postgresql.org/action/patch_view?id=1154 This one's easy -- we're waiting on a decision on whether to use A,B,C text representation. Honestly, it seems a no-brainer to me that this is what it should use; the other representation seems to

Re: [HACKERS] is a special cost for external sort?

2013-07-18 Thread Jeff Janes
On Thu, Jul 18, 2013 at 9:14 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I found a slow query with large external sort. I expect, so external sort should be penalized. Is it? It tries to, but it doesn't seem to be much good at it. In particular, I think it does a poor job of

Re: [HACKERS] Fatal error after starting postgres : sys identifiers must be different

2013-07-18 Thread Michael Paquier
On Fri, Jul 19, 2013 at 5:02 AM, Indrajit Roychoudhury indrajit.roychoudh...@gmail.com wrote: Could you please let me know what does the error system identifiers are same mean? Below is the snapshot from one of the masters. I am setting up BDR as per the wiki

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

2013-07-18 Thread Andrew Gierth
Josh Berkus wrote: Hah, I didn't realize that our ordered aggregate syntax even *was* spec. The spec defines agg(x order by y) only for array_agg and xmlagg; the generalization to arbitrary other aggregates is our extension. (But kind of obvious really.) Our implementation does heavily reuse

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

2013-07-18 Thread Josh Berkus
The problem is, given that the parser is looking at: foo(p1,p2,...) within group (order by q1,q2,...) how do we best represent the possible matching functions in pg_proc and pg_aggregate? Our partial solution so far does not allow polymorphism to work properly, so we need a better way;

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

2013-07-18 Thread Greg Smith
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 used is posted at below link: http://www.postgresql.org/message-id/51366323.8070...@vmware.com That

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

2013-07-18 Thread Tatsuo Ishii
Hello Tatsuo I think current measurement method will give enough confusion if it's not provided with detailed explanation. Could you please provide doc updatation? Please find a v17 proposition with an updated and extended documentation, focussed on clarifying the lag measure and its

Re: [HACKERS] New statistics for WAL buffer dirty writes

2013-07-18 Thread Satoshi Nagayasu
Will revise and re-resubmit for the next CF. Regards, 2013/07/19 1:06, Alvaro Herrera wrote: What happened to this patch? We were waiting on an updated version from you. Satoshi Nagayasu wrote: (2012/12/10 3:06), Tomas Vondra wrote: On 29.10.2012 04:58, Satoshi Nagayasu wrote:

Re: [HACKERS] hardware donation

2013-07-18 Thread Greg Smith
On 7/10/13 12:53 PM, Benedikt Grundmann wrote: The server will probably be most interesting for the disks in it. That is where we spend the largest amount of time optimizing (for sequential scan speed in particular): 22x600GB disks in a Raid6+0 (Raid0 of 2x 10disk raid 6 arrays) + 2 spare

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

2013-07-18 Thread Greg Smith
On 7/18/13 6:45 PM, Tatsuo Ishii wrote: I'm not a native English speaker either... Greg, could you please review the document? Yes, I already took at look at it briefly. The updates move in the right direction, but I can edit them usefully before commit. I'll have that done by tomorrow and

Re: [HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-18 Thread Tom Lane
Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Following example does not work as expected: -- Should return TRUE but returning FALSE SELECT 'Programmer' ~ '(\w).*?\1' as t; For the archives' sake --- I've filed a report about this with the Tcl crew. They seem to have moved their

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

2013-07-18 Thread Karol Trzcionka
Current head 4cbe3ac3e86790d05c569de4585e5075a62a9b41 - patch applies correct (only change needed in parallel_schedule). However it fails on own regression tests (other tests pass). Regards, Karol -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] [ODBC] getting rid of SnapshotNow

2013-07-18 Thread Inoue, Hiroshi
(2013/07/18 23:54), Robert Haas wrote: On Thu, Jul 18, 2013 at 10:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases where we set SnapshotNow as a sort of default

[HACKERS] compiler warning in UtfToLocal and LocalToUtf (conv.c)

2013-07-18 Thread Karol Trzcionka
Hello, in the current master head (4cbe3ac3e86790d05c569de4585e5075a62a9b41), I've noticed the compiler warnings in src/backend/utils/mb/conv.c conv.c: In function ‘UtfToLocal’: conv.c:252:23: error: ‘iutf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ... conv.c: In

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-18 Thread Greg Smith
On 7/18/13 4:02 PM, Alvaro Herrera wrote: I think we should just put the config directives of ALTER SYSTEM into a file, not dir, alongside postgresql.conf; I would suggest postgresql.auto.conf. This file is parsed automatically after postgresql.conf, without requiring an include directive in

Re: [HACKERS] Fatal error after starting postgres : sys identifiers must be different

2013-07-18 Thread Andres Freund
Hi! On 2013-07-19 07:31:07 +0900, Michael Paquier wrote: If this behavior is confirmed, I think that this bug should be reported directly to Andres and not this mailing list, just because logical replication is not integrated into Postgres core as of now. I think I agree, although I don't

Re: [HACKERS] compiler warning in UtfToLocal and LocalToUtf (conv.c)

2013-07-18 Thread Tom Lane
Karol Trzcionka karl...@gmail.com writes: in the current master head (4cbe3ac3e86790d05c569de4585e5075a62a9b41), I've noticed the compiler warnings in src/backend/utils/mb/conv.c Hm, what compiler version are you using? I've never seen such a warning (and that code hasn't changed in some

Re: [HACKERS] compiler warning in UtfToLocal and LocalToUtf (conv.c)

2013-07-18 Thread Karol Trzcionka
W dniu 19.07.2013 02:42, Tom Lane pisze: Hm, what compiler version are you using? I've never seen such a warning (and that code hasn't changed in some time). gcc version 4.8.1 20130612 (Red Hat 4.8.1-2) (GCC) Regards, Karol -- Sent via pgsql-hackers mailing list

[HACKERS] Foreign Tables as Partitions

2013-07-18 Thread David Fetter
Folks, Please find attached a PoC patch to implement $subject. So far, with a lot of help from Andrew Gierth, I've roughed out an implementation which allows you to ALTER FOREIGN TABLE so it inherits a local table. TBD: CREATE FOREIGN TABLE ... INHERITS ..., docs, regression testing, etc., etc.

[HACKERS] confusing typedefs in jsonfuncs.c

2013-07-18 Thread Peter Eisentraut
The new jsonfuncs.c has some confusing typedef scheme. For example, it has a bunch of definitions like this: typedef struct getState { ... } getState, *GetState; So GetState is a pointer to getState. I have never seen that kind of convention before. This then leads to code like GetState

Re: [HACKERS] confusing typedefs in jsonfuncs.c

2013-07-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: The new jsonfuncs.c has some confusing typedef scheme. For example, it has a bunch of definitions like this: typedef struct getState { ... } getState, *GetState; So GetState is a pointer to getState. I have never seen that kind of convention

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

2013-07-18 Thread Stephen Frost
Greg, * Greg Smith (g...@2ndquadrant.com) wrote: That seems easy enough to do here, Heikki's test script is excellent. The latest patch Hari posted on July 2 has one hunk that doesn't apply anymore now. Inside src/backend/utils/adt/pg_lzcompress.c the patch tries to change this code: -

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

2013-07-18 Thread Noah Misch
On Thu, Jul 18, 2013 at 10:33:15PM +, Andrew Gierth wrote: Josh Berkus wrote: Well, seems like it would work the same as agg_func(constx,coly,colz ORDER BY coly, colz) I'd try transforming WITHIN GROUP into the above during parse analysis. The default would be the transformation

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

2013-07-18 Thread Tom Lane
Noah Misch n...@leadboat.com writes: (I don't know whether VARIADIC transition functions work today, but that would become an orthogonal project.) Coincidentally enough, some Salesforce folk were asking me about allowing VARIADIC aggregates just a few days ago. I experimented enough to find

Re: [HACKERS] Differences in WHERE clause of SELECT

2013-07-18 Thread Prabakaran, Vaishnavi
Hi, Thanks for your responses. The specific use case which I am interested in is Numeric LIKE Pattern_string . I'm willing to attempt a patch to support the specific use case above by adding implicit casts, without modifying the entire casting rules. Is this something that is likely to be

Re: [HACKERS] Differences in WHERE clause of SELECT

2013-07-18 Thread Tom Lane
Prabakaran, Vaishnavi vaishna...@fast.au.fujitsu.com writes: The specific use case which I am interested in is Numeric LIKE Pattern_string . I'm willing to attempt a patch to support the specific use case above by adding implicit casts, without modifying the entire casting rules. Is

[HACKERS] AGG_PLAIN thinks sorts are free

2013-07-18 Thread Jeff Janes
AGG_PLAIN sometimes does sorts, but it thinks they are free. Also, under explain analyze it does not explicitly report whether the sort was external or not, nor report the disk or memory usage, the way other sorts do. I don't know if those two things are related or not. This behavior seems to

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

2013-07-18 Thread Stephen Frost
* Greg Smith (g...@2ndquadrant.com) wrote: On 7/18/13 7:57 PM, Karol Trzcionka wrote: Current head 4cbe3ac3e86790d05c569de4585e5075a62a9b41 - patch applies correct (only change needed in parallel_schedule). However it fails on own regression tests (other tests pass). I got a rejected hunk

Re: [HACKERS] AGG_PLAIN thinks sorts are free

2013-07-18 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: AGG_PLAIN sometimes does sorts, but it thinks they are free. Also, under explain analyze it does not explicitly report whether the sort was external or not, nor report the disk or memory usage, the way other sorts do. I don't know if those two things

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

2013-07-18 Thread Greg Smith
On 7/18/13 11:03 PM, Stephen Frost wrote: Wasn't there a wiki page about this feature which might also help? Bigger question- is it correct for the latest version of the patch? https://wiki.postgresql.org/wiki/RLS has accumulated a lot of older debris that may or may not be useful here.

Re: [HACKERS] pgindent behavior we could do without

2013-07-18 Thread Noah Misch
On Thu, Jul 18, 2013 at 12:27:21AM -0400, Tom Lane wrote: It's always annoyed me that pgindent insists on adjusting vertical whitespace around #else and related commands. This has, for example, rendered src/include/storage/barrier.h nigh illegible: you get things like /* * lwsync orders

Re: [HACKERS] pgindent behavior we could do without

2013-07-18 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Thu, Jul 18, 2013 at 12:27:21AM -0400, Tom Lane wrote: It's always annoyed me that pgindent insists on adjusting vertical whitespace around #else and related commands. This has, for example, rendered src/include/storage/barrier.h nigh illegible: you get

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-18 Thread Josh Berkus
Greg, I thought this was a good spot to try and re-draw this line because I don't want just one program that is able to create new configuration entries easily. I want to see a whole universe of them. ALTER SYSTEM SET, tuning helpers, replication helpers, logging helpers, vacuum

Re: [HACKERS] getting rid of SnapshotNow

2013-07-18 Thread Noah Misch
On Thu, Jul 18, 2013 at 08:46:48AM -0400, Robert Haas wrote: 1. snapshot-error-v1.patch introduces a new special snapshot, called SnapshotError. In the cases where we set SnapshotNow as a sort of default snapshot, this patch changes the code to use SnapshotError instead. This affects

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-18 Thread Amit Kapila
On Friday, July 19, 2013 1:33 AM Alvaro Herrera wrote: Fujii Masao escribió: On Fri, Jul 19, 2013 at 2:45 AM, Josh Berkus j...@agliodbs.com wrote: On 07/18/2013 04:25 AM, Amit Kapila wrote: On Thursday, July 18, 2013 12:38 AM Josh Berkus wrote: On 07/17/2013 12:01 PM, Alvaro Herrera

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

2013-07-18 Thread Hari Babu
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 used is posted at below link:

Re: [HACKERS] getting rid of SnapshotNow

2013-07-18 Thread Tom Lane
Noah Misch n...@leadboat.com writes: To me, the major advantage of removing SnapshotNow is to force all third-party code to reevaluate. But that could be just as well achieved by renaming it to, say, SnapshotImmediate. If there are borderline-legitimate SnapshotNow uses in our code base, I'd

Re: [HACKERS] [RFC] Minmax indexes

2013-07-18 Thread Alvaro Herrera
Alvaro Herrera wrote: This is a preliminary proposal for Minmax indexes. I'm experimenting with the code, but it's too crude to post yet, so here's a document explaining what they are and how they work, so that reviewers can poke holes to have the design improved. After going further with

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

2013-07-18 Thread Fabien COELHO
I'm not a native English speaker either... Greg, could you please review the document? Yes, I already took at look at it briefly. The updates move in the right direction, but I can edit them usefully before commit. Great, thanks for your help! -- Fabien. -- Sent via pgsql-hackers