Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Rajeev rastogi
On 26 June 2014 11:53, Samrat Revagade Wrote: I am sending updated patch - buggy statement is printed via more logical psql_error function instead printf Thank you for updating patch, I really appreciate your efforts. Now, everything is good from my side. * it apply cleanly to the current

Re: [HACKERS] pg_xlogdump --stats

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 05:19:10 +, dilip.ku...@huawei.com wrote: I have started reviewing the patch.. Thanks. 1. Patch applied to git head cleanly. 2. Compiled in Linux -- Some warnings same as mentioned by furuyao I've attached an updated version of the patch which should fix the warnings by

Re: [HACKERS] pg_xlogdump --stats

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 12:05:06 +0530, a...@2ndquadrant.com wrote: It may be that the best thing to do would be to avoid using optional_argument altogether, and have separate --stats and --stats-per-record options. Thoughts? That's what I've done in the attached patch, except I've called the new

Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Pavel Stehule
2014-06-30 8:17 GMT+02:00 Rajeev rastogi rajeev.rast...@huawei.com: On 26 June 2014 11:53, Samrat Revagade Wrote: I am sending updated patch - buggy statement is printed via more logical psql_error function instead printf Thank you for updating patch, I really appreciate your efforts.

Re: [HACKERS] Providing catalog view to pg_hba.conf file - Patch submission

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-29 22:25:54 +0530, a...@2ndquadrant.com wrote: I think the really right thing to do would be to have two separate columns, one with all, sameuser, samerole, replication, or empty; and the other an array of database names. After sleeping on it, I realised that the code would return

Re: [HACKERS] SQL access to database attributes

2014-06-30 Thread Pavel Stehule
2014-06-29 21:09 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Vik Fearing vik.fear...@dalibo.com writes: On 06/21/2014 10:11 PM, Pavel Stehule wrote: Is any reason or is acceptable incompatible change CONNECTION_LIMIT instead CONNECTION LIMIT? Is decreasing parser size about 1% good enough for

[HACKERS] Escaping from blocked send() reprised.

2014-06-30 Thread Kyotaro HORIGUCHI
Hello, I have received inquiries related to blocked communication several times for these weeks with different symptoms. Then I found this message from archive, http://postgresql.1045698.n5.nabble.com/Escaping-a-blocked-sendto-syscall-without-causing-a-restart-td5740855.html Subject: Escaping a

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-30 Thread Craig Ringer
On 06/29/2014 02:19 AM, Matheus de Oliveira wrote: Hi Hackers, I have worked on that patch a little more. So now I have functional patch (although still WIP) attached. The feature works as following: - Added a boolean parameter only_temp_files to pg_tablespace.spcoptions; - This parameter

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Ashutosh Bapat
I checked that it's reporting the right tableoid now. BTW, why aren't you using the tlist passed to this function? I guess create_scan_plan() passes tlist after processing it, so that should be used rather than rel-reltargetlist. On Mon, Jun 30, 2014 at 12:22 PM, Etsuro Fujita

Re: [HACKERS] replicating DROP commands across servers

2014-06-30 Thread Abhijit Menon-Sen
Hi. I thought I'd review this patch, since pgaudit uses the pg_event_trigger_dropped_objects function. I went through the patch line by line, and I don't really have anything to say about it. I notice that there are some XXX/FIXME comments in the code, but it's not clear if those need to (or can

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-06-30 Thread Ronan Dunklau
Le lundi 30 juin 2014 16:43:38 Michael Paquier a écrit : On Thu, Jun 19, 2014 at 11:00 PM, Michael Paquier michael.paqu...@gmail.com wrote: This seems to be related to re-using the table-name between invocations. The attached patch should fix point 2. As for point 1, I don't know

Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Rajeev rastogi
On 30 June 2014 12:24, Pavel Stehule Wrote: I have reviewed this patch. Please find my review comments below: 1. Command start-up option (e.g. -a/--echo-all for --ECHO=all), for new functionality is not provided. all not options entered via psql variables has psql option and psql comment.

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 11:04:53 +0530, Amit Kapila wrote: On Sun, Jun 29, 2014 at 2:54 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-29 11:53:28 +0530, Amit Kapila wrote: On Sat, Jun 28, 2014 at 1:48 PM, Andres Freund and...@2ndquadrant.com I think it is better to have some discussion

