Re: Typo in origin.c

2018-02-13 Thread Masahiko Sawada
On Tue, Feb 13, 2018 at 12:40 PM, Peter Eisentraut wrote: > On 2/12/18 21:58, Masahiko Sawada wrote: >> Attached a patch for fixing $subject. >> >> s/funcion/function/ > > fixed > Thank you. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-02-13 Thread Masahiko Sawada
On Fri, Feb 9, 2018 at 11:48 PM, Claudio Freire wrote: > On Fri, Feb 9, 2018 at 1:36 AM, Masahiko Sawada wrote: >> On Fri, Feb 9, 2018 at 12:45 AM, Claudio Freire >> wrote: >>> On Thu, Feb 8, 2018 at 1:36 AM, Masahiko

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-13 Thread Rafia Sabih
On Tue, Feb 13, 2018 at 6:21 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > I see that partition-wise aggregate plan too uses parallel index, am I > missing something? > > You're right, I missed that, oops. > >> Q18 takes some 390 secs with patch and some 147 secs without it. >>

Re: proposal: alternative psql commands quit and exit

2018-02-13 Thread Ivan E. Panchenko
14.02.2018 09:17, Bruce Momjian пишет: On Wed, Feb 14, 2018 at 03:07:46PM +0900, Michael Paquier wrote: On Wed, Feb 14, 2018 at 12:56:48AM -0500, Bruce Momjian wrote: On Mon, Feb 12, 2018 at 01:28:53AM -0500, Bruce Momjian wrote: Should we give the same "Use control-D to quit." hint here for

Re: proposal: alternative psql commands quit and exit

2018-02-13 Thread Bruce Momjian
On Wed, Feb 14, 2018 at 03:07:46PM +0900, Michael Paquier wrote: > On Wed, Feb 14, 2018 at 12:56:48AM -0500, Bruce Momjian wrote: > > On Mon, Feb 12, 2018 at 01:28:53AM -0500, Bruce Momjian wrote: > > > > Should we give the same "Use control-D to quit." hint here for '\q'? > > > > I think it is

Re: proposal: alternative psql commands quit and exit

2018-02-13 Thread Michael Paquier
On Wed, Feb 14, 2018 at 12:56:48AM -0500, Bruce Momjian wrote: > On Mon, Feb 12, 2018 at 01:28:53AM -0500, Bruce Momjian wrote: > > > Should we give the same "Use control-D to quit." hint here for '\q'? > > > I think it is logical that we should. > > > > I have applied the attached patch giving a

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-13 Thread Pavan Deolasee
Hi Stephen, On Tue, Feb 6, 2018 at 3:37 PM, Stephen Frost wrote: > > > Coming out of that, my understanding is that Simon is planning to have a > patch which implements RLS and partitioning (though the query plans for > partitioning may be sub-par and not ideal) as part of

Re: tapeblocks is uninitialized in logtape.c

2018-02-13 Thread Tom Lane
I wrote: > Jaime Casanova writes: >> My compiler gives me this message >> logtape.c: In function 'ltsConcatWorkerTapes': >> logtape.c:462:48: warning: 'tapeblocks' may be used uninitialized in >> this function [-Wmaybe-uninitialized] >> lts->nBlocksAllocated =

Re: CALL stmt, ERROR: unrecognized node type: 113 bug

2018-02-13 Thread Michael Paquier
On Tue, Feb 13, 2018 at 03:26:20PM -0500, Peter Eisentraut wrote: > and committed Thanks, those changes are fine for me. Perhaps you want to have print_function_rettype() drop a elog(ERROR) if called with an invalid prorettype? I tend to be allergic to Asserts in ruleutils.c since 0daeba0e...

[bug fix] Cascaded standby cannot start after a clean shutdown

2018-02-13 Thread Tsunakawa, Takayuki
Hello, Our customer encountered a rare bug of PostgreSQL which prevents a cascaded standby from starting up. The attached patch is a fix for it. I hope this will be back-patched. I'll add this to the next CF. PROBLEM == The PostgreSQL version is 9.5. The

Re: TODO item: WAL replay of CREATE TABLESPACE with differing directory structure

