Re: [HACKERS] On Complex Source Code Reading Strategy

2017-08-02 Thread Zeray Kalayu
On Wed, Aug 2, 2017 at 9:30 PM, Michael Paquier wrote: > On Wed, Aug 2, 2017 at 7:24 AM, Zeray Kalayu wrote: >> Lastly, I strongly believe that Code is the ultimate truth and being >> able to understand complex and high quality code effectively

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Ashutosh Bapat
On Wed, Aug 2, 2017 at 11:15 PM, Alvaro Herrera wrote: > Alvaro Herrera wrote: >> I think pg_class is a reasonable place to put more generic relkind lists >> alongside a matching error message for each, rather than specialized >> "does this relkind have storage" macros.

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-02 Thread Shay Rojansky
One more note: https://github.com/netty/netty/pull/5321/files is an equivalent PR setting the session ID context to a constant value in netty (which is also a server using OpenSSL). This is in line with the documentation on SSL_CTX_set_session_id_context (

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-02 Thread Shay Rojansky
> > Shay Rojansky writes: > > Once again, I manged to make the error go away simply by setting the > > session id context, which seems to be a mandatory server-side step for > > properly support session tickets. > > The fact that you made the error go away doesn't make this a good

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-02 Thread Amit Khandekar
On 3 August 2017 at 11:00, Amit Langote wrote: > Thanks for the review. > > On 2017/08/03 13:54, Amit Khandekar wrote: >> On 2 August 2017 at 11:51, Amit Langote wrote: >>> On 2017/08/02 1:33, Amit Khandekar wrote: Instead of callers of

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Ashutosh Bapat
On Wed, Aug 2, 2017 at 10:28 PM, Tom Lane wrote: > Robert Haas writes: >> I've thought about this kind of thing, too. But the thing is that >> most of these macros you're proposing to introduce only get used in >> one place. > > I think the value would

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Ashutosh Bapat
On Wed, Aug 2, 2017 at 8:47 PM, Robert Haas wrote: > On Mon, Jul 3, 2017 at 3:52 AM, Ashutosh Bapat > wrote: >>> I noticed, that >>> after we introduced RELKIND_PARTITIONED_TABLE, we required to change a >>> number of conditions to include

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-02 Thread Amit Langote
Thanks for the review. On 2017/08/03 13:54, Amit Khandekar wrote: > On 2 August 2017 at 11:51, Amit Langote wrote: >> On 2017/08/02 1:33, Amit Khandekar wrote: >>> Instead of callers of map_partition_varattnos() reporting error, we >>> can have map_partition_varattnos() itself report error.

Re: [HACKERS] Unused variable scanned_tuples in LVRelStats

2017-08-02 Thread Masahiko Sawada
On Wed, Aug 2, 2017 at 11:40 PM, Robert Haas wrote: > On Tue, Jul 4, 2017 at 10:13 PM, Masahiko Sawada > wrote: >> scanned_tuples variable in LVRelStats is introduced by commit b4b6923e >> but it seems to me that it's actually not used. We store

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-02 Thread Amit Langote
On 2017/08/02 20:35, Robert Haas wrote: > On Tue, Aug 1, 2017 at 9:44 PM, Amit Langote > wrote: >> I too dislike the shape of attachRel. How about we rename attachRel to >> attachrel? So, attachrel_children, attachrel_constr, etc. It's still >> long though... :)

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-02 Thread Amit Khandekar
On 2 August 2017 at 11:51, Amit Langote wrote: > Thanks Fuita-san and Amit for reviewing. > > On 2017/08/02 1:33, Amit Khandekar wrote: >> On 1 August 2017 at 15:11, Etsuro Fujita wrote: >>> On 2017/07/31 18:56, Amit Langote wrote:

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote > wrote: >> Attached is a patch. I think this could be considered a bug-fix, >> backpatchable to 9.6 which introduced this behavior change [1]. > I could go either way on

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-02 Thread Amit Langote
Thanks Jeevan for looking at this. See comments below. On 2017/08/02 19:04, Jeevan Ladhe wrote: > On Wed, Aug 2, 2017 at 10:26 AM, Amit Langote wrote: >> The patch's job is simple: >> >> - Remove the check in the parser that causes an error the moment the >> ON CONFLICT clause is found. >> >>

Re: [HACKERS] fixing pg_upgrade strings (was Re: pgsql: Add new files to nls.mk and add translation)