[HACKERS] uninitialized values in revised prepared xact code

2014-06-30 Thread Andres Freund
Hi, I've just rerun valgrind for the first time in a while and saw the following splat. My guess is it exists since bb38fb0d43c, but that's blindly guessing: ==2049== Use of uninitialised value of size 8 ==2049==at 0x4FE66D: EndPrepare (twophase.c:1063) ==2049==by 0x4F231B:

Re: [HACKERS] Extending MSVC scripts to support --with-extra-version

2014-06-30 Thread Asif Naeem
Thank you for sharing updated patch. I have compared it with MSVC and configure generated build i.e. *MacOSX (*--with-extra-version -30JUN*)* pc1dotnetpk:inst asif$ ./bin/psql -d postgres psql (9.5devel-30JUN) Type help for help. postgres=# select version();

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-06-30 Thread furuyao
Thanks for the review! +if (secs = 0) +secs = 1;/* Always sleep at least 1 sec */ + +sleeptime = secs * 1000 + usecs / 1000; The above is the code which caused that problem. 'usecs' should have been reset to zero when 'secs' are rounded up to

Re: [HACKERS] Autonomous Transaction (WIP)

2014-06-30 Thread Abhijit Menon-Sen
If I understand correctly, the design of this patch has already been considered earlier and rejected. So I guess the patch should also be marked rejected? -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Etsuro Fujita
(2014/06/30 17:47), Ashutosh Bapat wrote: I checked that it's reporting the right tableoid now. Thank you for the check. BTW, why aren't you using the tlist passed to this function? I guess create_scan_plan() passes tlist after processing it, so that should be used rather than

Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Pavel Stehule
2014-06-30 11:20 GMT+02:00 Rajeev rastogi rajeev.rast...@huawei.com: On 30 June 2014 12:24, Pavel Stehule Wrote: I have reviewed this patch. Please find my review comments below: 1. Command start-up option (e.g. -a/--echo-all for --ECHO=all), for new functionality is not provided.

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-30 Thread Fujii Masao
On Sun, Jun 29, 2014 at 11:18 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-29 19:44:21 +0530, Abhijit Menon-Sen wrote: At 2014-06-27 00:51:02 +0200, p...@2ndquadrant.com wrote: Also based on Alvaro's comment, I replaced the scanf parsing code with strtoul(l) function. As

Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 12:48:30 +0200, pavel.steh...@gmail.com wrote: + para + Print a failed SQL commands to standard error output. This is + equivalent to setting the variable varnameECHO/varname to + literalerrors/literal. No a, just Print failed SQL commands …. -

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-30 Thread Matheus de Oliveira
On Mon, Jun 30, 2014 at 5:14 AM, Craig Ringer cr...@2ndquadrant.com wrote: Right now PostgreSQL appears to rely on the absence of the tablespace directory as a flag to tell it don't start up, something's badly wrong here. Well, in fact the behavior is just to give a LOG message: LOG:

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-30 Thread Andres Freund
On 2014-06-30 19:57:58 +0900, Fujii Masao wrote: On Sun, Jun 29, 2014 at 11:18 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-29 19:44:21 +0530, Abhijit Menon-Sen wrote: At 2014-06-27 00:51:02 +0200, p...@2ndquadrant.com wrote: Also based on Alvaro's comment, I replaced

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Ashutosh Bapat
On Mon, Jun 30, 2014 at 4:17 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: (2014/06/30 17:47), Ashutosh Bapat wrote: I checked that it's reporting the right tableoid now. Thank you for the check. BTW, why aren't you using the tlist passed to this function? I guess

