Re: [HACKERS] ATT_FOREIGN_TABLE and ATWrongRelkindError()

2015-11-03 Thread Etsuro Fujita
On 2015/10/28 20:10, Robert Haas wrote: On Fri, Oct 23, 2015 at 11:51 AM, Etsuro Fujita wrote: BTW, I found an incorrect error message in ATWrongRelkindError. Attached is a patch for fixing the message. Committed and back-patched to 9.3. Thanks! Best regards, Etsuro Fujita -- Sent via

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-11-03 Thread Etsuro Fujita
On 2015/10/28 6:04, Robert Haas wrote: On Tue, Oct 20, 2015 at 12:39 PM, Etsuro Fujita wrote: Sorry, my explanation was not correct. (Needed to take in caffeine.) What I'm concerned about is the following: SELECT * FROM localtab JOIN (ft1 LEFT JOIN ft2 ON ft1.x = ft2.x) ON localtab.id = ft1.i

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 12:43 AM, Andres Freund wrote: > On 2015-11-03 10:23:35 -0500, Robert Haas wrote: >> On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes wrote: >> > If a transaction holding locks aborts on an otherwise idle server, perhaps >> > it will take a very long time for a log-shipping sta

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 8:39 AM, Andres Freund wrote: > On November 4, 2015 12:37:02 AM GMT+01:00, Michael Paquier wrote: >>On a completely idle system, I don't think we should log any standby >>records. This is what ~9.3 does. > > Are you sure? I think it'll around checkpoints, no? I thought Heikk

Re: [HACKERS] September 2015 Commitfest

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 2:38 AM, Robert Haas wrote: > On Tue, Nov 3, 2015 at 8:12 AM, Michael Paquier > wrote: >> On Mon, Nov 2, 2015 at 9:35 PM, Michael Paquier wrote: >>> And now CF begins officially. The axe has fallen as promised 26 hours after. >> >> Seeing no volunteers around, I can take th

Re: [HACKERS] extend pgbench expressions with functions

2015-11-03 Thread Kyotaro HORIGUCHI
Hello, sorry for the silence. At Fri, 18 Sep 2015 20:35:48 +0200 (CEST), Fabien COELHO wrote in > > -1. double is an inexact type, whereas integer is an exact type. > > Sure. I already argue on that very line. Agreed. > > The typical way to handle this sort of thing is to define a struct >

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 2:23 PM, Tom Lane wrote: > Michael Paquier writes: >> That's still strange to have a dummy object in >> postgres_fdw.so just for testing purposes. > > We could drop the extra functions at the end of the test, but I don't > see the point exactly. We'd just be leaving the re

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-11-03 Thread Catalin Iacob
Sorry, you're right, I didn't notice the x = plpy.SPIError() test. I did notice that you included the kw != NULL, I was explaining why it really is needed even though it *seems* the code also works without it. There's just the doc part left then. -- Sent via pgsql-hackers mailing list (pgsql-h

[HACKERS] Re: Why not to use 'pg_ctl start -D ../data' to register posgtresql windows service

2015-11-03 Thread YuanyuanLiu
Ok, Michael! Thanks for your kindly remind! Regards! Liu Yuanyuan -- View this message in context: http://postgresql.nabble.com/Why-not-to-use-pg-ctl-start-D-data-to-register-posgtresql-windows-service-tp5872282p5872631.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Tom Lane
Michael Paquier writes: > On Wed, Nov 4, 2015 at 12:38 PM, Tom Lane wrote: >> I had a possibly better idea: instead of manufacturing an empty extension >> with a direct INSERT, hack on the one extension that we know for sure >> will be installed, namely postgres_fdw itself. So we could do, eg, >>

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 12:38 PM, Tom Lane wrote: > I wrote: >> I left out the proposed regression tests because they fail in "make >> installcheck" mode, unless you've previously built and installed cube >> and seg, which seems like an unacceptable requirement to me. I don't >> think that leaving