2017-08-02 Thread Tom Lane
Alvaro Herrera writes: > It does this: > pg_fatal("You must identify the directory where the %s.\n" > "Please use the %s command-line option or the %s > environment variable.\n", > description, cmdLineOption,

Re: [HACKERS] [COMMITTERS] pgsql: Fix pg_dump's errno checking for zlib I/O

2017-08-02 Thread Tom Lane
Alvaro Herrera writes: > Alvaro Herrera wrote: >> Fix pg_dump's errno checking for zlib I/O > So this broke a few buildfarm members. I'll into it tomorrow. I think you forgot to consider the !HAVE_LIBZ case. regards, tom lane -- Sent via

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-08-02 Thread Noah Misch
On Wed, Jun 21, 2017 at 06:44:09PM -0400, Tom Lane wrote: > Today, lorikeet failed with a new variant on the bgworker start crash: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lorikeet=2017-06-21%2020%3A29%3A10 > > This one is even more exciting than the last one, because it sure

[HACKERS] fixing pg_upgrade strings (was Re: pgsql: Add new files to nls.mk and add translation)

2017-08-02 Thread Alvaro Herrera
Peter Eisentraut wrote: > Add new files to nls.mk and add translation markers This reminds me that I noticed a few days ago another really serious broken piece in pg_upgrade where check_required_directory() is incurring in the ugliest case of string building I've ever seen. I didn't have the

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-02 Thread Etsuro Fujita
On 2017/08/03 12:06, Robert Haas wrote: On Wed, Aug 2, 2017 at 2:25 AM, Amit Langote wrote: On 2017/08/02 15:21, Amit Langote wrote: Thanks Fuita-san and Amit for reviewing. Sorry, I meant Fujita-san. Time is growing short here. Is there more review or

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote wrote: > On 2017/08/02 20:40, Robert Haas wrote: >> On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat >> wrote: >>> If the user has specified "not valid" for a constraint on the foreign >>>

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 2:25 AM, Amit Langote wrote: > On 2017/08/02 15:21, Amit Langote wrote: >> Thanks Fuita-san and Amit for reviewing. > > Sorry, I meant Fujita-san. Time is growing short here. Is there more review or coding that needs to be done here? --

Re: [HACKERS] Another comment typo in execMain.c

2017-08-02 Thread Etsuro Fujita
On 2017/08/01 6:09, Peter Eisentraut wrote: On 7/6/17 03:23, Etsuro Fujita wrote: Here is a comment in ExecFindPartition() in execMain.c: /* * First check the root table's partition constraint, if any. No point in * routing the tuple it if it doesn't belong in the root

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Stephen Frost
Noah, On Tue, Aug 1, 2017 at 20:52 Noah Misch wrote: > On Thu, Jul 27, 2017 at 10:27:36AM -0400, Stephen Frost wrote: > > Noah, all, > > > > * Noah Misch (n...@leadboat.com) wrote: > > > This PostgreSQL 10 open item is past due for your status update. > Kindly send > > > a

Re: [HACKERS] [COMMITTERS] pgsql: Fix pg_dump's errno checking for zlib I/O

2017-08-02 Thread Alvaro Herrera
Alvaro Herrera wrote: > Fix pg_dump's errno checking for zlib I/O So this broke a few buildfarm members. I'll into it tomorrow. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Amit Langote
On 2017/08/02 20:40, Robert Haas wrote: > On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat > wrote: >> If the user has specified "not valid" for a constraint on the foreign >> table, there is high chance that s/he is aware of the fact that the >> remote table that

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 9:33 PM, Peter Eisentraut wrote: > On 8/2/17 16:52, Robert Haas wrote: >> I actually don't think it's that unreasonable to get notified when >> system-wide processes like the autovacuum launcher or the logical >> replication launcher start

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Peter Eisentraut
On 8/2/17 16:52, Robert Haas wrote: > I actually don't think it's that unreasonable to get notified when > system-wide processes like the autovacuum launcher or the logical > replication launcher start or stop. But we got rid of those start messages recently due to complaints. -- Peter

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

2017-08-02 Thread Robert Haas
On Mon, Jul 31, 2017 at 9:07 AM, Ashutosh Bapat wrote: > Forgot the patch set. Here it is. The commit message for 0005 isn't really accurate given that it follows 0004. I think you could just flatten 0005 and 0006 into one patch. Reviewing those together: -

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tatsuo Ishii
>> Not really objecting, but an even better fix might be to remove the >> restriction on the order in which the options can be specified. > > Indeed. It doesn't look that hard: AFAICS the problem is just that > process_sql_command() is making premature decisions about whether to > extract

Re: [HACKERS] asynchronous execution

2017-08-02 Thread Kyotaro HORIGUCHI
Thank you for the comment. At Tue, 1 Aug 2017 16:27:41 -0400, Robert Haas wrote in > On Mon, Jul 31, 2017 at 5:42 AM, Kyotaro HORIGUCHI > wrote: > > Another is getting

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tatsuo Ishii
> Not really objecting, but an even better fix might be to remove the > restriction on the order in which the options can be specified. +100 :-) Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp -- Sent via

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2017-08-02 Thread Andres Freund
On 2017-02-10 07:52:57 -0500, Robert Haas wrote: > On Thu, Feb 9, 2017 at 6:38 PM, Thomas Munro > > Up until two minutes ago I assumed that policy would leave only two > > possibilities: you attach to the DSM segment and attach to the > > SharedBufFileManager successfully or you attach to the DSM

Re: [HACKERS] [patch] pg_dump/pg_restore zerror() and strerror() mishap

2017-08-02 Thread Alvaro Herrera
Kunshchikov Vladimir wrote: > Hello Alvaro, > > here goes v4 version: removed unused header. > > Compilation of this code snippet with -Wall -Wexter -std=c89 doesn't produce > any warnings. Great, thanks! I have pushed this to all branches since 9.4. Would you please give it a look? Please

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Andres Freund
On 2017-08-02 17:09:10 -0400, Tom Lane wrote: > Even if we fix that, though, I think it is reasonable to downgrade it to > DEBUG1. We did that already for other standard background processes such > as the autovac launcher, and it's not apparent to me why the logrep > launcher should be chattier.

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Tom Lane
Andres Freund writes: > On 2017-08-02 16:52:01 -0400, Robert Haas wrote: >> I actually don't think it's that unreasonable to get notified when >> system-wide processes like the autovacuum launcher or the logical >> replication launcher start or stop. That's stuff somebody

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Andres Freund
On 2017-08-02 16:52:01 -0400, Robert Haas wrote: > On Wed, Aug 2, 2017 at 4:38 PM, Peter Eisentraut > wrote: > > Maybe it doesn't need to be logged at all (other than perhaps as DEBUG)? > > A few months ago, people were complaining about too many messages about

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 4:38 PM, Peter Eisentraut wrote: > Maybe it doesn't need to be logged at all (other than perhaps as DEBUG)? > A few months ago, people were complaining about too many messages about > background workers starting. Now we are having

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-08-02 Thread Andres Freund
Hi, I think this patch should have a "cover letter" explaining what it's trying to achieve, how it does so and why it's safe/correct. I think it'd also be good to try to show some of the worst cases of this patch (i.e. where the caching only adds overhead, but never gets used), and some of the

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

2017-08-02 Thread Robert Haas
On Mon, Jul 31, 2017 at 7:59 AM, Ashutosh Bapat wrote: > Adding AppendRelInfos to root->append_rel_list as and when they are > created would keep parent AppendRelInfos before those of children. But > that function throws away the AppendRelInfo it created when

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-02 Thread Peter Eisentraut
On 8/1/17 20:20, Andres Freund wrote: > Well, that's how it is for all bgworkers - maybe a better solution is to > adjust that message in the postmaster rather than fiddle with the worker > exist code? Seems like we could easily take pmStatus into account > inside LogChildExit() and set the log

Re: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

2017-08-02 Thread Robert Haas
On Tue, Jul 25, 2017 at 9:54 PM, Kyotaro HORIGUCHI wrote: > The patch is a kind of straightforward and looks fine for me. +1 for this change. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] WIP: Failover Slots

2017-08-02 Thread Robert Haas
On Tue, Jul 25, 2017 at 8:44 PM, Craig Ringer wrote: > No. The whole approach seems to have been bounced from core. I don't agree > and continue to think this functionality is desirable but I don't get to > make that call. I actually think failover slots are quite

Re: [HACKERS] Subscription code improvements

2017-08-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > I wish you'd stop splitting error message strings across multiple lines. > > I've been trapped by a faulty grep not matching a split error message a > > number of times :-( I know by now to remove words

Re: [HACKERS] Subscription code improvements

2017-08-02 Thread Tom Lane
Alvaro Herrera writes: > I wish you'd stop splitting error message strings across multiple lines. > I've been trapped by a faulty grep not matching a split error message a > number of times :-( I know by now to remove words until I get a match, > but it seems an

Re: [HACKERS] Subscription code improvements

2017-08-02 Thread Alvaro Herrera
Petr Jelinek wrote: > I split it into several patches: I wish you'd stop splitting error message strings across multiple lines. I've been trapped by a faulty grep not matching a split error message a number of times :-( I know by now to remove words until I get a match, but it seems an

Re: [HACKERS] Subscription code improvements

2017-08-02 Thread Peter Eisentraut
On 8/1/17 00:17, Noah Misch wrote: > The above-described topic is currently a PostgreSQL 10 open item. Peter, > since you committed the patch believed to have created it, you own this open > item. If some other commit is more relevant or if this does not belong as a > v10 open item, please let

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Peter Eisentraut
On 8/2/17 13:58, Tom Lane wrote: > I notice that the option list already includes some references to > "insert", so maybe "--insert-via-partition-root"? Although you could > argue that that's confusing when we're using COPY. "load" could be more general. But I'm also OK with "restore". --

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 1, 2017 at 10:03 PM, Tatsuo Ishii wrote: >> I found an error message in pgbench is quite confusing. > Not really objecting, but an even better fix might be to remove the > restriction on the order in which the options

Re: [HACKERS] Function Volatility and Views Unexpected Behavior

2017-08-02 Thread Robert Haas
On Wed, Jul 12, 2017 at 3:23 PM, Tom Lane wrote: > David Kohn writes: >> I encountered some unexpected behavior when debugging a query that was >> taking longer than expected, basically, a volatile function that makes a >> column in a view is called even

Re: [HACKERS] Gettting warning message during PostgreSQL-9.5 installation on Windows

2017-08-02 Thread Tom Lane
Ashutosh Sharma writes: > I am getting this warning message when trying to install > PostgreSQL-v9.5 on Windows with Perl-5.22 and above, > Unescaped left brace in regex is deprecated, passed through in regex; > Please note that from perl-5.26 onwards, this is considered as

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 1:58 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: >>> --restore-via-partition-root ? > >> I worry someone will think that pg_dump is now restoring stuff, but it

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Michael Paquier
On Wed, Aug 2, 2017 at 5:50 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Aug 2, 2017 at 10:17 AM, Tom Lane wrote: >>> Or in other words, this looks to me quite a bit like the hackery >>> that resulted in pgbench's -S and -N

Re: [HACKERS] On Complex Source Code Reading Strategy

2017-08-02 Thread Michael Paquier
On Wed, Aug 2, 2017 at 7:24 AM, Zeray Kalayu wrote: > Lastly, I strongly believe that Code is the ultimate truth and being > able to understand complex and high quality code effectively and > strategically is of paramount importance. Documentation to understand how a system

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread David G. Johnston
On Wed, Aug 2, 2017 at 10:58 AM, Tom Lane wrote: > Robert Haas writes: > > On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: > >> --restore-via-partition-root ? > > > I worry someone will think that pg_dump is now restoring stuff,

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Tom Lane
Alvaro Herrera writes: > Peter Eisentraut wrote: >> The actual error, from the perspective of the user, is something like >> ERROR: "someview" is a view >> DETAIL: Views cannot have constraints. > OK. "%s is a %s" is a reasonable set of errors -- we just need one for >

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: >> --restore-via-partition-root ? > I worry someone will think that pg_dump is now restoring stuff, but it isn't. Well, the point is that the commands it emits will cause the

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Mon, Jul 31, 2017 at 9:13 PM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > >> > * Noah Misch

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Michael Paquier
On Mon, Jul 31, 2017 at 9:13 PM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: >> > * Noah Misch (n...@leadboat.com) wrote: >> >> This PostgreSQL 10 open item is past due for

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Alvaro Herrera
Peter Eisentraut wrote: > I don't find this style of error message optimal anyway. If I do, for > example > > ALTER TABLE someview ADD CONSTRAINT ... > ERROR: "someview" is not a table, foreign table, whatever > > then this information is not helpful. It's not like I'm going to turn > my view

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: > Robert Haas writes: >> The patch itself looks just fine on a quick glance, modulo the lack of >> documentation, but I think we need to bikeshed the name of the flag. >> --reload-through-root is clear as

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Alvaro Herrera
Alvaro Herrera wrote: > I think pg_class is a reasonable place to put more generic relkind lists > alongside a matching error message for each, rather than specialized > "does this relkind have storage" macros. What about something like a > struct list in pg_class.h, I just noticed that this

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Peter Eisentraut
On 8/2/17 13:28, Alvaro Herrera wrote: > I think pg_class is a reasonable place to put more generic relkind lists > alongside a matching error message for each, rather than specialized > "does this relkind have storage" macros. What about something like a > struct list in pg_class.h, > > { >

Re: [HACKERS] why not parallel seq scan for slow functions

2017-08-02 Thread Jeff Janes
On Wed, Jul 12, 2017 at 7:08 PM, Amit Kapila wrote: > On Wed, Jul 12, 2017 at 11:20 PM, Jeff Janes wrote: > > On Tue, Jul 11, 2017 at 10:25 PM, Amit Kapila > > wrote: > >> > >> On Wed, Jul 12, 2017 at 1:50 AM, Jeff Janes

Re: [HACKERS] Walsender timeouts and large transactions

2017-08-02 Thread Yura Sokolov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested There is no check for (last_reply_timestamp <= 0 || wal_sender_timeout

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Alvaro Herrera
I think pg_class is a reasonable place to put more generic relkind lists alongside a matching error message for each, rather than specialized "does this relkind have storage" macros. What about something like a struct list in pg_class.h, { { relkinds_r_i_T, { 'r', 'i', 'T' },

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Tom Lane
Robert Haas writes: > The patch itself looks just fine on a quick glance, modulo the lack of > documentation, but I think we need to bikeshed the name of the flag. > --reload-through-root is clear as daylight to me, but I'm not sure > users will agree. The lack of the

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 12:34 PM, Tom Lane wrote: > Of course. It's also a heck of a lot more flexible. Adding on another > ad-hoc option that does the minimum possible amount of work needed to > address one specific problem is always going to be less work; but after > we

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Tom Lane
Robert Haas writes: > I've thought about this kind of thing, too. But the thing is that > most of these macros you're proposing to introduce only get used in > one place. I think the value would be in having a centralized checklist of

Re: [HACKERS] Re: [BUGS] BUG #14758: Segfault with logical replication on a function index

2017-08-02 Thread Peter Eisentraut
On 8/1/17 16:29, Peter Eisentraut wrote: > On 8/1/17 00:21, Noah Misch wrote: >> On Mon, Jul 31, 2017 at 09:40:34AM +0900, Masahiko Sawada wrote: >>> On Sat, Jul 29, 2017 at 4:35 AM, Scott Milliken wrote: Thank you Masahiko! I've tested and confirmed that this patch fixes

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 2, 2017 at 11:50 AM, Tom Lane wrote: >> Well, I'm imagining that "-i" would essentially become a short form >> of "-b initialize", as already happened for -S and -N, where the script >> looks something like ... > I

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 11:50 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Aug 2, 2017 at 10:17 AM, Tom Lane wrote: >>> Or in other words, this looks to me quite a bit like the hackery >>> that resulted in pgbench's -S and -N

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 2, 2017 at 10:17 AM, Tom Lane wrote: >> Or in other words, this looks to me quite a bit like the hackery >> that resulted in pgbench's -S and -N options, before we figured out >> that making it scriptable was a better

Re: [HACKERS] pgsql 10: hash indexes testing

2017-08-02 Thread Robert Haas
On Wed, Jul 12, 2017 at 1:10 AM, Amit Kapila wrote: >>> Yes, I also think the same idea can be used, in fact, I have mentioned >>> it [1] as soon as you have committed that patch. Do we want to do >>> anything at this stage for PG-10? I don't think we should attempt >>>

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Fabien COELHO
Hello Tatsuo-san, I found an error message in pgbench is quite confusing. pgbench -S -M extended -c 1 -T 30 test query mode (-M) should be specified before any transaction scripts (-f or -b) Since there's no -f or -b option is specified, users will be confused. Indeed. Actually the error

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-02 Thread Robert Haas
On Mon, Jul 3, 2017 at 3:52 AM, Ashutosh Bapat wrote: >> I noticed, that >> after we introduced RELKIND_PARTITIONED_TABLE, we required to change a >> number of conditions to include this relkind. We missed some places in >> initial commits and fixed those later.

Re: [HACKERS] [TRAP: FailedAssertion] causing server to crash

2017-08-02 Thread Robert Haas
On Fri, Jul 21, 2017 at 1:31 AM, Thomas Munro wrote: > Thanks Neha. It's be best to post the back trace and if possible > print oldestXact and ShmemVariableCache->oldestXid from the stack > frame for TruncateCLOG. > > The failing assertion in TruncateCLOG() has a

Re: [HACKERS] typo for using "OBJECT_TYPE" for "security label on domain" in "gram.y"

2017-08-02 Thread Peter Eisentraut
On 8/2/17 08:21, Robert Haas wrote: > On Wed, Aug 2, 2017 at 6:04 AM, 高增琦 wrote: >> Commit: 3f88672a4e4d8e648d24ccc65937da61c7660854 add "security label on >> domain" >> in "gram.y", and set "objtype" to "OBJECT_TYPE". >> >> Is this a typo? > > Looks like it. Fix committed to

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 10:17 AM, Tom Lane wrote: > Sure, but "no indexes at all" is hardly ever the real goal, is it? Right. > So the switch as proposed is only solving part of your problem. > I'd rather see a solution that addresses a larger range of desires. That's

Re: [HACKERS] Unused variable scanned_tuples in LVRelStats

2017-08-02 Thread Robert Haas
On Tue, Jul 4, 2017 at 10:13 PM, Masahiko Sawada wrote: > scanned_tuples variable in LVRelStats is introduced by commit b4b6923e > but it seems to me that it's actually not used. We store num_tuples > into vacrelstats->scanned_tuples after scanned all blocks, and the >

Re: [HACKERS] Domains and arrays and composites, oh my

2017-08-02 Thread Robert Haas
On Thu, Jul 13, 2017 at 3:42 PM, Tom Lane wrote: > Yeah, it does, although I'm not sure how intuitive it is that the > parentheses are significant ... > > regression=# select fdc.* from fdc(); > fdc > --- > (1,2) > (1 row) > > regression=# select (fdc).* from fdc(); >

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Tom Lane
Robert Haas writes: > I've actually wanted this exact thing multiple times: most recently, > to make a non-unique btree index instead of a unique one, and to make > a hash index instead of a btree one. I don't object to a modest > effort at coming up with a more general

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 1:01 AM, Rushabh Lathia wrote: > Looking at the dbObjectTypePriority comments that seems like data > restoration > will *absolutely always* follow all CREATE TABLE commands. Hmm. I wasn't very convinced by those comments, but Tom's commit

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 9:41 AM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Aug 1, 2017 at 9:49 PM, Masahiko Sawada >> wrote: >>> I'd like to propose a new option -I for pgbench command which skips >>> the creating primary

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Tatsuo Ishii
> I think we could probably do without this ... if you want a non-default > test setup, why do you need to use "pgbench -i" to create it? > > It's not that there's anything greatly wrong with this particular idea, > it's just that pgbench has too many switches already, and omitting random >

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 1, 2017 at 9:49 PM, Masahiko Sawada wrote: >> I'd like to propose a new option -I for pgbench command which skips >> the creating primary keys after initialized tables. > I support adding an option for this, but I

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Masahiko Sawada
On Wed, Aug 2, 2017 at 10:25 PM, Robert Haas wrote: > On Tue, Aug 1, 2017 at 9:49 PM, Masahiko Sawada wrote: >> I'd like to propose a new option -I for pgbench command which skips >> the creating primary keys after initialized tables. This option is

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-02 Thread Robert Haas
On Tue, Aug 1, 2017 at 9:49 PM, Masahiko Sawada wrote: > I'd like to propose a new option -I for pgbench command which skips > the creating primary keys after initialized tables. This option is > useful for users who want to do bench marking with no index or indexes > other

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Robert Haas
On Tue, Aug 1, 2017 at 10:03 PM, Tatsuo Ishii wrote: > I found an error message in pgbench is quite confusing. > > pgbench -S -M extended -c 1 -T 30 test > query mode (-M) should be specified before any transaction scripts (-f or -b) > > Since there's no -f or -b option is

Re: [HACKERS] typo for using "OBJECT_TYPE" for "security label on domain" in "gram.y"

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 6:04 AM, 高增琦 wrote: > Commit: 3f88672a4e4d8e648d24ccc65937da61c7660854 add "security label on > domain" > in "gram.y", and set "objtype" to "OBJECT_TYPE". > > Is this a typo? Looks like it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The

Re: [HACKERS] Red-Black tree traversal tests

2017-08-02 Thread Victor Drobny
I forgot to attach the patch. Sorry. Here it is. -- -- Victor Drobny Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git a/src/test/modules/Makefile b/src/test/modules/Makefile index 3ce9904..b7ed0af 100644 --- a/src/test/modules/Makefile +++

Re: [HACKERS] Red-Black tree traversal tests

2017-08-02 Thread Victor Drobny
Hello, Thank you for the reviewing. If it's not too much trouble perhaps you could write a few more test so we would have 100% test coverage for rbtree, could modify it safely and be sure that it actually works when someone will need the rest of its functionality? Done. Now all of the

Re: [HACKERS] Proposal for CSN based snapshots

2017-08-02 Thread Alexander Kuzmenkov
What problem exactly you are seeing in the clog, is it the contention around CLOGControlLock or generally accessing CLOG is slower. If former, then we already have a patch [1] to address it. It's the contention around CLogControlLock. Thank you for the pointer, next time I'll try it with the

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat wrote: > If the user has specified "not valid" for a constraint on the foreign > table, there is high chance that s/he is aware of the fact that the > remote table that the foreign table points to has some rows which

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-02 Thread Robert Haas
On Tue, Aug 1, 2017 at 9:44 PM, Amit Langote wrote: > I too dislike the shape of attachRel. How about we rename attachRel to > attachrel? So, attachrel_children, attachrel_constr, etc. It's still > long though... :) OK, I can live with that, I guess. -- Robert

Re: [HACKERS] UPDATE of partition key

2017-08-02 Thread Amit Khandekar
On 2 August 2017 at 14:38, Amit Langote wrote: > On 2017/07/29 2:45, Amit Khandekar wrote: >> On 28 July 2017 at 20:10, Robert Haas wrote: >>> On Wed, Jul 26, 2017 at 2:13 AM, Amit Langote wrote: I checked that we get the same result

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-08-02 Thread Mithun Cy
On Wed, Aug 2, 2017 at 3:42 PM, Mithun Cy wrote: Sorry, there was an unnecessary header included in proc.c which should be removed adding the corrected patch. -- Thanks and Regards Mithun C Y EnterpriseDB: http://www.enterprisedb.com

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-08-02 Thread Mithun Cy
I have made few more changes with the new patch. 1. Ran pgindent. 2. Instead of an atomic state variable to make only one process cache the snapshot in shared memory, I have used conditional try lwlock. With this, we have a small and reliable code. 3. Performance benchmarking Machine - cthulhu

Re: [HACKERS] Parallel Hash take II

2017-08-02 Thread Thomas Munro
On Tue, Aug 1, 2017 at 1:11 PM, Andres Freund wrote: > WRT the main patch: Thanks for the review. I will respond soon, but for now I just wanted to post a rebased version (no changes) because v16 no longer applies. -- Thomas Munro http://www.enterprisedb.com

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-02 Thread Jeevan Ladhe
I applied the patch on latest master sources and the patch applies cleanly. The documentation is built without errors. We do not support following syntax for 'do nothing': postgres=# insert into parted_conflict_test values (1, 'a') on conflict (b) do nothing; ERROR: there is no unique or

[HACKERS] typo for using "OBJECT_TYPE" for "security label on domain" in "gram.y"

2017-08-02 Thread 高增琦
Commit: 3f88672a4e4d8e648d24ccc65937da61c7660854 add "security label on domain" in "gram.y", and set "objtype" to "OBJECT_TYPE". Is this a typo? -- GaoZengqi pgf...@gmail.com zengqi...@gmail.com

Re: [HACKERS] How to run PG TAP tests on windows?

2017-08-02 Thread Abbas Butt
On Tue, Aug 1, 2017 at 7:35 PM, Michael Paquier wrote: > On Tue, Aug 1, 2017 at 10:24 AM, Abbas Butt > wrote: > > Can anyone point out to a tutorial or a list of steps required to run PG > TAP > > tests on windows? > > Only MSVC has a

  1   2   >