Re: [HACKERS] psql: show only failed queries

2014-06-30 Thread Pavel Stehule
2014-06-30 13:01 GMT+02:00 Abhijit Menon-Sen a...@2ndquadrant.com: At 2014-06-30 12:48:30 +0200, pavel.steh...@gmail.com wrote: + para + Print a failed SQL commands to standard error output. This is + equivalent to setting the variable varnameECHO/varname to +

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-30 Thread Asif Naeem
Hi Haribabu, I am not able to apply latest patch on REL9_4_STABLE or master branch i.e. pc1dotnetpk:postgresql asif$ git apply ~/core/min_max_support_for_inet_datatypes/inet_agg_v4.patch fatal: unrecognized input pc1dotnetpk:postgresql asif$ patch -p0

Re: [HACKERS] Extending MSVC scripts to support --with-extra-version

2014-06-30 Thread Michael Paquier
On Mon, Jun 30, 2014 at 7:05 PM, Asif Naeem anaeem...@gmail.com wrote: Patch looks good to me. I think it is ready for committer. Thanks. Thanks for the extra checks and for taking the time to review it. -- Michael On Mon, Jun 30, 2014 at 7:05 PM, Asif Naeem anaeem...@gmail.com wrote: Thank

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 16:35:45 +0500, anaeem...@gmail.com wrote: pc1dotnetpk:postgresql asif$ patch -p0 ~/core/min_max_support_for_inet_datatypes/inet_agg_v4.patch can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was:

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Robert Haas
On Sat, Jun 28, 2014 at 9:41 AM, Andres Freund and...@2ndquadrant.com wrote: No, I think it's going to be *much* simpler than that. How about I take a crack at this next week and then either (a) I'll see why it's a bad idea and we can go from there or (b) you can review what I come up with

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-06-30 Thread Michael Paquier
On Mon, Jun 30, 2014 at 6:01 PM, Ronan Dunklau ronan.dunk...@dalibo.com wrote: BOOLARRAYOID should be defined to 1000, not 1003 (which clashes against NAMEARRAYOID). Oops, a bad copy-paste. Thanks for catching that. I had a more detailed look at the postgres_fdw patch: 1) Having an example of

Re: [HACKERS] Priority table or Cache table

2014-06-30 Thread Beena Emerson
On Tue, Jun 3, 2014 at 9:50 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: Sorry for the late reply. Thanks for the test. Please find the re-based patch with a temp fix for correcting the problem. I will a submit a proper patch fix later. Please note that the new patch still gives

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Robert Haas
On Fri, Jun 27, 2014 at 2:23 PM, Stephen Frost sfr...@snowman.net wrote: I disagree with Stephen's proposal that this should be in core, or that it needs its own dedicated syntax. I think contrib is a great place for extensions like this. That makes it a whole lot easier for people to

Re: [HACKERS] RLS Design

2014-06-30 Thread Robert Haas
On Sun, Jun 29, 2014 at 3:42 PM, Stephen Frost sfr...@snowman.net wrote: An interesting question we haven't much considered is: who can set up policies and add then to users? Maybe we should flip this around, and instead of adding users to policies, we should exempt users from policies.

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Andres Freund
Hi, On 2014-06-30 08:03:40 -0400, Robert Haas wrote: On Sat, Jun 28, 2014 at 9:41 AM, Andres Freund and...@2ndquadrant.com wrote: No, I think it's going to be *much* simpler than that. How about I take a crack at this next week and then either (a) I'll see why it's a bad idea and we can

Re: [HACKERS] RLS Design