2018-02-13 Thread Michael Paquier
On Tue, Feb 13, 2018 at 01:44:34PM -0800, Patrick Krecker wrote: > I am searching for a way to make a contribution to Postgres and I came > across this TODO item (I realize there has been some controversy > around the TODO list [1], and I hope that my use of it doesn't spark > another discussion

Re: unique indexes on partitioned tables

2018-02-13 Thread Peter Eisentraut
Here is a mini-patch on top of yours to fix a few cosmetic things. I don't understand the variable name "third". I don't see a "first" or "second" nearby. I find some of the columns in pg_constraint confusing. For a primary key on a partitioned table, for the PK on the partition I get

Re: Parallel bt build crashes when DSM_NONE

2018-02-13 Thread Michael Paquier
On Wed, Feb 14, 2018 at 10:38:58AM +0900, Kyotaro HORIGUCHI wrote: > I'll post a patch that eliminate DSM_IMPL_NONE after this. I'd like it > to be shipped on 11. Feel free to. Be just careful that the connection attempts in test_config_settings() should try to use the DSM implementation

Re: Parameter status message not sent?

2018-02-13 Thread Tatsuo Ishii
> It'll only get sent to the client the next time the server processes a > query. We can't just at arbitrary points reload the config file or send > messages out. The SIGHUP handler just sets ConfigReloadPending which > PostgresMain() then processes: > > /* >* (6)

Re: Parameter status message not sent?

2018-02-13 Thread Andres Freund
Hi, On 2018-02-14 10:42:12 +0800, Craig Ringer wrote: > I was wondering a while ago - can't we just set our own proc's latch here, > so we wake up and send it earlier if we're in the idle main loop? The problem is that the client doesn't really expect messages from the server when it's idle...

Re: Python 3.7 support

2018-02-13 Thread Michael Paquier
On Tue, Feb 13, 2018 at 04:17:13PM -0500, Peter Eisentraut wrote: > A small patch to tweak the tests to support output differences with > Python 3.7 (currently in beta). Wouldn't it be better to wait for the version to be released before pushing anything in the tree? If there are again changes

Re: Parameter status message not sent?

2018-02-13 Thread Craig Ringer
On 14 February 2018 at 10:26, Andres Freund wrote: > On 2018-02-14 11:12:30 +0900, Tatsuo Ishii wrote: > > According to the manual, backend sends a parameter status message when > > certain configuration variable has been changed and SIGHUP signal is > sent. > >

Re: Parameter status message not sent?

2018-02-13 Thread Andres Freund
On 2018-02-14 11:12:30 +0900, Tatsuo Ishii wrote: > According to the manual, backend sends a parameter status message when > certain configuration variable has been changed and SIGHUP signal is sent. > https://www.postgresql.org/docs/10/static/protocol-flow.html#PROTOCOL-ASYNC > >

Parameter status message not sent?

2018-02-13 Thread Tatsuo Ishii
According to the manual, backend sends a parameter status message when certain configuration variable has been changed and SIGHUP signal is sent. https://www.postgresql.org/docs/10/static/protocol-flow.html#PROTOCOL-ASYNC ParameterStatus messages will be generated whenever the active value

Re: reorganizing partitioning code (was: Re: [HACKERS] path toward faster partition pruning)

2018-02-13 Thread Amit Langote
On 2018/02/13 23:08, Ashutosh Bapat wrote: > On Tue, Feb 13, 2018 at 2:17 PM, Amit Langote > wrote: >> >> Agree with the proposed reorganizing and adding a partcache.c, which I >> tried to do in the attached patch. >> >> * The new src/backend/utils/cache/partcache.c

tapeblocks is uninitialized in logtape.c

2018-02-13 Thread Jaime Casanova
On 13 February 2018 at 21:07, Jaime Casanova wrote: > Hi, > > Compiling with CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" as > recommended in https://wiki.postgresql.org/wiki/Developer_FAQ#Compile-time > > My compiler gives me this message > > """ > logtape.c: In

[no subject]

2018-02-13 Thread Jaime Casanova
Hi, Compiling with CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" as recommended in https://wiki.postgresql.org/wiki/Developer_FAQ#Compile-time My compiler gives me this message """ logtape.c: In function ‘ltsConcatWorkerTapes’: logtape.c:462:48: warning: ‘tapeblocks’ may be used uninitialized

Missing comment edit

2018-02-13 Thread Kyotaro HORIGUCHI
Hello. I happend to find that the comment on formdesc is missing pg_subscription. Please find the attached patch (I'm sure:) to fix that . regards, -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index

Re: Parallel bt build crashes when DSM_NONE

2018-02-13 Thread Kyotaro HORIGUCHI
At Mon, 12 Feb 2018 22:05:36 +0900, Michael Paquier wrote in <20180212130536.ga18...@paquier.xyz> > On Fri, Feb 09, 2018 at 05:06:35PM +0900, Kyotaro HORIGUCHI wrote: > 4 regression tests fail when using dynamic_shared_memory_type=none: > join, aggregates, select_parallel

Re: Server won't start with fallback setting by initdb.

2018-02-13 Thread Kyotaro HORIGUCHI
Hello, At Mon, 12 Feb 2018 22:28:15 +0900, Michael Paquier wrote in <20180212132815.gb18...@paquier.xyz> > On Fri, Feb 09, 2018 at 05:08:23PM +0900, Kyotaro HORIGUCHI wrote: > > > postgres: max_wal_senders must be less than max_connections > > > > I think that we can

Re: reorganizing partitioning code

2018-02-13 Thread Amit Langote
On 2018/02/13 22:23, Alvaro Herrera wrote: > Thanks for working on this. May I suggest to open a completely new > thread? Done. Thanks, Amit

Re: Parallel bt build crashes when DSM_NONE

2018-02-13 Thread Kyotaro HORIGUCHI
At Mon, 12 Feb 2018 15:00:54 -0500, Robert Haas wrote in > On Mon, Feb 12, 2018 at 12:26 PM, Peter Geoghegan wrote: > > I think that your patch does the right thing. > >

Re: master plpython check fails on Solaris 10

2018-02-13 Thread Peter Eisentraut
On 2/13/18 05:40, Marina Polyakova wrote: > Binary search has shown that this failure begins with commit > 8561e4840c81f7e345be2df170839846814fa004 (Transaction control in PL > procedures.). On the previous commit > (b9ff79b8f17697f3df492017d454caa9920a7183) there's no > plpython_transaction

Re: Add more information_schema columns

2018-02-13 Thread Tom Lane
Andres Freund writes: > Do we have a policy about catversion bumps for information schema > changes? A cluster from before this commit fails the regression tests > after the change, but still mostly works... I think historically we've not bumped catversion, on the grounds

Re: Add more information_schema columns

2018-02-13 Thread Andres Freund
On 2018-02-07 10:50:12 -0500, Peter Eisentraut wrote: > On 2/7/18 00:14, Michael Paquier wrote: > > On Tue, Feb 06, 2018 at 10:45:52PM -0500, Peter Eisentraut wrote: > >> I think what I had meant to write was something like > >> > >> (t.tgtype & (1 | 66)) > >> > >> but maybe it's clearer to

Re: [HACKERS] Client Connection redirection support for PostgreSQL

2018-02-13 Thread Tom Lane
Robert Haas writes: > -- might need some defense against the redirected-to server getting > the same password as was sent to the original server. Is that a > security risk? Does HTTP have a rule about this? Without having read any of the previous discussion ... I'd say

TODO item: WAL replay of CREATE TABLESPACE with differing directory structure

2018-02-13 Thread Patrick Krecker
Hi Hackers -- I am searching for a way to make a contribution to Postgres and I came across this TODO item (I realize there has been some controversy around the TODO list [1], and I hope that my use of it doesn't spark another discussion about removing it altogether): "Allow WAL replay of CREATE

Python 3.7 support

2018-02-13 Thread Peter Eisentraut
A small patch to tweak the tests to support output differences with Python 3.7 (currently in beta). -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From 543840cbe29653c18cce8d1ab4af4daac5c4899b Mon Sep 17 00:00:00

Re: spelling of enable_partition_wise_join

2018-02-13 Thread Gavin Flower
On 14/02/18 09:27, Peter Eisentraut wrote: I wonder how others feel about this, but the spelling of enable_partition_wise_join feels funny to me every time I look at it. I would write it enable_partitionwise_join. Thoughts? As 'wise' is a suffix, not a word in this situation - so it be

Re: spelling of enable_partition_wise_join

2018-02-13 Thread Alvaro Herrera
Peter Eisentraut wrote: > I wonder how others feel about this, but the spelling of > enable_partition_wise_join feels funny to me every time I look at it. I > would write it enable_partitionwise_join. +1 See also: https://postgr.es/m/20171005134847.shzldz2ublrb3ny2@alvherre.pgsql -- Álvaro

Re: CALL stmt, ERROR: unrecognized node type: 113 bug

2018-02-13 Thread Robert Haas
On Mon, Feb 12, 2018 at 3:19 PM, Tom Lane wrote: > modulo that I still don't like prorettype == 0 ;-). +1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

spelling of enable_partition_wise_join

2018-02-13 Thread Peter Eisentraut
I wonder how others feel about this, but the spelling of enable_partition_wise_join feels funny to me every time I look at it. I would write it enable_partitionwise_join. Thoughts? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: CALL stmt, ERROR: unrecognized node type: 113 bug

2018-02-13 Thread Peter Eisentraut
On 2/13/18 03:57, Michael Paquier wrote: > On Mon, Feb 12, 2018 at 03:19:27PM -0500, Tom Lane wrote: >> I've not read in detail, but it looks reasonable offhand, modulo >> that I still don't like prorettype == 0 ;-). >> >> I did notice a tiny typo: >> >> - * with. Hence prefer "$function$",

Re: [HACKERS] Client Connection redirection support for PostgreSQL

2018-02-13 Thread Robert Haas
On Mon, Feb 12, 2018 at 1:56 PM, Satyanarayana Narlapuram wrote: > I simplified the patch and for now just allowed one server. Please find the > attached patches, and the commit message. This patch -- -- doesn't include nearly sufficient documentation

Re: [WIP PATCH] Index scan offset optimisation using visibility map

2018-02-13 Thread Tom Lane
Michail Nikolaev writes: > Still not sure about comment formatting. Have you seen any style guid about > it except "strict ANSI C comment formatting"? Anyway still need to work on > comments. The short answer is "make the new code look like the code around it". But

Re: [GSoC Idea Discussion] "Thrift datatype support" Project

2018-02-13 Thread Bear Giles
On Tue, Feb 13, 2018 at 10:24 AM, Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Technically speaking, Thrift is "language-independent" > serialization-deserialization format with clean approach to backward > compatibility. > > I think Thrift (or something like that) can be useful, as

Re: Converting plpgsql to use DTYPE_REC for named composite types

2018-02-13 Thread Tom Lane
Pavel Stehule writes: > 2017-12-30 0:16 GMT+01:00 Tom Lane : >>> I'll stick this into the January commitfest, but I'd like to get it >>> reviewed and committed pretty soon, because there are follow-on patches >>> that need to get done in time for v11

Re: [GSoC Idea Discussion] "Thrift datatype support" Project

2018-02-13 Thread Vladimir Sitnikov
Technically speaking, Thrift is "language-independent" serialization-deserialization format with clean approach to backward compatibility. I think Thrift (or something like that) can be useful, as it can generate serializers/deserializers for lots of languages. PostgreSQL's "binary" format is

Re: Cached/global query plans, autopreparation

2018-02-13 Thread Shay Rojansky
Hi all, Was wondering if anyone has a reaction to my email below about statement preparation, was it too long? :) (and sorry for top-posting) On Tue, Feb 6, 2018 at 9:27 PM, Shay Rojansky wrote: > Hi all. > > Various versions of having PostgreSQL caching and/or autopreparing >

Re: [GSoC Idea Discussion] "Thrift datatype support" Project

2018-02-13 Thread Bear Giles
Isn't thrift the communications protocol? Do we have foreign server support for parquet and ORC files? On Tue, Feb 13, 2018 at 8:40 AM, Udit Juneja wrote: > Hi, > > I am Udit Juneja, a Computer Science undergraduate student at Thapar > Institute of Engineering and

Re: GSoC 2018 Project Ideas & Mentors - Last Call

2018-02-13 Thread Andrey Borodin
Hi! > 18 янв. 2018 г., в 21:59, Stephen Frost написал(а): > > I'll be submitting PostgreSQL as an organization for GSoC 2018 soon and > look forward to having another great PostgreSQL GSoC! I've just checked GSoC website. PostgreSQL is accepted as an organization this

[GSoC Idea Discussion] "Thrift datatype support" Project

2018-02-13 Thread Udit Juneja
Hi, I am Udit Juneja, a Computer Science undergraduate student at Thapar Institute of Engineering and Technology, India. I am interested in contributing to PostgreSQL. A brief introduction about me: I am familiar with programming languages (C, C++, Python, SQL). I am interested in "Thrift

Re: Using scalar function as set-returning: bug or feature?

2018-02-13 Thread Tom Lane
"Tels" writes: > On Mon, February 12, 2018 5:03 pm, Tom Lane wrote: >> ... However, my pending patch at >> https://commitfest.postgresql.org/17/1439/ >> gets rid of the use of DTYPE_ROW for composite types, and once that >> is in it might well be reasonable to just

Re: [Sender Address Forgery]Re: [Sender Address Forgery]Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning

2018-02-13 Thread Alvaro Herrera
David Rowley wrote: > On 19 January 2018 at 16:00, Kyotaro HORIGUCHI > wrote: > > And I'd like to ask David to check out his mail environment so > > that SPF record is available for his message. > > Will investigate This should be fixed now. Please let us know

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-13 Thread Jeevan Chalke
On Tue, Feb 13, 2018 at 12:37 PM, Rafia Sabih wrote: > > I was testing this patch for TPC-H benchmarking and came across following > results, > Thanks Rafia for testing this with TPC-H benchmarking. > > Q1 completes in 229 secs with patch and in 66 secs without

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-02-13 Thread Ashutosh Bapat
On Mon, Feb 12, 2018 at 6:00 PM, Rajkumar Raghuwanshi wrote: > Hi, > > I am getting "ERROR: unexpected expression in subquery output" and "ERROR: > variable not found in subplan target lists" errors, for "FOR UPDATE" with > postgres_fdw. (when set

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-02-13 Thread Etsuro Fujita
(2018/02/11 6:24), Tom Lane wrote: However, jaguarundi still shows a problem: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi=2018-02-10%2008%3A41%3A32 (previous run similar, so it's semi-reproducible even after this patch). jaguarundi uses -DCLOBBER_CACHE_ALWAYS, so you

Re: Using scalar function as set-returning: bug or feature?

2018-02-13 Thread Marko Tiikkaja
On Tue, Feb 13, 2018 at 12:30 PM, Tels wrote: > I'm not sure if you mean exactly the scenario as in the attached test > case, but this works in plpgsql, too, and would be a shame to lose. > > OTOH, one could also write: > > SELECT INTO ba, bb a,b FROM foo(1); >

Re: Using scalar function as set-returning: bug or feature?

2018-02-13 Thread Tels
Moin Tom, On Mon, February 12, 2018 5:03 pm, Tom Lane wrote: > Pavel Stehule writes: >> 2018-02-09 12:02 GMT+01:00 Marko Tiikkaja : >>> This is quite short-sighted. The better way to do this is to complain >>> if >>> the number of expressions is different

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-02-13 Thread Masahiko Sawada
On Sat, Feb 10, 2018 at 4:08 AM, Robert Haas wrote: > On Thu, Feb 8, 2018 at 3:58 AM, Masahiko Sawada wrote: >>> Overall, what's the status of this patch? Are we hung up on this >>> issue only, or are there other things? >> >> AFAIK there is no more

master plpython check fails on Solaris 10

2018-02-13 Thread Marina Polyakova
Hello, hackers! I got a permanent failure of master (commit ebdb42a0d6a61b93a5bb9f4204408edf5959332c) plpython check on Solaris 10. Regression output and diffs are attached. I used the following commands: ./configure CC="ccache gcc" CFLAGS="-m64 -I/opt/csw/include"

Re: CALL stmt, ERROR: unrecognized node type: 113 bug

2018-02-13 Thread Michael Paquier
On Mon, Feb 12, 2018 at 03:19:27PM -0500, Tom Lane wrote: > I've not read in detail, but it looks reasonable offhand, modulo > that I still don't like prorettype == 0 ;-). > > I did notice a tiny typo: > > - * with. Hence prefer "$function$", but extend if needed. > + * with. Hence