[HACKERS] Dropping a partitioned table takes too long

2017-04-25 Thread Amit Langote
$SUBJECT, if the table has, say, 2000 partitions. The main reason seems to be that RelationBuildPartitionDesc() will be called that many times within the same transaction, which perhaps we cannot do much about right away. But one thing we could do is to reduce the impact of memory allocations it

Re: [HACKERS] Incorrect use of ERRCODE_UNDEFINED_COLUMN in extended stats

2017-04-25 Thread David Rowley
On 25 April 2017 at 02:15, Tom Lane wrote: > David Rowley writes: >> The attached small patched fixes an incorrect usage of an error code >> in the extended stats code. > > Hmm, looks like all of that could do with an editorial pass (e.g., > "duplicity" does not mean what the comments author seem

Re: [HACKERS] warning in twophase.c

2017-04-25 Thread Jeevan Ladhe
I have also been seeing this warning lately, I had tried to check git log, and seems like following commit 546c13e11b29 by Simon has introduced it. But per the commit log, this seems to be a temporary arrangement: commit 546c13e11b29a5408b9d6a6e3cca301380b47f7f Author: Simon Riggs Date: Sun Ap

Re: [HACKERS] warning in twophase.c

2017-04-25 Thread Amit Langote
On 2017/04/25 16:16, Jeevan Ladhe wrote: > I have also been seeing this warning lately, I had tried to check git log, > and > seems like following commit 546c13e11b29 by Simon has introduced it. > > But per the commit log, this seems to be a temporary arrangement: > > commit 546c13e11b29a5408b9d6

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-04-25 Thread Kyotaro HORIGUCHI
Hello, At Thu, 20 Apr 2017 19:57:30 +0530, Ashutosh Bapat wrote in > On Thu, Apr 20, 2017 at 4:08 PM, Suraj Kharage > wrote: > > Hello All, > > > > The query on foreign table hangs due to network down of remote server for > > near about 16 minutes before exiting. > > statement_timeout is expe

Re: [HACKERS] some review comments on logical rep code

2017-04-25 Thread Kyotaro HORIGUCHI
At Tue, 25 Apr 2017 10:11:06 +0900, Masahiko Sawada wrote in > On Mon, Apr 24, 2017 at 7:57 PM, Kyotaro HORIGUCHI > wrote: > > Hello, > > > > At Mon, 24 Apr 2017 11:18:32 +0900, Masahiko Sawada > > wrote in > > > >> >> BEGIN; > >> >> ALTER SUBSCRIPTION hoge_sub ENABLE; > >> >> PREPARE TRANS

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-25 Thread Kyotaro HORIGUCHI
At Tue, 25 Apr 2017 01:13:12 +0900, Fujii Masao wrote in > On Mon, Apr 24, 2017 at 2:55 PM, Masahiko Sawada > wrote: > > On Thu, Apr 20, 2017 at 9:31 AM, Kyotaro HORIGUCHI > > wrote: > >> Ok, I got the point. > >> > >> At Wed, 19 Apr 2017 17:39:01 +0900 (Tokyo Standard Time), Kyotaro > >> HO

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-25 Thread Kyotaro HORIGUCHI
At Tue, 25 Apr 2017 09:22:59 +0900, Masahiko Sawada wrote in > >> Please observe the policy on open item ownership[1] and send a status > >> update > >> within three calendar days of this message. Include a date for your > >> subsequent status update. > > > > Okay, so our consensus is to alway

Re: [HACKERS] Interval for launching the table sync worker

2017-04-25 Thread Kyotaro HORIGUCHI
Hello, At Tue, 25 Apr 2017 00:52:09 +0900, Masahiko Sawada wrote in > + elog(ERROR, "this hash hashtable \"%s\" is not frozen", > + hashp->tabname); > > Maybe the error message should be "this hashtable \"%s\" is not frozen". Both of "hashtable" and "hash table" appear there but hash_freeze u

Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

2017-04-25 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 2:42 AM, Jeff Janes wrote: > On Mon, Apr 24, 2017 at 8:09 AM, Surafel Temesgen > wrote: >> >> the necessity of allowing limit and order by clause to be used with delete >> and >> update statement is discussed in the past and added to the todo list >> >> preveouse mailing l

Re: [HACKERS] Declarative partitioning - another take

2017-04-25 Thread Rajkumar Raghuwanshi
On Mon, Apr 24, 2017 at 4:13 PM, Amit Langote wrote: > Hi Rajkumar, > > It would be great if you could check if the patches fix the issues. > Hi Amit, Thanks for looking into it. I have applied fixes and checked for triggers. I could see difference in behaviour of statement triggers for INSERT

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-04-25 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 1:31 PM, Kyotaro HORIGUCHI wrote: >> >> The logs above show that 34 seconds elapsed between starting to abort >> the transaction and knowing that the foreign server is unreachable. It >> looks like it took that much time for the local server to realise that >> the foreign s

Re: [HACKERS] Dropping a partitioned table takes too long

2017-04-25 Thread 高增琦
The attached patch try to replace 'heap_open' with 'LockRelationOid' when locking parent table. It improved dropping a table with 7000 partitions. 2017-04-25 15:07 GMT+08:00 Amit Langote : > $SUBJECT, if the table has, say, 2000 partitions. > > The main reason seems to be that RelationBuildPartit

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-25 Thread Amit Kapila
On Tue, Apr 25, 2017 at 2:09 PM, Kyotaro HORIGUCHI wrote: > > I'm not good at composition, so I cannot insist on my > proposal. For the convenience of others, here is the proposal > from Fujii-san. > Do you see any problem with the below proposal? To me, this sounds reasonable. > + A quorum

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-25 Thread Ashutosh Bapat
On Mon, Apr 24, 2017 at 5:02 PM, Rajkumar Raghuwanshi wrote: > On Fri, Apr 21, 2017 at 7:59 PM, Ashutosh Bapat > wrote: >> >> Here's an updated patch set > > > Hi, > > I have applied v18 patches and got a crash in m-way joins when partition > ranges differ, below are steps to reproduce this. > >

[HACKERS] Introducing SNI in TLS handshake for SSL connections

2017-04-25 Thread Florin Asavoaie
Hi, Back in November 2013 someone suggested adding the SNI header in the TLS handshake for connections initiated by libpq using OpenSQL. There was no usecase at that point. However, right now there is one: I'd like to write a small "PostGreSQL router" that routes connections to a specific cluste

Re: [HACKERS] Dropping a partitioned table takes too long

2017-04-25 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 12:37 PM, Amit Langote wrote: > $SUBJECT, if the table has, say, 2000 partitions. > > The main reason seems to be that RelationBuildPartitionDesc() will be > called that many times within the same transaction, which perhaps we > cannot do much about right away. But one thi

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-25 Thread Craig Ringer
On 25 Apr. 2017 13:37, "Heikki Linnakangas" wrote: For some data shared memory structures, that store no pointers, we wouldn't need to insist that they are mapped to the same address in every backend, though. In particular, shared_buffers. It wouldn't eliminate the problem, though, only make it

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-25 Thread Masahiko Sawada
On Tue, Apr 25, 2017 at 8:07 PM, Amit Kapila wrote: > On Tue, Apr 25, 2017 at 2:09 PM, Kyotaro HORIGUCHI > wrote: >> >> I'm not good at composition, so I cannot insist on my >> proposal. For the convenience of others, here is the proposal >> from Fujii-san. >> > > Do you see any problem with the

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Félix GERZAGUET
Hello Bruce, On Tue, Apr 25, 2017 at 3:31 AM, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. > I just noticed: "Allow pg_buffercache

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 09:00:45AM +0530, Amit Kapila wrote: > On Tue, Apr 25, 2017 at 8:35 AM, Bruce Momjian wrote: > > On Tue, Apr 25, 2017 at 08:30:50AM +0530, Amit Kapila wrote: > >> On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: > >> > I have committed the first draft of the Postgres

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Mon, Apr 24, 2017 at 08:39:59PM -0700, Andres Freund wrote: > On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: > > I remember seeing those and those are normally details I do not put in > > the release notes as there isn't a clear user experience change except > > "Postgres is faster". Yeah,

[HACKERS] PG_TRY & PG_CATCH in FDW development

2017-04-25 Thread Abbas Butt
Hi Hackers, I want to share a technical problem that I am facing while writing code for an FDW. The problem is as follows: In the FDW call back functions it is recommended to use PG_TRY PG_CATCH blocks along with PG_RE_THROW to disconnect from the foreign server. I am using the same technique in I

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-25 Thread Tom Lane
Craig Ringer writes: > On 25 Apr. 2017 13:37, "Heikki Linnakangas" wrote: >> For some data shared memory structures, that store no pointers, we wouldn't >> need to insist that they are mapped to the same address in every backend, >> though. In particular, shared_buffers. It wouldn't eliminate the

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Mon, Apr 24, 2017 at 08:52:05PM -0700, Andres Freund wrote: > On 2017-04-24 23:45:06 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: > > >> I remember seeing those and those are normally details I do not put in > > >> the release notes a

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-25 Thread Peter Eisentraut
On 4/24/17 22:50, Peter Eisentraut wrote: > On 4/14/17 00:24, Ashutosh Bapat wrote: >> This looks better. Here are patches for master and 9.6. >> Since join pushdown was supported in 9.6 the patch should be >> backported to 9.6 as well. Attached is the patch (_96) for 9.6, >> created by rebasing on

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 09:38:55AM +0530, Rafia Sabih wrote: > On Tue, Apr 25, 2017 at 9:15 AM, Tom Lane wrote: > > Andres Freund writes: > >> On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: > >>> I remember seeing those and those are normally details I do not put in > >>> the release notes as

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-25 Thread Tom Lane
Michael Paquier writes: > On Tue, Apr 25, 2017 at 2:57 PM, Andres Freund wrote: >> Any chance of formulating these in a version agnostic way, instead of >> copying the same stanza for every version? E.g. using a wildcard or >> such... > Using glob() would be enough for this purpose. Not really

Re: [HACKERS] Link to commits in PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Mon, Apr 24, 2017 at 08:55:33PM -0700, Andres Freund wrote: > Hi, > > I wonder if there's a reasonable way that allows to add links to the > more crucial commits for changelog entries. The source e.g. has > > > > > Support parallel bitmap heap scans (Dilip Kumar) > > > > This allows a si

Re: [HACKERS] [BUGS] Crash observed during the start of the Postgres process

2017-04-25 Thread Merlin Moncure
On Tue, Apr 25, 2017 at 8:44 AM, K S, Sandhya (Nokia - IN/Bangalore) wrote: > Hello, > > Did you get a chance to take a look into the issue? > > Please consider it with high priority. We will be awaiting your inputs. This email is heavily cross posted, which is obnoxious. Can you paste the relev

Re: [HACKERS] Separation walsender & normal backends

2017-04-25 Thread Tom Lane
Andres Freund writes: > I've for a while suspected that the separation & duplication of > infrastructure between walsenders and normal backends isn't nice. I think we should consider a more radical solution: trying to put general SQL query capability into the replication protocol was a bad idea a

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-25 Thread Craig Ringer
On 25 April 2017 at 22:07, Tom Lane wrote: > Craig Ringer writes: >> On 25 Apr. 2017 13:37, "Heikki Linnakangas" wrote: >>> For some data shared memory structures, that store no pointers, we wouldn't >>> need to insist that they are mapped to the same address in every backend, >>> though. In par

Re: [HACKERS] identity columns

2017-04-25 Thread Robert Haas
On Sun, Apr 23, 2017 at 9:03 PM, Vitaly Burovoy wrote: >> But why do we need it? Instead of: >> >> ADD GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY >> SET GENERATED { ALWAYS | BY DEFAULT } >> DROP IDENTITY [ IF EXISTS ] >> >> Why not just: >> >> SET GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY

Re: [HACKERS] TAP tests - installcheck vs check

2017-04-25 Thread Robert Haas
On Sun, Apr 23, 2017 at 10:57 PM, Andrew Dunstan wrote: > On 04/23/2017 10:33 PM, Tom Lane wrote: >> Andrew Dunstan writes: >>> AFAICT, unlike the pg_regress checks, which in the installcheck case run >>> against a running instance of postgres, for TAP tests the only >>> difference is that that f

Re: [HACKERS] PG_TRY & PG_CATCH in FDW development

2017-04-25 Thread Tom Lane
Abbas Butt writes: > What is happening for me is that PG_RE_THROW takes me to PG_TRY in the same > function and then PG_TRY jumps to PG_CATCH where PG_RE_THROW again jumps to > PG_TRY in the same function resulting in an infinite loop. The query > therefore never returns. It is supposed to throw t

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 04:03:53PM +1200, David Rowley wrote: > ..On 25 April 2017 at 13:31, Bruce Momjian wrote: > > The only unusual thing is that this release has ~180 items while most > > recent release have had ~220. The pattern I see that there are more > > large features in this release t

Re: [HACKERS] Link to commits in PG 10 release notes

2017-04-25 Thread Tom Lane
On Mon, Apr 24, 2017 at 08:55:33PM -0700, Andres Freund wrote: >> I wonder if there's a reasonable way that allows to add links to the >> more crucial commits for changelog entries. I don't see any way you could do that that wouldn't be extremely bulky and distracting. And, frankly, it would be o

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 01:10:35PM +0900, Amit Langote wrote: > On 2017/04/25 10:31, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes. They > > are current as of two days ago, and I will keep them current. Please > > give me any feedback you have. > > >

Re: [HACKERS] an outdated comment for hash_seq_init.

2017-04-25 Thread Robert Haas
On Mon, Apr 24, 2017 at 3:55 AM, Kyotaro HORIGUCHI wrote: > While I looked into dynahash.c, I found that the following > sentense became outdated by 5dfc198. The commit removed the only > usage of hash_freeze(). > >> * NOTE: it is possible to use hash_seq_init/hash_seq_search without any >> * worr

Re: [HACKERS] A note about debugging TAP failures

2017-04-25 Thread Daniel Gustafsson
> On 24 Apr 2017, at 17:19, Craig Ringer wrote: > > On 24 April 2017 at 20:01, Daniel Gustafsson wrote: > >> I’m np Perl expert though so there might be better/cleaner ways to achieve >> this, in testing it seems to work though. rmtree() is supported at least >> since >> Perl 5.6 from what I

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 06:51:47AM +0200, Petr Jelinek wrote: > On 25/04/17 03:31, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes. They > > are current as of two days ago, and I will keep them current. Please > > give me any feedback you have. > > > >

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 11:09:15AM +0530, Ashutosh Bapat wrote: > Commit f9b1a0dd403ec0931213c66d5f979a3d3e8e7e30 mentions "Ashutosh > Bapat" as author, which is not reflected in the release notes > > -- > Allow explicit control over EXPLAIN's display of planning and > execution time (Stephen Fros

Re: [HACKERS] TAP tests - installcheck vs check

2017-04-25 Thread Andrew Dunstan
On 04/25/2017 10:45 AM, Robert Haas wrote: > On Sun, Apr 23, 2017 at 10:57 PM, Andrew Dunstan > wrote: >> On 04/23/2017 10:33 PM, Tom Lane wrote: >>> Andrew Dunstan writes: AFAICT, unlike the pg_regress checks, which in the installcheck case run against a running instance of postgres,

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread Konstantin Knizhnik
On 24.04.2017 21:43, Andres Freund wrote: Hi, On 2017-04-24 11:46:02 +0300, Konstantin Knizhnik wrote: So what I am thinking now is implicit query caching. If the same query with different literal values is repeated many times, then we can try to generalize this query and replace it with prepar

Re: [HACKERS] TAP tests - installcheck vs check

2017-04-25 Thread Tom Lane
Andrew Dunstan writes: > On 04/25/2017 10:45 AM, Robert Haas wrote: >>> I agree entirely that it's confusing as heck. +1 for inventing a new name. >> Yeah. I would have expected installcheck to just skip any tests that >> don't make sense against an already-installed cluster. I would not >> exp

Re: [HACKERS] Separation walsender & normal backends

2017-04-25 Thread Fujii Masao
On Tue, Apr 25, 2017 at 11:34 PM, Tom Lane wrote: > Andres Freund writes: >> I've for a while suspected that the separation & duplication of >> infrastructure between walsenders and normal backends isn't nice. > > I think we should consider a more radical solution: trying to put > general SQL que

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 03:15:45PM +0200, Félix GERZAGUET wrote: > Hello Bruce, > > On Tue, Apr 25, 2017 at 3:31 AM, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes.  They > are current as of two days ago, and I will keep them current.  Please >

Re: [HACKERS] walsender & parallelism

2017-04-25 Thread Robert Haas
On Thu, Apr 20, 2017 at 9:40 PM, Andres Freund wrote: > This'd be easier to look at if the fairly separate facility of allowing > walsender to execute SQL commands had been committed separately, rather > than as part of a fairly large commit of largely unrelated things. Good grief, yes. I really

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 02:39:40PM +0900, Michael Paquier wrote: > > OK, fixed. I also moved some "incompatibility" items into the right > > section. FYI, you can see the most recent doc build here: > > > > http://momjian.us/pgsql_docs/release-10.html > > Here is some feedback based on a

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-04-25 Thread Robert Haas
On Mon, Apr 24, 2017 at 3:57 PM, Claudio Freire wrote: > I wouldn't fret over the slight slowdown vs the old patch, it could be > noise (the script only completed a single run at scale 400). Yeah, seems fine. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Com

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 11:20:46AM -0400, Bruce Momjian wrote: > Oh, I made a mistake there, fixed. > > > > > > > > > New major version numbering (Peter Eisentraut, Tom Lane) > > > > > > Major versions will now increase just the first number, and minor > > releases will increase just the seco

Re: [HACKERS] scram and \password

2017-04-25 Thread Heikki Linnakangas
On 04/22/2017 01:20 AM, Michael Paquier wrote: On Sat, Apr 22, 2017 at 5:04 AM, Heikki Linnakangas wrote: I'll continue reviewing the rest of the patch on Monday, but one glaring issue is that we cannot add an argument to the existing libpq PQencryptPassword() function, because that's part of t

Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly

2017-04-25 Thread Tom Lane
Simon Riggs writes: > I can't see any reason now why overwriteOK should exist at all. I'm > guessing that the whole "overwriteOK" idea was an incorrect response > to xids appearing where they shouldn't have done because of the > mistake you just corrected. So I will now remove the parameter from >

Re: [HACKERS] TAP tests - installcheck vs check

2017-04-25 Thread Andrew Dunstan
On 04/25/2017 11:13 AM, Tom Lane wrote: > >> I'm in the process of moving all the buildfarm tests to use check >> instead of installcheck, but in such a way that it doesn't constantly >> generate redundant installs. > But is that something only of interest to the buildfarm, or should we > do some

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-25 Thread Robert Haas
On Mon, Apr 24, 2017 at 4:45 PM, Nikolay Shaplov wrote: > I can tell this about this code, if: > > - There is no pgbench specific staff in src/test/perl. Or there should be > _really_big_ reason for it. > > - All the testing is done via calls of TestLib.pm functions. May be these > functions shoul

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-25 Thread Stephen Frost
Amit, * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: > I think why getPartitions() is separate from getInherits() and then > flagPartitions() separate from flagInhTables() is because I thought > originally that mixing the two would be undesirable. In the partitioning > case, getPartitions(

Re: [HACKERS] [BUGS] Crash observed during the start of the Postgres process

2017-04-25 Thread K S, Sandhya (Nokia - IN/Bangalore)
Hi Merlin, Below is the log captured when the crash was encountered. STATEMENT: select count(1) from pg_ls_dir(current_setting('data_directory')) where pg_ls_dir = 'backup_label' LOG: 0: duration: 4.083 ms LOCATION: exec_simple_query, postgres.c:1145 DEBUG: 0: shmem_exit(0): 7 callb

Re: [HACKERS] Crash observed during the start of the Postgres process

2017-04-25 Thread K S, Sandhya (Nokia - IN/Bangalore)
Hello, Did you get a chance to take a look into the issue? Please consider it with high priority. We will be awaiting your inputs. Regards, Sandhya _ From: K S, Sandhya (Nokia - IN/Bangalore) Sent: Thursday, April 20, 2017 1:36 PM To: pgsql-hackers@po

Re: [HACKERS] Unportable implementation of background worker start

2017-04-25 Thread Tom Lane
=?utf-8?Q?R=C3=A9mi_Zara?= writes: >> Le 25 avr. 2017 à 01:47, Tom Lane a écrit : >> It looks like coypu is going to need manual intervention (ie, kill -9 >> on the leftover postmaster) to get unwedged :-(. That's particularly >> disturbing because it implies that ServerLoop isn't iterating at a

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-25 Thread Fujii Masao
On Tue, Apr 25, 2017 at 5:41 PM, Kyotaro HORIGUCHI wrote: > At Tue, 25 Apr 2017 09:22:59 +0900, Masahiko Sawada > wrote in >> >> Please observe the policy on open item ownership[1] and send a status >> >> update >> >> within three calendar days of this message. Include a date for your >> >> s

[HACKERS] question: data file update when pg_basebackup in progress

2017-04-25 Thread Rui Hai Jiang
Hello, I'm checking how the pg_basebackup works and I got a question(maybe there are no such issues): When pg_basebackup is launched, a checkpoint is created first, then all files are transferred to the pg_basebackup client. Is it possible that a data page(say page-N) in a data file is change

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-25 Thread Fabien COELHO
Hello, Nope. TestLib does not know about PostgresNode, the idea is rather that PostgresNode knows and wraps around TestLib when needed. Actually as I look at this part, I feeling an urge to rewrite this code, and change it so, that all command_like calls were called in a context of certain no

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread Serge Rielau
> On Apr 25, 2017, at 8:11 AM, Konstantin Knizhnik > wrote: > Another problem is caused by using integer literals in context where > parameters can not be used, for example "order by 1”. You will also need to deal with modifiers in types such as VARCHAR(10). Not sure if there are specific func

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-25 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Apr 24, 2017 at 9:17 AM, Stephen Frost wrote: > > I wonder why the restriction is there, which is probably part of the > > reason that I'm thinking of phrasing the documentation that way. > > > > Beyond a matter of round to-its, is th

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Claudio Freire
On Tue, Apr 25, 2017 at 12:45 AM, Tom Lane wrote: > Andres Freund writes: >> On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: >>> I remember seeing those and those are normally details I do not put in >>> the release notes as there isn't a clear user experience change except >>> "Postgres is fa

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-25 Thread Fabien COELHO
Hello Nikolay, - I agree to add a generic command TestLib & a wrapper in PostgresNode, instead of having pgbench specific things in the later, then call them from pgbench test script. - I still think that moving the pgbench scripts inside the test script is a bad idea (tm). My sum up

Re: [HACKERS] question: data file update when pg_basebackup in progress

2017-04-25 Thread David G. Johnston
On Tue, Apr 25, 2017 at 9:08 AM, Rui Hai Jiang wrote: > When pg_basebackup is launched, a checkpoint is created first, then all > files are transferred to the pg_basebackup client. Is it possible that a > data page(say page-N) in a data file is changed after the checkpoint and > before the pg_b

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread Konstantin Knizhnik
On 25.04.2017 19:12, Serge Rielau wrote: On Apr 25, 2017, at 8:11 AM, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: Another problem is caused by using integer literals in context where parameters can not be used, for example "order by 1”. You will also need to deal with modif

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread David Fetter
On Tue, Apr 25, 2017 at 06:11:09PM +0300, Konstantin Knizhnik wrote: > On 24.04.2017 21:43, Andres Freund wrote: > > Hi, > > > > On 2017-04-24 11:46:02 +0300, Konstantin Knizhnik wrote: > > > So what I am thinking now is implicit query caching. If the same query > > > with > > > different literal

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Andres Freund
On 2017-04-25 10:10:07 -0400, Bruce Momjian wrote: > On Mon, Apr 24, 2017 at 08:52:05PM -0700, Andres Freund wrote: > > On 2017-04-24 23:45:06 -0400, Tom Lane wrote: > > Oh, I completely agree with accumulating related changes, and that > > code-level details aren't useful. I think we skipped them

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Tels
Moin, On Mon, April 24, 2017 9:31 pm, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. Thank you! Here is one thing I noticed: "By default plann

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread Serge Rielau
On Tue, Apr 25, 2017 at 9:45 AM, Konstantin Knizhnik wrote: On 25.04.2017 19:12, Serge Rielau wrote: On Apr 25, 2017, at 8:11 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru [k.knizh...@postgrespro.ru] > wrote: Another problem is caused by using integer literals in context where parameters

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 01:37:13PM -0300, Claudio Freire wrote: > > I think it has been pretty common to accumulate a lot of such changes > > into generic entries like, say, "speedups for hash joins". More detail > > than that simply isn't useful to end users; and as a rule, our release > > notes

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-25 Thread Robert Haas
On Tue, Apr 25, 2017 at 12:26 PM, Stephen Frost wrote: > Interesting. Seems like the question is really what we mean by "ONLY" > here. For my 2c, at least, if we can check that all of the partitions > already have the constraint enforced, such that the only thing we're > changing is the partitio

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-25 Thread Fabien COELHO
Hello Robert, 1. This patch makes assorted cosmetic and non-cosmetic changes to pgbench.c. That is not expected for a testing patch. Indeed, cosmetic changes should be avoided. If those changes need to be made because they are bug fixes or whatever, Yep, this is the case, minor bugs, plus

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 01:06:05PM -0400, Tels wrote: > Moin, > > On Mon, April 24, 2017 9:31 pm, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes. They > > are current as of two days ago, and I will keep them current. Please > > give me any feedback you

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 10:00:52AM -0700, Andres Freund wrote: > at this point, you can see, we've squarely left O(N) country, and > entered the vast O(N^2) waste. > > 10 109ms > 10 100 22ms > 10 1000162ms > 10 1 1497ms > 10

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Claudio Freire
On Tue, Apr 25, 2017 at 2:11 PM, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 01:37:13PM -0300, Claudio Freire wrote: >> > I think it has been pretty common to accumulate a lot of such changes >> > into generic entries like, say, "speedups for hash joins". More detail >> > than that simply isn'

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Andres Freund
On 2017-04-25 13:11:32 -0400, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 01:37:13PM -0300, Claudio Freire wrote: > > The truncate scan has been measured to be five times faster than without > > this patch (that was on a slow disk, but it shouldn't hurt on fast > > disks.) > > > >

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 02:31:50PM -0300, Claudio Freire wrote: > >> Author: Álvaro Herrera, loosely based on a submission by Claudio Freire > >> Discussion: > >> https://postgr.es/m/cagtbqpa6nfgo_6g_y_7zqx8l9gchdsqkydo1tguh791z6py...@mail.gmail.com > > > > I don't think this warrants inclu

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Tom Lane
Bruce Momjian writes: > On Tue, Apr 25, 2017 at 10:00:52AM -0700, Andres Freund wrote: >> at this point, you can see, we've squarely left O(N) country, and >> entered the vast O(N^2) waste. > OK, I got it now. :-) Here is the new item: > Improve table creation speed in sessions that ref

Re: [HACKERS] Interval for launching the table sync worker

2017-04-25 Thread Peter Eisentraut
On 4/21/17 09:59, Petr Jelinek wrote: > Rereading the code again, it's actually not bug as we update the rstate > to what syncworker says, but it's obviously confusing so probably still > worth to commit that. We don't have the syncworker->relmutex at that point, so it's probably better to read th

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 10:37:48AM -0700, Andres Freund wrote: > On 2017-04-25 13:11:32 -0400, Bruce Momjian wrote: > > I don't think this warrants inclusion in the release notes for reasons > > already discussed. The vacuum truncation operation is a rare one and > > an implementation detail. > >

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 01:44:09PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Apr 25, 2017 at 10:00:52AM -0700, Andres Freund wrote: > >> at this point, you can see, we've squarely left O(N) country, and > >> entered the vast O(N^2) waste. > > > OK, I got it now. :-) Here is the

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-25 Thread Robert Haas
On Tue, Apr 25, 2017 at 1:20 AM, Ashutosh Bapat wrote: >> I suspect it could be done as of now, but I'm a little worried that it >> might create grammar conflicts in the future as we extend the syntax >> further. If we use CREATE TABLE ... PARTITION OF .. DEFAULT, then the >> word DEFAULT appears

Re: [HACKERS] Interval for launching the table sync worker

2017-04-25 Thread Peter Eisentraut
I feel it's getting a bit late for reworkings of this extent, also considering the marginal nature of the problem we are trying to fix. My patch from April 18 is very localized and gets the job done. I think this is still a good direction to investigate, but if we have to extend the hash table AP

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Andres Freund
Hi, On 2017-04-25 13:39:07 -0400, Bruce Momjian wrote: > Understood, but the question is whether the release notes are the right > place to educate users of something that will no longer be a problem. I think it's the *prime* place for it. It obviously doesn't matter if you're not affected by $p

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Petr Jelinek
On 25/04/17 17:01, Bruce Momjian wrote: > >> I also wonder if ability to run SQL queries on walsender connected to a >> database is worth mentioning (replication=database kind of connection). > > Uh, why would that be important to users? Because every tool that uses logical decoding to capture c

Re: [HACKERS] scram and \password

2017-04-25 Thread Robert Haas
On Tue, Apr 25, 2017 at 11:26 AM, Heikki Linnakangas wrote: > algorithm as argument. But there are open decisions on what the old > PQencryptPassword() function should do, and also what the new function > should do by default, if you don't specify an algorithm: > > A) Have PQencryptPassword() retu

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-04-25 Thread Peter Eisentraut
On 4/21/17 00:11, Michael Paquier wrote: > Hmm. I have been actually looking at this solution and I am having > doubts regarding its robustness. In short this would need to be > roughly a two-step process: > - In PostmasterStateMachine(), SIGUSR2 is sent to the checkpoint to > make it call Shutdown

Re: [HACKERS] scram and \password

2017-04-25 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 25, 2017 at 11:26 AM, Heikki Linnakangas wrote: >> A) Have PQencryptPassword() return an md5 hash. >> >> B) Have PQencryptPassword() return a SCRAM verifier >> >> C) Have PQencryptPassword() return a SCRAM verifier if connected to a v10 >> server, and an md5 ha

Re: [HACKERS] Separation walsender & normal backends

2017-04-25 Thread Andres Freund
On 2017-04-25 10:34:20 -0400, Tom Lane wrote: > Andres Freund writes: > > I've for a while suspected that the separation & duplication of > > infrastructure between walsenders and normal backends isn't nice. > > I think we should consider a more radical solution: trying to put > general SQL query

Re: [HACKERS] subscription worker doesn't start immediately on eabled

2017-04-25 Thread Peter Eisentraut
On 4/6/17 08:24, Kyotaro HORIGUCHI wrote: > The attached patch wakes up launcher when a subscription is > enabled. This fails when a subscription is enabled immedaitely > after disabling but it won't be a matter. committed, thanks -- Peter Eisentraut http://www.2ndQuadrant.com/ Post

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Claudio Freire
On Tue, Apr 25, 2017 at 2:45 PM, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 10:37:48AM -0700, Andres Freund wrote: >> On 2017-04-25 13:11:32 -0400, Bruce Momjian wrote: >> > I don't think this warrants inclusion in the release notes for reasons >> > already discussed. The vacuum truncation op

Re: [HACKERS] Declarative partitioning - another take

2017-04-25 Thread Robert Haas
On Mon, Apr 24, 2017 at 6:43 AM, Amit Langote wrote: > The reason it doesn't work is that we do not allocate ResultRelInfos for > partitioned tables (not even for the root partitioned table in the > update/delete cases), because the current implementation assumes they are > not required. That's f

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Tels
On Tue, April 25, 2017 1:21 pm, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 01:06:05PM -0400, Tels wrote: >> Moin, >> >> On Mon, April 24, 2017 9:31 pm, Bruce Momjian wrote: >> > I have committed the first draft of the Postgres 10 release notes. >> They >> > are current as of two days ago, and

Re: [HACKERS] Re: logical replication and PANIC during shutdown checkpoint in publisher

2017-04-25 Thread Peter Eisentraut
On 4/20/17 11:30, Peter Eisentraut wrote: > On 4/19/17 23:04, Noah Misch wrote: >> This PostgreSQL 10 open item is past due for your status update. Kindly send >> a status update within 24 hours, and include a date for your subsequent >> status >> update. Refer to the policy on open item ownersh

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 08:12:05PM +0200, Petr Jelinek wrote: > On 25/04/17 17:01, Bruce Momjian wrote: > > > >> I also wonder if ability to run SQL queries on walsender connected to a > >> database is worth mentioning (replication=database kind of connection). > > > > Uh, why would that be impor

Re: [HACKERS] Interval for launching the table sync worker

2017-04-25 Thread Peter Eisentraut
On 4/20/17 15:36, Peter Eisentraut wrote: > On 4/19/17 23:02, Noah Misch wrote: >> This PostgreSQL 10 open item is past due for your status update. Kindly send >> a status update within 24 hours, and include a date for your subsequent >> status >> update. Refer to the policy on open item ownersh

Re: [HACKERS] PG 10 release notes

2017-04-25 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 03:17:29PM -0400, Tels wrote: > > I think all that was missing was "time": > > > > By default planning and execution time is display by > > EXPLAIN ANALYZE and not display in other cases. > > The new EXPLAIN option SUMMARY allows > > explicit

  1   2   >