2014-06-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Sun, Jun 29, 2014 at 3:42 PM, Stephen Frost sfr...@snowman.net wrote: An interesting question we haven't much considered is: who can set up policies and add then to users? Maybe we should flip this around, and instead of adding users to

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Done. I think this is because create_foreignscan_plan() makes reference to attr_needed, which isn't computed for inheritance children. I wonder whether it isn't time to change that. It was coded like that originally only because calculating

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: On Fri, Jun 27, 2014 at 2:23 PM, Stephen Frost sfr...@snowman.net wrote: I don't exactly see how an extension or contrib module is going to be able to have a reasonable catalog structure which avoids the risk that renaming an object

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 9:26 AM, Andres Freund and...@2ndquadrant.com wrote: I think it continues in the tradition of making s_lock.h ever harder to follow. But it's still better than what we have now from a correctness perspective. Well, as you and I have discussed before, someday we probably

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 09:39:29 -0400, sfr...@snowman.net wrote: I certainly don't feel like it's the solution which extension authors are looking for and will be happy with I don't know if there are any other extension authors involved in this discussion, but I'm not shedding any tears over the idea.

Re: [HACKERS] RLS Design

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I'm not a fan of the EXEMPT approach.. Just out of curiosity, why not? I don't see it as really solving the flexibility need and it feels quite a bit more complicated to reason about. Would someone who is EXEMPT from

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Stephen Frost
Abhijit, * Abhijit Menon-Sen (a...@2ndquadrant.com) wrote: At 2014-06-30 09:39:29 -0400, sfr...@snowman.net wrote: I certainly don't feel like it's the solution which extension authors are looking for and will be happy with I don't know if there are any other extension authors involved in

Re: [HACKERS] RLS Design

2014-06-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jun 30, 2014 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I don't see it as really solving the flexibility need and it feels quite a bit more complicated to reason about. Would someone who is EXEMPT from one policy on a given

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 9:39 AM, Stephen Frost sfr...@snowman.net wrote: I think the fact that pgaudit does X and you think it should do Y is a perfect example of why we're nowhere close to being ready to push anything into core. We may very well want to do that someday, but not yet. That's

Re: [HACKERS] Proposal for CSN based snapshots

2014-06-30 Thread Simon Riggs
On 12 May 2014 17:14, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 05/12/2014 06:26 PM, Andres Freund wrote: With the new commit-in-progress status in clog, we won't need the sub-committed clog status anymore. The commit-in-progress status will achieve the same thing. Wouldn't that

Re: [HACKERS] delta relations in AFTER triggers

2014-06-30 Thread Robert Haas
On Sat, Jun 28, 2014 at 10:35 AM, Kevin Grittner kgri...@ymail.com wrote: David Fetter da...@fetter.org wrote: On Sat, Jun 21, 2014 at 11:06:26AM -0700, Kevin Grittner wrote: Here is v2. I've taken the liberty of making an extension that uses this. Preliminary tests indicate a 10x

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Andres Freund
On 2014-06-30 10:05:44 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 9:26 AM, Andres Freund and...@2ndquadrant.com wrote: I think it continues in the tradition of making s_lock.h ever harder to follow. But it's still better than what we have now from a correctness perspective. Well,

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jun 30, 2014 at 9:39 AM, Stephen Frost sfr...@snowman.net wrote: I think the fact that pgaudit does X and you think it should do Y is a perfect example of why we're nowhere close to being ready to push anything into core. We may very

Re: [HACKERS] delta relations in AFTER triggers

2014-06-30 Thread David Fetter
On Mon, Jun 30, 2014 at 11:03:06AM -0400, Robert Haas wrote: On Sat, Jun 28, 2014 at 10:35 AM, Kevin Grittner kgri...@ymail.com wrote: David Fetter da...@fetter.org wrote: On Sat, Jun 21, 2014 at 11:06:26AM -0700, Kevin Grittner wrote: Here is v2. I've taken the liberty of making an

Re: [HACKERS] Escaping from blocked send() reprised.

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 4:13 AM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello, I have received inquiries related to blocked communication several times for these weeks with different symptoms. Then I found this message from archive,

Re: [HACKERS] Array of composite types returned from python