Re: [HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Craig Ringer
On 4 November 2015 at 10:58, Bill Moran wrote: > On Tue, 3 Nov 2015 18:34:39 -0800 > Jeff Janes wrote: > >> On Tue, Nov 3, 2015 at 5:21 PM, Craig Ringer wrote: >> > On 3 November 2015 at 23:04, Bill Moran wrote: >> >> >> >> Looking for feedback to see if anyone sees any issues or has any >> >>

Re: [HACKERS] Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

2015-11-03 Thread Amit Kapila
On Tue, Nov 3, 2015 at 7:56 PM, Pavel Stehule wrote: > > > 2015-11-03 3:42 GMT+01:00 Amit Kapila : > >> On Mon, Nov 2, 2015 at 10:45 PM, Pavel Stehule >> wrote: >>> >>> >>> It is 100% true. But the users can do strange things. If we solve idle >>> transactions and not idle session, then they are

Re: [HACKERS] Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

2015-11-03 Thread Amit Kapila
On Tue, Nov 3, 2015 at 7:53 PM, Merlin Moncure wrote: > > On Mon, Nov 2, 2015 at 8:42 PM, Amit Kapila wrote: > > > > What exactly do we want to define session_idle_timeout? Some > > possibilities: > > a. Reset the session related variables like transaction, prepared > > statements, etc. and reta

Re: [HACKERS] ParallelContexts can get confused about which worker is which

2015-11-03 Thread Amit Kapila
On Tue, Nov 3, 2015 at 8:25 PM, Robert Haas wrote: > > On Mon, Nov 2, 2015 at 4:13 PM, Robert Haas wrote: > > On Sun, Nov 1, 2015 at 1:11 AM, Amit Kapila wrote: > >> If we are going to add a new parameter to BackgroundWorker structure, > >> then the same needs to be updated in docs [1] as well.

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Tom Lane
I wrote: > I left out the proposed regression tests because they fail in "make > installcheck" mode, unless you've previously built and installed cube > and seg, which seems like an unacceptable requirement to me. I don't > think that leaving the code untested is a good final answer, of course. >

Re: [HACKERS] Freeze avoidance of very large table.

2015-11-03 Thread Amit Kapila
On Wed, Nov 4, 2015 at 4:45 AM, Masahiko Sawada wrote: > > On Tue, Nov 3, 2015 at 12:33 PM, Amit Kapila wrote: > > On Tue, Nov 3, 2015 at 5:04 AM, Robert Haas wrote: > >> > >> On Sat, Oct 31, 2015 at 1:32 AM, Amit Kapila > >> wrote: > >> > > >> > What is your main worry about changing the name

Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy

2015-11-03 Thread Peter Geoghegan
On Tue, Nov 3, 2015 at 7:10 PM, Tom Lane wrote: > This seems like a fine teaching moment in which to point out our > longstanding error message style guideline that says not to put > names of C functions into error messages in the first place. I don't ordinarily do that, of course, but I thought

Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy

2015-11-03 Thread Tom Lane
Peter Geoghegan writes: > While auditing the access method code associated with ON CONFLICT DO > UPDATE's speculative insertion infrastructure, I noticed an > inaccuracy. > Attached patch fixes the trivial inaccuracy in a defensive elog() > call. Quite simply, this call site didn't get the memo w

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-11-03 Thread Amit Kapila
On Tue, Nov 3, 2015 at 8:07 PM, Simon Riggs wrote: > > On 3 November 2015 at 15:23, Amit Kapila wrote: >> >> On Fri, Oct 23, 2015 at 6:29 AM, Simon Riggs wrote: >>> >>> Easy enough to do it at the end of the COPY FREEZE in one step. >> >> >> Here, we might want to consider that setting bit in vi

Re: [HACKERS] Getting sorted data from foreign server

2015-11-03 Thread Ashutosh Bapat
On Tue, Nov 3, 2015 at 11:35 PM, Robert Haas wrote: > On Fri, Oct 30, 2015 at 6:19 AM, Ashutosh Bapat > wrote: > > If there is a collate clause in the ORDER BY, the server crashes with > > assertion > > +Assert(loc_cxt.state == FDW_COLLATE_NONE || > > +loc_cxt.state == FDW_COLLAT

[HACKERS] Valgrind and shared_buffers (Was: Restore-reliability mode)

2015-11-03 Thread Peter Geoghegan
On Mon, Jul 27, 2015 at 7:12 AM, Alvaro Herrera wrote: > I only tried a few tests, for lack of time, and it didn't produce any. > (To verify that the whole thing was working properly, I reduced the > range of memory made available during PinBuffer and that resulted in a > crash immediately). I am

Re: [HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Bill Moran
On Tue, 3 Nov 2015 18:34:39 -0800 Jeff Janes wrote: > On Tue, Nov 3, 2015 at 5:21 PM, Craig Ringer wrote: > > On 3 November 2015 at 23:04, Bill Moran wrote: > >> > >> Looking for feedback to see if anyone sees any issues or has any > >> suggestions on what I'm doing. The attached patch alters 3

Re: [HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Jim Nasby
On 11/3/15 8:34 PM, Jeff Janes wrote: I currently have a table with one column which has a median width of 500 bytes, a 90th percentile of 650 bytes, and makes up 75% of the table's size, and the column is rarely used, while the table itself is frequently seq scanned. I'd very much like to drive

[HACKERS] Trivial heap_finish_speculative() error message inaccuracy

2015-11-03 Thread Peter Geoghegan
While auditing the access method code associated with ON CONFLICT DO UPDATE's speculative insertion infrastructure, I noticed an inaccuracy. Attached patch fixes the trivial inaccuracy in a defensive elog() call. Quite simply, this call site didn't get the memo when we renamed that function during

Re: [HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Jeff Janes
On Tue, Nov 3, 2015 at 5:21 PM, Craig Ringer wrote: > On 3 November 2015 at 23:04, Bill Moran wrote: >> >> Looking for feedback to see if anyone sees any issues or has any >> suggestions on what I'm doing. The attached patch alters 3 things >> with regard to TOAST behavior: > > COMPRESSION_TEST_S

Re: [HACKERS] pg_stat_statements query jumbling question

2015-11-03 Thread Peter Geoghegan
On Sat, Oct 31, 2015 at 10:03 AM, Julien Rouhaud wrote: >> At least, I would like to give some options to be chosen by the >> user. Is it possible and/or reasonable? >> > > I'm also rather sceptical about this change. Is anyone willing to argue for it, apart from Satoshi? -- Peter Geoghegan

Re: [HACKERS] PoC: Partial sort

2015-11-03 Thread Peter Geoghegan
On Tue, Oct 20, 2015 at 4:17 AM, Alexander Korotkov wrote: > Planner regression is fixed in the attached version of patch. It appears > that get_cheapest_fractional_path_for_pathkeys() behaved wrong when no > ordering is required. I took a look at this. My remarks are not comprehensive, but are j

Re: [HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Craig Ringer
On 3 November 2015 at 23:04, Bill Moran wrote: > > Looking for feedback to see if anyone sees any issues or has any > suggestions on what I'm doing. The attached patch alters 3 things > with regard to TOAST behavior: COMPRESSION_TEST_SIZE (2) seems useful. The other two mostly seem like options

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Paul Ramsey
Thanks everyone for the held and feedback on this patch! --  Paul Ramsey http://cleverelephant.ca http://postgis.net On November 3, 2015 at 3:47:37 PM, Tom Lane (t...@sss.pgh.pa.us) wrote: Robert Haas writes: > On Tue, Nov 3, 2015 at 2:57 PM, Tom Lane wrote: >> Paul Ramsey writes: >>> [

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Tom Lane
Robert Haas writes: > On Tue, Nov 3, 2015 at 2:57 PM, Tom Lane wrote: >> Paul Ramsey writes: >>> [ 20151006b_postgres_fdw_extensions.patch ] >> There might be a case for raising a WARNING during >> postgres_fdw_validator(), but no more than that, IMO. Certainly ERROR >> during regular use of t

Re: [HACKERS] fortnight interval support

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 2:31 AM, Robert Haas wrote: > On Tue, Nov 3, 2015 at 8:31 AM, Alvaro Herrera > wrote: >> (WRT the reference to Jane Austen and "Se'ennight" for "week", it occurs >> to me that fortnight is a similar contraction for "forteen night".) > > Well, clearly we also need enquië fo

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Andres Freund
On November 4, 2015 12:37:02 AM GMT+01:00, Michael Paquier wrote: >On Wed, Nov 4, 2015 at 12:43 AM, Andres Freund >wrote: >> On 2015-11-03 10:23:35 -0500, Robert Haas wrote: >>> On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes >wrote: >>> > If a transaction holding locks aborts on an otherwise idle

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Michael Paquier
On Wed, Nov 4, 2015 at 12:43 AM, Andres Freund wrote: > On 2015-11-03 10:23:35 -0500, Robert Haas wrote: >> On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes wrote: >> > If a transaction holding locks aborts on an otherwise idle server, perhaps >> > it will take a very long time for a log-shipping sta

Re: [HACKERS] Freeze avoidance of very large table.

2015-11-03 Thread Masahiko Sawada
On Tue, Nov 3, 2015 at 12:33 PM, Amit Kapila wrote: > On Tue, Nov 3, 2015 at 5:04 AM, Robert Haas wrote: >> >> On Sat, Oct 31, 2015 at 1:32 AM, Amit Kapila >> wrote: >> > >> > What is your main worry about changing the name of this map, is it >> > about more code churn or is it about that we mig

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-11-03 Thread Pavel Stehule
2015-11-03 17:13 GMT+01:00 Catalin Iacob : > On Tue, Nov 3, 2015 at 12:49 PM, Pavel Stehule > wrote: > >> 1. in PLy_spi_error__init__ you need to check kw for NULL before doing > >> PyDict_Size(kw) otherwise for plpy.SPIError() you get Bad internal > >> call because PyDict_Size expects a real dic

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Tom Lane
Paul Ramsey writes: > [ 20151006b_postgres_fdw_extensions.patch ] Starting to look through this now. I'm dubious of the decision to have ExtractExtensionList throw errors if there are un-installed extensions mentioned in the FDW options. Wouldn't it be a lot more convenient if such extension na

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-11-03 Thread Robert Haas
On Tue, Nov 3, 2015 at 2:57 PM, Tom Lane wrote: > Paul Ramsey writes: >> [ 20151006b_postgres_fdw_extensions.patch ] > > Starting to look through this now. I'm dubious of the decision to have > ExtractExtensionList throw errors if there are un-installed extensions > mentioned in the FDW options.

Re: [HACKERS] Minor clarifying changes to abbreviated key abort code comments

2015-11-03 Thread Robert Haas
On Tue, Nov 3, 2015 at 2:19 PM, Peter Geoghegan wrote: > On Tue, Nov 3, 2015 at 11:15 AM, Robert Haas wrote: >> OK, I see. Fixing comments in the back-branches is not always a >> productive use of time, and in general I might like it if you pushed >> for such things less frequently. But I've do

Re: [HACKERS] Minor clarifying changes to abbreviated key abort code comments

2015-11-03 Thread Peter Geoghegan
On Tue, Nov 3, 2015 at 11:15 AM, Robert Haas wrote: > OK, I see. Fixing comments in the back-branches is not always a > productive use of time, and in general I might like it if you pushed > for such things less frequently. But I've done it anyway in this > instance. I guess I favor doing it wh

Re: [HACKERS] Minor clarifying changes to abbreviated key abort code comments

2015-11-03 Thread Robert Haas
On Tue, Nov 3, 2015 at 12:36 PM, Peter Geoghegan wrote: > On Tue, Nov 3, 2015 at 5:47 AM, Robert Haas wrote: >> This comment doesn't make sense to me: >> >> +* (TSS_BUILDRUNS state prevents control reaching here in any >> +* case). >> >> Unless I'm missing somethin

[HACKERS] Bitmap index scans use of filters on available columns

2015-11-03 Thread Jeff Janes
create table f as select (random()*100)::int as x, md5(random()::text) as y from generate_series(1,100); create index on f (x, y); analyze verbose f; --dont vacuum explain select * from f where x=5 and y like '%abc%'; QUERY PLAN -

Re: [HACKERS] [patch] to build docs on Mac OS X El Capitan with MacPorts

2015-11-03 Thread Neil Tiffin
I should add that this was required for a postgres git build using MacPorts to supply dependencies and not a build of postgres using MacPorts. Neil > On Nov 3, 2015, at 8:11 AM, Robert Haas wrote: > > On Sun, Nov 1, 2015 at 8:41 AM, Neil Tiffin wrote: >> The attached patch was required to get

Re: [HACKERS] Getting sorted data from foreign server

2015-11-03 Thread Robert Haas
On Fri, Oct 30, 2015 at 6:19 AM, Ashutosh Bapat wrote: > If there is a collate clause in the ORDER BY, the server crashes with > assertion > +Assert(loc_cxt.state == FDW_COLLATE_NONE || > +loc_cxt.state == FDW_COLLATE_SAFE); > > > The assertion is fine as long as is_foreign_expr()

Re: [HACKERS] fortnight interval support

2015-11-03 Thread Robert Haas
On Tue, Nov 3, 2015 at 8:31 AM, Alvaro Herrera wrote: > (WRT the reference to Jane Austen and "Se'ennight" for "week", it occurs > to me that fortnight is a similar contraction for "forteen night".) Well, clearly we also need enquië for the elves of Arda and tenday for for Faerûnians. Seems like

Re: [HACKERS] September 2015 Commitfest

2015-11-03 Thread Robert Haas
On Tue, Nov 3, 2015 at 8:12 AM, Michael Paquier wrote: > On Mon, Nov 2, 2015 at 9:35 PM, Michael Paquier wrote: >> And now CF begins officially. The axe has fallen as promised 26 hours after. > > Seeing no volunteers around, I can take the CFM hat for November's CF. > Any objections/complaints/rem

Re: [HACKERS] Minor clarifying changes to abbreviated key abort code comments

2015-11-03 Thread Peter Geoghegan
On Tue, Nov 3, 2015 at 5:47 AM, Robert Haas wrote: > This comment doesn't make sense to me: > > +* (TSS_BUILDRUNS state prevents control reaching here in any > +* case). > > Unless I'm missing something, that's not actually true. It is true. consider_abort_common(

Re: [HACKERS] Dangling Client Backend Process

2015-11-03 Thread Robert Haas
On Fri, Oct 30, 2015 at 11:03 AM, Andres Freund wrote: > On 2015-10-30 10:57:45 -0400, Tom Lane wrote: >> Andres Freund writes: >> > adding a parseInput(conn) into the loop yields the expected >> > FATAL: 57P01: terminating connection due to unexpected postmaster exit >> > Is there really any re

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-11-03 Thread Catalin Iacob
On Tue, Nov 3, 2015 at 12:49 PM, Pavel Stehule wrote: >> 1. in PLy_spi_error__init__ you need to check kw for NULL before doing >> PyDict_Size(kw) otherwise for plpy.SPIError() you get Bad internal >> call because PyDict_Size expects a real dictionary not NULL > > > PyDict_Size returns -1 when the

Re: [HACKERS] Documentation fix for psql

2015-11-03 Thread Tom Lane
Albe Laurenz writes: > The psql documentation calls the \pset options unicode_*_style > when in reality they are called unicode_*_linestyle. > This should be backpatched to 9.5. So I see. Looks like there are a few other grammatical issues in that patch too ... will fix. Thanks for the report!

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Andres Freund
On 2015-11-03 10:23:35 -0500, Robert Haas wrote: > On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes wrote: > > If a transaction holding locks aborts on an otherwise idle server, perhaps > > it will take a very long time for a log-shipping standby to realize this. > > But I have hard time believing t

Re: [HACKERS] Freeze avoidance of very large table.

2015-11-03 Thread Robert Haas
On Mon, Nov 2, 2015 at 10:33 PM, Amit Kapila wrote: > On Tue, Nov 3, 2015 at 5:04 AM, Robert Haas wrote: >> >> On Sat, Oct 31, 2015 at 1:32 AM, Amit Kapila >> wrote: >> > >> > What is your main worry about changing the name of this map, is it >> > about more code churn or is it about that we mig

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-11-03 Thread Robert Haas
On Mon, Nov 2, 2015 at 12:15 PM, Peter Eisentraut wrote: > On 10/30/15 9:26 AM, Robert Haas wrote: >> That's true, but doesn't allowing every parameter to be multiply >> specified greatly increase the implementation complexity for a pretty >> marginal benefit? > > Well, the way I would have approa

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2015-11-03 Thread Robert Haas
On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes wrote: > If a transaction holding locks aborts on an otherwise idle server, perhaps it > will take a very long time for a log-shipping standby to realize this. But I > have hard time believing that anyone who cares about that would be using > log-shi

Re: [HACKERS] proposal: multiple psql option -c

2015-11-03 Thread Pavel Stehule
2015-11-03 4:16 GMT+01:00 Robert Haas : > On Sat, Oct 31, 2015 at 2:50 PM, Pavel Stehule > wrote: > > fixed patch attached > > The documentation included in this patch doesn't really make it clear > why -g is different from or better than -c. > I wrote some text. But needs some work of native sp

[HACKERS] RFC/WIP: adding new configuration options to TOAST

2015-11-03 Thread Bill Moran
Looking for feedback to see if anyone sees any issues or has any suggestions on what I'm doing. The attached patch alters 3 things with regard to TOAST behavior: 1) Add a GUC target_compression_ratio: When attempting to compress a datum in the TOAST code, only stored the compressed version

Re: [HACKERS] shm_mq fix for non-blocking mode

2015-11-03 Thread Robert Haas
On Thu, Oct 22, 2015 at 10:00 PM, Robert Haas wrote: >> ...and so I've committed it and back-patched to 9.4. > > Sigh. This was buggy; I have no idea how it survived my earlier testing. > > I will go fix it. Sorry. Gah! That, too, turned out to be buggy, although in a considerably more subtle

Re: [HACKERS] ParallelContexts can get confused about which worker is which

2015-11-03 Thread Robert Haas
On Mon, Nov 2, 2015 at 4:13 PM, Robert Haas wrote: > On Sun, Nov 1, 2015 at 1:11 AM, Amit Kapila wrote: >> If we are going to add a new parameter to BackgroundWorker structure, >> then the same needs to be updated in docs [1] as well. > > Right, good point. Here's an updated patch with documenta

Re: [HACKERS] Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

2015-11-03 Thread Merlin Moncure
On Mon, Nov 2, 2015 at 1:23 PM, Jim Nasby wrote: > On 11/2/15 11:15 AM, Pavel Stehule wrote: >> >> I have not strong idea about how to solve it well - maybe introduce >> transaction_idle_timeout and session_idle_timeout? > > > Yes, please. This is a very common problem. I would love a better way t

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-11-03 Thread Simon Riggs
On 3 November 2015 at 15:23, Amit Kapila wrote: > On Fri, Oct 23, 2015 at 6:29 AM, Simon Riggs > wrote: > >> On 21 October 2015 at 13:31, Jeff Janes wrote: >> >> Index-only scans will visit the heap for each tuple until the first >>> VACUUM is done. >>> >>> The first vacuum will read the entire

Re: [HACKERS] Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

2015-11-03 Thread Pavel Stehule
2015-11-03 3:42 GMT+01:00 Amit Kapila : > On Mon, Nov 2, 2015 at 10:45 PM, Pavel Stehule > wrote: >> >> >> It is 100% true. But the users can do strange things. If we solve idle >> transactions and not idle session, then they are able to increase >> max_connections to thousands with happy smile i

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-11-03 Thread Amit Kapila
On Fri, Oct 23, 2015 at 2:46 AM, Robert Haas wrote: > > On Wed, Oct 21, 2015 at 1:31 PM, Jeff Janes wrote: > > It turns out it was pretty easy to set PD_ALL_VISIBLE on the new pages, > > since the code in hio that requests the relation to be extended already has > > info on the tuple's intended f

Re: [HACKERS] Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

2015-11-03 Thread Merlin Moncure
On Mon, Nov 2, 2015 at 8:42 PM, Amit Kapila wrote: > On Mon, Nov 2, 2015 at 10:45 PM, Pavel Stehule > wrote: >> >> >> It is 100% true. But the users can do strange things. If we solve idle >> transactions and not idle session, then they are able to increase >> max_connections to thousands with ha

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-11-03 Thread Amit Kapila
On Fri, Oct 23, 2015 at 6:29 AM, Simon Riggs wrote: > On 21 October 2015 at 13:31, Jeff Janes wrote: > > Index-only scans will visit the heap for each tuple until the first VACUUM >> is done. >> >> The first vacuum will read the entire table, but not need to write it >> anymore. And will create

Re: [HACKERS] [patch] to build docs on Mac OS X El Capitan with MacPorts

2015-11-03 Thread Robert Haas
On Sun, Nov 1, 2015 at 8:41 AM, Neil Tiffin wrote: > The attached patch was required to get the docs to build on Mac OS X 10.11.1 > (15B42) with MacPorts 2.3.4. After changing docbook.m4 ‘autoreconf’ has to > be run. This patch does not include the new version of ‘configure' Can anyone else v

Re: [HACKERS] eXtensible Transaction Manager API

2015-11-03 Thread Simon Riggs
On 2 November 2015 at 13:24, Konstantin Knizhnik wrote: > PostgreSQL assumes that top-level xid commit is atomic, along with all of > its subtransactions. So the API having access to only Get/Set at the xid > level would not work. We would need TransactionIdSetTreeStatus() rather > than just SetS

Re: [HACKERS] Minor clarifying changes to abbreviated key abort code comments

2015-11-03 Thread Robert Haas
On Sat, Oct 31, 2015 at 3:42 PM, Peter Geoghegan wrote: > Attached are a couple of patches that only change code comments. The > first (abort abbreviation) patch is recommended for backpatch to 9.5. > The second is a tiny tweak. This comment doesn't make sense to me: +* (TSS_BUIL

[HACKERS] Documentation fix for psql

2015-11-03 Thread Albe Laurenz
The psql documentation calls the \pset options unicode_*_style when in reality they are called unicode_*_linestyle. This should be backpatched to 9.5. Yours, Laurenz Albe 0001-Fix-documentation-for-pset-unicode_-_linestyle.patch Description: 0001-Fix-documentation-for-pset-unicode_-_linestyle.p

Re: [HACKERS] fortnight interval support

2015-11-03 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Oct 28, 2015 at 4:17 AM, Gavin Flower wrote: > > You trying to get PostgreSQL banned in France??? :-) > > > > When I was learning French many years ago, I was told that the French > > consider their fortnight to be 15 days!!! > > Confirmed. I would translate forni

Re: [HACKERS] fortnight interval support

2015-11-03 Thread Michael Paquier
On Wed, Oct 28, 2015 at 4:17 AM, Gavin Flower wrote: > You trying to get PostgreSQL banned in France??? :-) > > When I was learning French many years ago, I was told that the French > consider their fortnight to be 15 days!!! Confirmed. I would translate fornight as 'quinzaine' to French. (please

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-11-03 Thread Kouhei Kaigai
> On Thu, Oct 29, 2015 at 6:05 AM, Kouhei Kaigai wrote: > > In this case, the EPQ slot to store the joined tuple is still > > a challenge to be solved. > > > > Is it possible to use one or any of EPQ slots that are setup for > > base relations but represented by ForeignScan/CustomScan? > > Yes, I

Re: [HACKERS] September 2015 Commitfest

2015-11-03 Thread Michael Paquier
On Mon, Nov 2, 2015 at 9:35 PM, Michael Paquier wrote: > And now CF begins officially. The axe has fallen as promised 26 hours after. Seeing no volunteers around, I can take the CFM hat for November's CF. Any objections/complaints/remarks? -- Michael -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] ALTER SYSTEM vs symlink

2015-11-03 Thread Robert Haas
On Mon, Nov 2, 2015 at 10:40 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Nov 2, 2015 at 10:13 PM, Amit Kapila wrote: >>> I think that is the sensible way to deal with this and any other such >>> parameters. We already have a way to disallow setting of individual >>> parameters (GUC_DIS

Re: [HACKERS] Re: Why not to use 'pg_ctl start -D ../data' to register posgtresql windows service

2015-11-03 Thread Michael Paquier
On Tue, Nov 3, 2015 at 10:46 AM, YuanyuanLiu wrote: >I really learned a lot from you, and thank you! By the way, in the future you may want to ask general questions to pgsql-general, pgsql-hackers is where new features are being discussed and where technical discussions happen :) -- Michael

Re: [HACKERS] WIP: Rework access method interface

2015-11-03 Thread Alexander Korotkov
On Tue, Nov 3, 2015 at 2:36 AM, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> I'm kind of inclined to just let the verifiers read the catalogs for > >> themselves. AFAICS, a loop around the results of SearchSysCacheList > >> is not going to be significantly more code than wh

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-11-03 Thread Pavel Stehule
2015-11-02 17:01 GMT+01:00 Catalin Iacob : > Hello, > > Here's a detailed review: > > 1. in PLy_spi_error__init__ you need to check kw for NULL before doing > PyDict_Size(kw) otherwise for plpy.SPIError() you get Bad internal > call because PyDict_Size expects a real dictionary not NULL > PyDict_

Re: [HACKERS] OS X El Capitan and DYLD_LIBRARY_PATH

2015-11-03 Thread Andres Freund
Hi, On 2015-10-14 11:24:27 -0400, Peter Eisentraut wrote: > The new OS X release 10.11 "El Capitan" has a "security" feature that > prevents passing DYLD_LIBRARY_PATH to child processes. Somehow, that > variable is stripped from the environment. Two colleagues of mine at Citus just hit that. >

Re: [HACKERS] Patent warning about the Greenplum source code

2015-11-03 Thread Simon Riggs
On 3 November 2015 at 08:12, Bruce Momjian wrote: > I am posting this at the request of Josh Berkus, who wanted > clarification on some issues. FYI, I have been speaking in this thread > as a community member, and not as a member of core, and made some > mistakes in my handling of this --- my a

Re: [HACKERS] [BUGS] BUG #12989: pg_size_pretty with negative values

2015-11-03 Thread Julien Rouhaud
On 03/11/2015 04:06, Robert Haas wrote: > On Sat, Oct 31, 2015 at 2:25 PM, Julien Rouhaud > wrote: >> I just reviewed your patch, everything looks fine for me. Maybe some >> minor cosmetic changes could be made to avoid declaring too many vars, >> but I think a committer would have a better idea o

Re: [HACKERS] Parallel Seq Scan

2015-11-03 Thread Amit Kapila
On Fri, Oct 23, 2015 at 4:41 PM, Amit Kapila wrote: > > On Fri, Oct 23, 2015 at 10:33 AM, Robert Haas wrote: Please find the rebased partial seq scan patch attached with this mail. Robert suggested me off list that we should once try to see if we can use Seq Scan node instead of introducing a n

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-03 Thread Vladimir Borodin
> 3 нояб. 2015 г., в 11:38, Andres Freund написал(а): > > On 2015-11-02 15:37:57 -0500, Robert Haas wrote: >> On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: >>> I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; >>> ROLLBACK. I first described the problem in threa

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Pavel Stehule
2015-11-03 9:54 GMT+01:00 Andres Freund : > On 2015-11-03 09:52:26 +0100, Pavel Stehule wrote: > > 2015-11-03 9:35 GMT+01:00 Andres Freund : > > > > > On 2015-11-03 17:19:43 +1100, Haribabu Kommi wrote: > > > > With this commit - bde39eed0cafb82bc94c40e95d96b5cf47b6f719, it is > not > > > possible

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Andres Freund
On 2015-11-03 09:52:34 +0100, Simon Riggs wrote: > On 3 November 2015 at 09:35, Andres Freund wrote: > > > > > With this commit - bde39eed0cafb82bc94c40e95d96b5cf47b6f719, it is not > > possible > > > to execute Notify commands inside a parallel worker. Can't we change > > > it as disable both l

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Andres Freund
On 2015-11-03 09:52:26 +0100, Pavel Stehule wrote: > 2015-11-03 9:35 GMT+01:00 Andres Freund : > > > On 2015-11-03 17:19:43 +1100, Haribabu Kommi wrote: > > > With this commit - bde39eed0cafb82bc94c40e95d96b5cf47b6f719, it is not > > possible > > > to execute Notify commands inside a parallel work

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Pavel Stehule
2015-11-03 9:35 GMT+01:00 Andres Freund : > On 2015-11-03 17:19:43 +1100, Haribabu Kommi wrote: > > On Sat, Aug 29, 2015 at 12:55 PM, Thomas Munro > > wrote: > > > On Sat, Aug 29, 2015 at 9:03 AM, Thomas Munro > > > wrote: > > > This made me wonder what happens if a background worker calls LISTE

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Simon Riggs
On 3 November 2015 at 09:35, Andres Freund wrote: > > With this commit - bde39eed0cafb82bc94c40e95d96b5cf47b6f719, it is not > possible > > to execute Notify commands inside a parallel worker. Can't we change > > it as disable both listen and notify commands inside a background worker? > > Well,

Re: [HACKERS] pglogical_output - a general purpose logical decoding output plugin

2015-11-03 Thread Craig Ringer
On 3 November 2015 at 16:41, Craig Ringer wrote: > On 3 November 2015 at 02:58, Jim Nasby wrote: >> On 11/2/15 8:36 AM, Craig Ringer wrote: >>> >>> Here's the protocol documentation discussed in the README. It's >>> asciidoc at the moment, so it can be formatted into something with >>> readable t

Re: [HACKERS] pglogical_output - a general purpose logical decoding output plugin

2015-11-03 Thread Craig Ringer
On 3 November 2015 at 02:58, Jim Nasby wrote: > On 11/2/15 8:36 AM, Craig Ringer wrote: >> >> Here's the protocol documentation discussed in the README. It's >> asciidoc at the moment, so it can be formatted into something with >> readable tables. > > > Is this by chance up on github? It'd be easi

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-03 Thread Andres Freund
On 2015-11-02 15:37:57 -0500, Robert Haas wrote: > On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: > > I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; > > ROLLBACK. I first described the problem in thread on pgsql-admin@ [0], there > > is copy-paste from psql there

Re: [HACKERS] NOTIFY in Background Worker

2015-11-03 Thread Andres Freund
On 2015-11-03 17:19:43 +1100, Haribabu Kommi wrote: > On Sat, Aug 29, 2015 at 12:55 PM, Thomas Munro > wrote: > > On Sat, Aug 29, 2015 at 9:03 AM, Thomas Munro > > wrote: > > This made me wonder what happens if a background worker calls LISTEN. > > NotifyMyFrontEnd simply logs the notifications,