2014-06-30 Thread Behn, Edward (EBEHN)
Just writing to check in. I haven't done anything to look into allowing arrays of composites for input to PL/Python function. I made the submitted modification for a specific project that I'm working on that involves python code that returns data structures. I also have no idea about a more

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 11:17 AM, Andres Freund and...@2ndquadrant.com wrote: Solaris seems to run with TSO enabled for SPARC (whereas linux uses RMO, relaxed memory ordering), so it's probably fine to just use the compiler barrier. If it isn't, that's a change that has nothing to do with

[HACKERS] 9.4 logical replication - walsender keepalive replies

2014-06-30 Thread Steve Singer
In 9.4 we've the below block of code to walsender.c as /* * We only send regular messages to the client for full decoded * transactions, but a synchronous replication and walsender shutdown * possibly are waiting for a later location. So we send pings * containing the flush location every

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Robert Haas
On Sat, Jun 28, 2014 at 4:25 AM, Andres Freund and...@2ndquadrant.com wrote: To make pin/unpin et al safe without acquiring the spinlock the pincount and the flags had to be moved into one variable so that when incrementing the pincount you automatically get the flagbits back. If it's

Re: [HACKERS] [WIP] Better partial index-only scans

2014-06-30 Thread Tom Lane
Joshua Yanovski pythones...@gmail.com writes: Proof of concept initial patch for enabling index only scans for partial indices even when an attribute is not in the target list, as long as it is only used in restriction clauses that can be proved by the index predicate. This also works for

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Andres Freund
On 2014-06-30 11:38:31 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 11:17 AM, Andres Freund and...@2ndquadrant.com wrote: Now, we want to make these operations compiler fences as well, and AIUI your proposal for that is to make NEW_S_UNLOCK(lock) = out of line function call +

Re: [HACKERS] delta relations in AFTER triggers

2014-06-30 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: It's missing a few pieces like surfacing transition table names. I'll work on those.  Also, it's not clear to me how to access the pre- and post- relations at the same time, this being necessary for many use cases.  I guess I need to think more about how

[HACKERS] Does changing attribute order breaks something?

2014-06-30 Thread geohas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Are there any known issues when changing the attnums? like : airport=# update pg_attribute set attnum = 3 where attname = 'abc' and attrelid = 18328; UPDATE 1 airport=# update pg_attribute set attnum = 2 where attname = 'foo' and attrelid =

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 12:20 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-30 11:38:31 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 11:17 AM, Andres Freund and...@2ndquadrant.com wrote: Now, we want to make these operations compiler fences as well, and AIUI your proposal

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 12:15:06 -0400, Robert Haas wrote: More broadly, it doesn't seem consistent. I think that other projects also sometimes write code that acquires a spinlock while holding another spinlock, and we don't do that; in fact, we've elevated that to a principle, regardless of whether it

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ... this again is my point: why can't we make the same argument about two spinlocks situated on the same cache line? I don't have a bit of trouble believing that doing the same thing with a couple of spinlocks could sometimes work out well, too, but

Re: [HACKERS] [WIP] Better partial index-only scans

2014-06-30 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: I don't think it's fair to mark this as returned with feedback without a more detailed review (I think of returned with feedback as providing a concrete direction to follow). I've set it back to needs review. Does anyone else want to look at this

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Robert Haas
On Mon, Jun 30, 2014 at 12:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: The existing coding rules also discourage spinlocking within a spinlock, and the reason for that is that there's no very clear upper bound to the time required to obtain a spinlock, so that there would also be no clear upper

Re: [HACKERS] Autonomous Transaction (WIP)

2014-06-30 Thread Pavel Stehule
2014-06-30 12:38 GMT+02:00 Abhijit Menon-Sen a...@2ndquadrant.com: If I understand correctly, the design of this patch has already been considered earlier and rejected. So I guess the patch should also be marked rejected? I didn't find a related message. ? Regards Pavel -- Abhijit

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Andres Freund
On 2014-06-30 12:46:29 -0400, Robert Haas wrote: But trying to use a spinlock acquire-release to shore up problems with the spinlock release implementation makes my head explode. Well, it actually makes some sense. Nearly any TAS() implementation is going to have some memory barrier

Re: [HACKERS] Does changing attribute order breaks something?

2014-06-30 Thread Tom Lane
geohas li...@hasibether.at writes: Are there any known issues when changing the attnums? airport=# update pg_attribute set attnum = 3 where attname = 'abc' and attrelid = 18328; UPDATE 1 airport=# update pg_attribute set attnum = 2 where attname = 'foo' and attrelid = 18328; UPDATE 1 I

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 13:15:23 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 12:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: The existing coding rules also discourage spinlocking within a spinlock, and the reason for that is that there's no very clear upper bound to the time required to obtain a

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-30 Thread Alvaro Herrera
Andres Freund wrote: c) We already allow to set pretty much all aspects of the control file via resetxlog - there seems little point of not having the ability to change the system identifier. I think it's pretty much a given that pg_resetxlog is a tool that can have disastrous effects

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'm personally not convinced that we're approaching this topic in the right way. I'm not convinced that it's at all reasonable to try to emulate atomics on platforms that don't have them. I would punt the problem into the next layer and force things

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 12:54:10 -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: ... this again is my point: why can't we make the same argument about two spinlocks situated on the same cache line? I don't have a bit of trouble believing that doing the same thing with a couple of

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 19:44:47 +0200, Andres Freund wrote: On 2014-06-30 13:15:23 -0400, Robert Haas wrote: People who write code that uses atomics are not likely to think about how those algorithms will actually perform when those atomics are merely emulated, and I suspect that means that in

Re: [HACKERS] Cluster name in ps output

2014-06-30 Thread Josh Berkus
Abjit, all: If we're adding log_line_prefix support for cluster_name (something I think is a good idea), we need to also add it to CSVLOG. So, where do we put it in CSVLog? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Cluster name in ps output

2014-06-30 Thread Andres Freund
On 2014-06-30 12:10:53 -0700, Josh Berkus wrote: Abjit, all: If we're adding log_line_prefix support for cluster_name (something I think is a good idea), we need to also add it to CSVLOG. So, where do we put it in CSVLog? That was shot down (unfortunately imo), and I don't think anybody

Re: [HACKERS] PATCH: Allow empty targets in unaccent dictionary

2014-06-30 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: I've attached a patch to contrib/unaccent as outlined in my review the other day. I went to commit this, and while testing I realized that the current implementation of unaccent_lexize is only capable of coping with src strings that are single

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-30 Thread Christian Ullrich
* From: Noah Misch [mailto:n...@leadboat.com] I liked the proposal here; was there a problem with it? http://www.postgresql.org/message- id/ca+tgmoz3ake4enctmqmzsykc_0pjl_u4c_x47ge48uy1upb...@mail.gmail.com You're referring to the suggestion of accepting and ignoring the option on

Re: [HACKERS] PATCH: Allow empty targets in unaccent dictionary

2014-06-30 Thread Abhijit Menon-Sen
At 2014-06-30 15:19:17 -0400, t...@sss.pgh.pa.us wrote: Anyway, this raises the question of whether the current patch is actually a desirable way to do things, or whether it would be better if the unaccenting rules were like base-char accent-char - base-char. It might be useful to be able to

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Andres Freund
On 2014-06-30 13:45:52 -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: I'm personally not convinced that we're approaching this topic in the right way. I'm not convinced that it's at all reasonable to try to emulate atomics on platforms that don't have them. I would punt

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-30 Thread Noah Misch
On Mon, Jun 30, 2014 at 07:28:03PM +, Christian Ullrich wrote: * From: Noah Misch [mailto:n...@leadboat.com] I liked the proposal here; was there a problem with it? http://www.postgresql.org/message- id/ca+tgmoz3ake4enctmqmzsykc_0pjl_u4c_x47ge48uy1upb...@mail.gmail.com You're

Re: [HACKERS] bad estimation together with large work_mem generates terrible slow hash joins

2014-06-30 Thread Tomas Vondra
Hi, attached is v5 of the patch. The main change is that scaling the number of buckets is done only once, after the initial hash table is build. The main advantage of this is lower price. This also allowed some cleanup of unecessary code. However, this new patch causes warning like this:

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-30 Thread Christian Ullrich
* From: Noah Misch [mailto:n...@leadboat.com] On Mon, Jun 30, 2014 at 07:28:03PM +, Christian Ullrich wrote: * From: Noah Misch [mailto:n...@leadboat.com] I liked the proposal here; was there a problem with it? http://www.postgresql.org/message-

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2014-06-30 Thread Jeff Janes
On Fri, Jun 27, 2014 at 4:10 AM, Dilip kumar dilip.ku...@huawei.com wrote: ... Updated patch is attached in the mail.. Thanks Dilip. I get a compiler warning when building on Windows. When I started looking into that, I see that two files have too much code duplication between them:

[HACKERS] Fresh initdb contains a few deleted B-Tree pages

2014-06-30 Thread Peter Geoghegan
I would like to put on the record that there are a few deleted B-Tree pages in a freshly initdb'd database. As my btreecheck tools shows: mgd=# select bt_index_verify(indexrelid::regclass::text) from pg_index; NOTICE: 0: page 12 of index pg_attribute_relid_attnam_index is deleted LOCATION:

Re: [HACKERS] WAL format and API changes (9.5)

2014-06-30 Thread Fujii Masao
On Tue, Jul 1, 2014 at 5:51 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Thanks for the review! On 06/27/2014 09:12 AM, Michael Paquier wrote: Looking at this patch, it does not compile when assertions are enabled because of this assertion in heapam.c: Assert(recdata == data +

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-30 Thread Andres Freund
On 2014-06-30 19:22:59 +0200, Andres Freund wrote: On 2014-06-30 12:46:29 -0400, Robert Haas wrote: , which if I understand you correctly are ARM without GCC atomics, Sparc, and MIPS. I've to revise my statement on MIPS, it actually looks safe. I seem to have missed that it has its own

Re: [HACKERS] bad estimation together with large work_mem generates terrible slow hash joins

2014-06-30 Thread Tomas Vondra
On 30.6.2014 23:12, Tomas Vondra wrote: Hi, attached is v5 of the patch. The main change is that scaling the number of buckets is done only once, after the initial hash table is build. The main advantage of this is lower price. This also allowed some cleanup of unecessary code. However,

Re: [HACKERS] PATCH: Allow empty targets in unaccent dictionary

2014-06-30 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: At 2014-06-30 15:19:17 -0400, t...@sss.pgh.pa.us wrote: Anyway, this raises the question of whether the current patch is actually a desirable way to do things, or whether it would be better if the unaccenting rules were like base-char accent-char

Re: [HACKERS] heap vacuum cleanup locks

2014-06-30 Thread Greg Stark
Zombie thread arise! I was searching for old threads on a specific problem and came across this patch that was dropped due to concerns about SnapshotNow: On Wed, Nov 2, 2011 at 3:19 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jun 7, 2011 at 3:24 PM, Greg Stark gsst...@mit.edu wrote:

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2014-06-30 Thread Alvaro Herrera
Jeff Janes wrote: In particular, pgpipe is almost an exact duplicate between them, except the copy in vac_parallel.c has fallen behind changes made to parallel.c. (Those changes would have fixed the Windows warnings). I think that this function (and perhaps other parts as

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Dave McGuire
On 06/29/2014 03:10 PM, Patrick Finnegan wrote: And it also runs on the 11/780 which can have multiple CPUs... but I've never seen support for using more than one CPU (and the NetBSD page still says NetBSD/vax can only make use of one CPU on multi-CPU machines). If that has changed, I'd love

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Dave McGuire
On 06/29/2014 10:24 AM, Tom Lane wrote: Is there anyone in the NetBSD/VAX community who would be willing to host a PG buildfarm member? I could put together a simh-based machine (i.e., fast) on a vm, if nobody else has stepped up for this. No other volunteers have emerged, so if you'd

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Patrick Finnegan
On Sun, Jun 29, 2014 at 3:12 PM, Dave McGuire mcgu...@neurotica.com wrote: On 06/29/2014 03:10 PM, Patrick Finnegan wrote: And it also runs on the 11/780 which can have multiple CPUs... but I've never seen support for using more than one CPU (and the NetBSD page still says NetBSD/vax can

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Anders Magnusson
Dave McGuire skrev 2014-06-29 21:01: On 06/29/2014 02:58 PM, Patrick Finnegan wrote: Last I checked, NetBSD doesn't support any sort of multiprocessor VAX. Multiprocessor VAXes exist, but you're stuck with either Ultrix or VMS on them. Hi Pat, it's good to see your name in my inbox.

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Patrick Finnegan
On Sun, Jun 29, 2014 at 3:01 PM, Dave McGuire mcgu...@neurotica.com wrote: On 06/29/2014 02:58 PM, Patrick Finnegan wrote: Last I checked, NetBSD doesn't support any sort of multiprocessor VAX. Multiprocessor VAXes exist, but you're stuck with either Ultrix or VMS on them. Hi Pat,

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread Patrick Finnegan
Last I checked, NetBSD doesn't support any sort of multiprocessor VAX. Multiprocessor VAXes exist, but you're stuck with either Ultrix or VMS on them. Pat On Sun, Jun 29, 2014 at 2:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave McGuire mcgu...@neurotica.com writes: On 06/29/2014 10:54 AM,

Re: [HACKERS] Cluster name in ps output

2014-06-30 Thread Andres Freund
Hi, On 2014-06-28 15:08:45 +0200, Andres Freund wrote: Otherwise it looks good to me. So, I'd looked at it with an eye towards committing it and found some more things. I've now * added the restriction that the cluster name can only be ASCII. It's shown from several clusters with differing

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-30 Thread John Klos
Well, the issue from our point of view is that a lot of what we care about testing is extremely low-level hardware behavior, like whether spinlocks work as expected across processors. It's not clear that a simulator would provide a sufficiently accurate emulation. OTOH, the really nasty issues

Re: [HACKERS] better atomics - v0.5

2014-06-30 Thread Noah Misch
On Mon, Jun 30, 2014 at 07:44:47PM +0200, Andres Freund wrote: On 2014-06-30 13:15:23 -0400, Robert Haas wrote: I'm personally not convinced that we're approaching this topic in the right way. I'm not convinced that it's at all reasonable to try to emulate atomics on platforms that don't

Re: [HACKERS] PATCH: Allow empty targets in unaccent dictionary

2014-06-30 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: At 2014-06-30 15:19:17 -0400, t...@sss.pgh.pa.us wrote: It's not unlikely that we want this patch *and* an improvement that allows multi-character src strings I think it's enough to apply just this patch, but I wouldn't object to doing both if

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-30 Thread Noah Misch
On Mon, Jun 30, 2014 at 09:16:45PM +, Christian Ullrich wrote: * From: Noah Misch [mailto:n...@leadboat.com] Yes; the consequence of ignoring ^C is that the test postmaster would persist indefinitely after the ^C. The system under test doesn't care per No it won't, please see below.

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Etsuro Fujita
(2014/06/30 20:17), Ashutosh Bapat wrote: On Mon, Jun 30, 2014 at 4:17 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: (2014/06/30 17:47), Ashutosh Bapat wrote: BTW, why aren't you using the tlist passed to this function? I guess

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Etsuro Fujita
(2014/06/30 22:48), Tom Lane wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Done. I think this is because create_foreignscan_plan() makes reference to attr_needed, which isn't computed for inheritance children. I wonder whether it isn't time to change that. It was coded like that

  1   2   >