Re: [HACKERS] Hash Functions

2017-05-17 Thread Jeff Davis
On Wed, May 17, 2017 at 12:10 PM, Robert Haas wrote: > 1. To handle dump-and-reload the way we partitioning does today, hash > functions would need to be portable across encodings. > 2. That's impractically difficult. > 3. So let's always load data through the top-parent. >

Re: [HACKERS] 10beta1 sequence regression failure on sparc64

2017-05-17 Thread Christoph Berg
Re: Tom Lane 2017-05-17 <30016.1495041...@sss.pgh.pa.us> > Christoph Berg writes: > > The sequence regression tests are failing on Debian/sparc64: > > ... > > (This is only the last 100 lines of regression.diffs, if it helps I > > can try rebuilding and grabbing the full file.)

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-05-17 Thread Vaishnavi Prabakaran
On Thu, May 18, 2017 at 2:56 AM, Surafel Temesgen wrote: > Sorry for being very late. I also think guc version of the patch can be > acceptable and useful. > > I modified the patch as such and added to commitfest 2017-07. > > > You need documentation changes in "libpq - C

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-05-17 Thread Masahiko Sawada
On Thu, May 18, 2017 at 7:38 AM, Bossart, Nathan wrote: > I’ve attached a v4 of the patch. > > Changes: > - Early in vacuum(…), emit an ERROR if any specified columns do not exist. > - Emit a WARNING and skip any specified tables or columns that disappear > before they are

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Michael Paquier
On Thu, May 18, 2017 at 12:07 PM, Tsunakawa, Takayuki wrote: > From: Tom Lane [mailto:t...@sss.pgh.pa.us] >> Maybe add this to the list of open issues to reconsider mid-beta? > > Done. I'll examine whether we can use SQLSTATE. Does JDBC use something like that to

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-17 Thread Thomas Munro
On Thu, May 11, 2017 at 1:48 PM, Michael Paquier wrote: > I had my eyes on the WAL sender code this morning, and I have noticed > that walsender.c is not completely consistent with the PID lookups it > does in walsender.c. In two code paths, the PID value is checked >

Re: [HACKERS] [POC] hash partitioning

2017-05-17 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 11:51 PM, Robert Haas wrote: > On Wed, May 17, 2017 at 1:41 AM, Ashutosh Bapat > wrote: >>> Fixed in the attached version; used "hash partition remainder must be >>> greater than or equal to 0" instead. >> >> I

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Amit Kapila
On Wed, May 17, 2017 at 5:17 PM, Robert Haas wrote: > On Wed, May 17, 2017 at 6:29 AM, Amit Kapila wrote: >> I think we can do this even without using an additional infomask bit. >> As suggested by Greg up thread, we can set InvalidBlockId in ctid

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-17 Thread Masahiko Sawada
On Thu, May 18, 2017 at 1:00 AM, Peter Eisentraut wrote: > On 5/17/17 05:15, Masahiko Sawada wrote: >> BTW, why should max_replication_slots be set more than 0 even on the >> subscriber side? It's documented but I could not understand reason. > > Because that

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-17 Thread Masahiko Sawada
On Thu, May 18, 2017 at 11:29 AM, Peter Eisentraut wrote: > On 5/12/17 00:30, Masahiko Sawada wrote: >> I got same log messages 'starting logical replication worker for >> subscription' total 5 times but actually 4 of them mean to launch >> table sync worker and

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tsunakawa, Takayuki
From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sure, but part of the point of beta testing is to get user feedback. Yes, and I'm also proposing this in the user's point of view, which I believe holds true for people here. I'm worried from my support experience that strict customers would

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-17 Thread Masahiko Sawada
On Thu, May 18, 2017 at 10:33 AM, Peter Eisentraut wrote: > On 5/16/17 22:21, Masahiko Sawada wrote: >> I think there are two bugs; pg_dump should dump slot_name = NONE >> instead of '' and subscription should not be created if given slot >> name is invalid. The

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-17 Thread Peter Eisentraut
On 5/12/17 00:30, Masahiko Sawada wrote: > I got same log messages 'starting logical replication worker for > subscription' total 5 times but actually 4 of them mean to launch > table sync worker and another one means apply worker. We cannot > distinguish them. Also, I got same log messages

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-17 Thread Michael Paquier
On Wed, May 17, 2017 at 12:14 AM, Robert Haas wrote: > Well, it's probably worth changing for consistency, but I'm not sure > that it rises to the level of "a very bad idea". It actually seems > almost entirely harmless. Spuriously setting the needreload flag on a >

Re: [HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Amit Langote
On 2017/05/18 3:43, Robert Haas wrote: > On Wed, May 17, 2017 at 5:38 AM, Jeevan Ladhe > wrote: >> While browsing through the partitioning code, I noticed that a recent commit >> f8bffe9e6d700fd34759a92e47930ce9ba7dcbd5, which fixes multi-column range >>

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-05-17 Thread Michael Paquier
On Thu, May 18, 2017 at 12:06 AM, Bossart, Nathan wrote: > I agree with you here, too. I stopped short of allowing customers to > explicitly provide per-table options, so the example you provided wouldn’t > work here. This is more applicable for something like the

[HACKERS] Re: [BUGS] BUG #14657: Server process segmentation fault in v10, May 10th dev snapshot

2017-05-17 Thread Amit Langote
On 2017/05/18 10:49, Amit Langote wrote: > On 2017/05/18 2:14, Dilip Kumar wrote: >> On Wed, May 17, 2017 at 7:41 PM, wrote: >>> (gdb) bt >>> #0 0x0061ab1b in list_nth () >>> #1 0x005e4081 in ExecLockNonLeafAppendTables () >>> #2 0x005f4d52

Re: [HACKERS] postgres_fdw aggregation pushdown has collation change in 10beta.

2017-05-17 Thread Ashutosh Bapat
On Thu, May 18, 2017 at 12:37 AM, Jeff Janes wrote: > It is shipping collation-sensitive aggregates between servers which have > different collations. > > commit 7012b132d07c2b4ea15b0b3cb1ea9f3278801d98 > Author: Robert Haas > Date: Fri Oct 21

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-17 Thread Peter Eisentraut
On 5/16/17 22:21, Masahiko Sawada wrote: > I think there are two bugs; pg_dump should dump slot_name = NONE > instead of '' and subscription should not be created if given slot > name is invalid. The validation check for replication slot name is > done when creating it actually but I think it's

Re: [HACKERS] PG10 pgindent run

2017-05-17 Thread Bruce Momjian
On Tue, May 16, 2017 at 09:00:38PM -0400, Bruce Momjian wrote: > On Tue, May 16, 2017 at 08:39:36PM -0400, Tom Lane wrote: > > Andres Freund writes: > > > There we go: > > >

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-17 Thread Thomas Munro
On Wed, May 17, 2017 at 7:42 PM, Thomas Munro wrote: > On Wed, May 17, 2017 at 6:04 PM, Amit Langote > wrote: >> targetRelInfo should instead be set to mtstate->rootResultRelInfo that was >> set in ExecInitModifyTable() as described

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: > Piotr Stefaniak wrote: >> If I remember correctly, it tries to right-align string literals to >> whatever -l ("Maximum length of an output line") was set to. > Yeah, it does that (for error messages too). Piotr's version seems to at least do

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Piotr Stefaniak writes: > Full copy of my pgindent attached. Changes commented below. Thanks! I ran this, along with the indent copy I pulled from your github repo a couple hours ago, over the current PG tree (post Bruce's run). I got a diff extending to about

[HACKERS] Re: Event triggers + table partitioning cause server crash in current master

2017-05-17 Thread Noah Misch
On Mon, May 15, 2017 at 03:02:54PM +0900, Amit Langote wrote: > On 2017/05/14 12:03, Mark Dilger wrote: > > I discovered a reproducible crash using event triggers in the current > > development version, 29c7d5e483acaa74a0d06dd6c70b320bb315. > > I was getting a crash before this version, and

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Alvaro Herrera
Piotr Stefaniak wrote: > On 2017-05-17 17:55, Peter Eisentraut wrote: > > On 5/17/17 10:14, Tom Lane wrote: > >> What I was concerned about was that pgindent will reindent the second > >> line so that it's impossible to tell whether the spacing is correct. > > > > pgindent moving string

Re: [HACKERS] Pulling up more complicated subqueries

2017-05-17 Thread David Rowley
On 18 May 2017 at 04:30, Robert Haas wrote: > On Wed, May 17, 2017 at 11:08 AM, Heikki Linnakangas wrote: >> That's not a straight semi-join, but we could still turn it into a new kind >> of LEFT-SEMI join. A left-semi join is like a left join, in that it

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Piotr Stefaniak
On 2017-05-17 17:55, Peter Eisentraut wrote: > On 5/17/17 10:14, Tom Lane wrote: >> What I was concerned about was that pgindent will reindent the second >> line so that it's impossible to tell whether the spacing is correct. > > pgindent moving string continuations to the left is a completely >

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Piotr Stefaniak
On 2017-05-17 22:11, Tom Lane wrote: > Piotr Stefaniak writes: >> The third significant issue I kept in my mind was to shift some >> work-arounds from pgindent to indent. > > Yeah, I was wondering about that too. > >> When I use my indent as the base >> for pgindent

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Piotr Stefaniak writes: > The third significant issue I kept in my mind was to shift some > work-arounds from pgindent to indent. Yeah, I was wondering about that too. > When I use my indent as the base > for pgindent and set its options like this: > -bad -bap -bc

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Piotr Stefaniak writes: > That, I assume, would be me. Coincidentally, I'm about to push my fixes > upstream (FreeBSD). Before that happens, my changes can be obtained from > https://github.com/pstef/freebsd_indent and tested, if anyone wishes. Do you have

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Piotr Stefaniak
On 2017-05-17 20:31, Tom Lane wrote: > Piotr Stefaniak writes: >> On 2017-05-17 19:16, Alvaro Herrera wrote: >>> We have someone who has studied the BSD indent code and even sent us >>> patches to fix quite a few bugs, but we've largely ignored his efforts >>> so far.

[HACKERS] 10beta1/m68k: static assertion failed: "MAXALIGN too small to fit int32"

2017-05-17 Thread Christoph Berg
Not sure if a lot of people still care about m68k, but it's still one of the unofficial Debian ports (it used to be the first non-x86 port done decades ago): gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security

Re: [HACKERS] Hash Functions

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 2:35 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, May 16, 2017 at 4:25 PM, Jeff Davis wrote: >>> Why can't hash partitions be stored in tables the same way as we do TOAST? >>> That should take care of

[HACKERS] postgres_fdw aggregation pushdown has collation change in 10beta.

2017-05-17 Thread Jeff Janes
It is shipping collation-sensitive aggregates between servers which have different collations. commit 7012b132d07c2b4ea15b0b3cb1ea9f3278801d98 Author: Robert Haas Date: Fri Oct 21 09:54:29 2016 -0400 postgres_fdw: Push down aggregates to remote servers. I've

Re: [HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Jeevan Ladhe
On Thu, May 18, 2017 at 12:13 AM, Robert Haas wrote: > > Agreed. Committed your patch. > Thanks Robert!

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Andres Freund
On 2017-05-17 14:44:31 -0400, Tom Lane wrote: > $ tar xfz ~/archive/pg_bsd_indent-1.3.tar.gz > $ wc pg_bsd_indent/* > 38122928 pg_bsd_indent/Makefile >107831 4835 pg_bsd_indent/README >508 1743 11988 pg_bsd_indent/args.c >569 2727 14732 pg_bsd_indent/indent.1 >

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Andres Freund writes: > On 2017-05-17 13:35:22 -0400, Tom Lane wrote: >> Not sure about actually incorporating it into our repo. Doing so would >> make it easier for people to use, for sure, and the license seems to be >> regular 3-clause BSD, so that angle is OK. But do we

Re: [HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 5:38 AM, Jeevan Ladhe wrote: > While browsing through the partitioning code, I noticed that a recent commit > f8bffe9e6d700fd34759a92e47930ce9ba7dcbd5, which fixes multi-column range > partitioning constraints, introduced a function

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Not sure about actually incorporating it into our repo. Doing so would >> make it easier for people to use, for sure, and the license seems to be >> regular 3-clause BSD, so that angle is OK. But do we want to be carrying >>

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Andres Freund
On 2017-05-17 13:35:22 -0400, Tom Lane wrote: > Not sure about actually incorporating it into our repo. Doing so would > make it easier for people to use, for sure, and the license seems to be > regular 3-clause BSD, so that angle is OK. But do we want to be carrying > around another 150K of

Re: [HACKERS] Hash Functions

2017-05-17 Thread Tom Lane
Robert Haas writes: > On Tue, May 16, 2017 at 4:25 PM, Jeff Davis wrote: >> Why can't hash partitions be stored in tables the same way as we do TOAST? >> That should take care of the naming problem. > Hmm, yeah, something like that could be done, but

pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Piotr Stefaniak writes: > On 2017-05-17 19:16, Alvaro Herrera wrote: >> We have someone who has studied the BSD indent code and even sent us >> patches to fix quite a few bugs, but we've largely ignored his efforts >> so far. I propose we take that indent as part of

Re: [HACKERS] PROVE_FLAGS

2017-05-17 Thread Robert Haas
On Tue, May 16, 2017 at 9:20 PM, Andrew Dunstan wrote: > Inheriting variables from the environment is a part of make by design. > We have PG_PROVE_FLAGS for our own forced settings. I don't buy this argument. We've had previous cases where we've gone through and

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Bruce Momjian writes: > > Are we ready for a pgindent run now? > > Yes, might as well do it. Some of these discussions might lead to > a re-run with a newer version of pgindent, but it would be good to > have a clean tree to

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > We have someone who has studied the BSD indent code and even sent us > > patches to fix quite a few bugs, but we've largely ignored his efforts > > so far. I propose we take that indent as part of our repo, and patch it > >

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Bruce Momjian writes: > Are we ready for a pgindent run now? Yes, might as well do it. Some of these discussions might lead to a re-run with a newer version of pgindent, but it would be good to have a clean tree to start from. regards, tom lane --

Re: [HACKERS] [POC] hash partitioning

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 1:41 AM, Ashutosh Bapat wrote: >> Fixed in the attached version; used "hash partition remainder must be >> greater than or equal to 0" instead. > > I would suggest "non-zero positive", since that's what we are using in > the documentation.

Re: [HACKERS] Hash Functions

2017-05-17 Thread Robert Haas
On Tue, May 16, 2017 at 4:25 PM, Jeff Davis wrote: > Why can't hash partitions be stored in tables the same way as we do TOAST? > That should take care of the naming problem. Hmm, yeah, something like that could be done, but every place where you are currently allowed to refer

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Piotr Stefaniak
On 2017-05-17 19:16, Alvaro Herrera wrote: > Tom Lane wrote: > >> Changing the pgindent rule for such cases sounds kind of promising, >> but will anyone pursue it? > > We have someone who has studied the BSD indent code and even sent us > patches to fix quite a few bugs, but we've largely

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Bruce Momjian
On Wed, May 17, 2017 at 01:06:26PM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> No, the previous setup hasn't been "in place for years". These programs > >> were only NLS-ified last fall. > > > We use the same technique in other places such

Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Jeevan Ladhe
> I committed this with fixes for those issues, plus I renamed the macro > to partition_bound_accepts_nulls, which I think is more clear. Thanks Robert.

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tels
Moin, On Wed, May 17, 2017 12:34 pm, Robert Haas wrote: > On Wed, May 17, 2017 at 3:06 AM, Tsunakawa, Takayuki > wrote: >> What do you think of the following cases? Don't you want to connect to >> other servers? >> >> * The DBA shuts down the database. The

pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: > We have someone who has studied the BSD indent code and even sent us > patches to fix quite a few bugs, but we've largely ignored his efforts > so far. I propose we take that indent as part of our repo, and patch it > to our preferences.

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > I agree with Robert's point that major redesign of the feature on the > basis of one complaint isn't necessarily the way to go. Since the > existing behavior is already out in beta1, let's wait and see if anyone > else complains. We don't need to

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread David G. Johnston
On Wed, May 17, 2017 at 12:06 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > > Who is right is a judgement call, but I don't think it's self-evident > that > >

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tom Lane
Stephen Frost writes: > * Robert Haas (robertmh...@gmail.com) wrote: >> One good argument for leaving this alone entirely is that this feature >> was committed on November 3rd and this thread began on May 12th. If >> there was ample time before feature freeze to question the

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Alvaro Herrera
Tom Lane wrote: > Changing the pgindent rule for such cases sounds kind of promising, > but will anyone pursue it? We have someone who has studied the BSD indent code and even sent us patches to fix quite a few bugs, but we've largely ignored his efforts so far. I propose we take that indent as

Re: [HACKERS] 10beta1 sequence regression failure on sparc64

2017-05-17 Thread Tom Lane
Christoph Berg writes: > The sequence regression tests are failing on Debian/sparc64: > ... > (This is only the last 100 lines of regression.diffs, if it helps I > can try rebuilding and grabbing the full file.) Yes please. What we can see here looks to be just fallout from a

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > One good argument for leaving this alone entirely is that this feature > was committed on November 3rd and this thread began on May 12th. If > there was ample time before feature freeze to question the design and > nobody did, then I'm not

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> No, the previous setup hasn't been "in place for years". These programs >> were only NLS-ified last fall. > We use the same technique in other places such as pg_dump's help() too. Meh. Well, I reverted the changes in

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 12:48 PM, Tom Lane wrote: > Robert Haas writes: >> Yeah, you have a point. I'm willing to admit that we may have defined >> the behavior of the feature incorrectly, provided that you're willing >> to admit that you're proposing

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> I suggest that we need to conditionalize the decision based on what >> SQLSTATE is reported. Not sure offhand if it's better to have a whitelist >> of SQLSTATEs that allow failing over to the next server, or a

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-05-17 Thread Surafel Temesgen
Sorry for being very late. I also think guc version of the patch can be acceptable and useful. I modified the patch as such and added to commitfest 2017-07. Regards Surafel On Sat, Mar 4, 2017 at 10:24 AM, Robert Haas wrote: > On Tue, Feb 28, 2017 at 7:34 PM, Tom

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Stephen Frost
Tom, Robert, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > Yeah, you have a point. I'm willing to admit that we may have defined > > the behavior of the feature incorrectly, provided that you're willing > > to admit that you're proposing a definition

Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 6:53 AM, Jeevan Ladhe wrote: > As discussed in default partition thread[1], here is the patch to remove > has_null from PartitionBoundInfoData structure. > Basically flag has_null is not needed and null_index can be checked if the > current

[HACKERS] 10beta1 sequence regression failure on sparc64

2017-05-17 Thread Christoph Berg
The sequence regression tests are failing on Debian/sparc64: sequence ... FAILED polymorphism ... ok rowtypes ... ok returning... ok largeobject ... ok with ... ok xml

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tom Lane
Robert Haas writes: > Yeah, you have a point. I'm willing to admit that we may have defined > the behavior of the feature incorrectly, provided that you're willing > to admit that you're proposing a definition change, not just a bug > fix. > Anybody else want to weigh in

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut writes: > > On 5/17/17 11:37, Tom Lane wrote: > >> Concretely, how about the attached? I don't think this looks any > >> worse than the current layout. > > > The previous setup has been in place for years and has never been a

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Peter Eisentraut writes: > On 5/17/17 10:14, Tom Lane wrote: >> What I was concerned about was that pgindent will reindent the second >> line so that it's impossible to tell whether the spacing is correct. > pgindent moving string continuations to the left is a

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Peter Eisentraut writes: > On 5/17/17 11:37, Tom Lane wrote: >> Concretely, how about the attached? I don't think this looks any >> worse than the current layout. > The previous setup has been in place for years and has never been a > problem. The alternatives

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 3:06 AM, Tsunakawa, Takayuki wrote: > What do you think of the following cases? Don't you want to connect to other > servers? > > * The DBA shuts down the database. The server takes a long time to do > checkpointing. During the shutdown

Re: [HACKERS] Pulling up more complicated subqueries

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 11:08 AM, Heikki Linnakangas wrote: > That's not a straight semi-join, but we could still turn it into a new kind > of LEFT-SEMI join. A left-semi join is like a left join, in that it returns > all rows from the left side, and NULLs for any non-matches.

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-17 Thread Tom Lane
Thomas Munro writes: > On Wed, May 17, 2017 at 2:39 PM, Tom Lane wrote: >> Thanks for checking. So that's two major platforms where it works "as >> expected" already. > Ah... the reason this is happening is that BSD-derived fread() >

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-17 Thread Remi Colinet
2017-05-16 8:17 GMT+02:00 Michael Paquier : > On Sat, May 13, 2017 at 10:53 AM, Robert Haas > wrote: > > On Wed, May 10, 2017 at 10:05 PM, Michael Paquier > > wrote: > >> Regarding the patch, this is way to close to

Re: [HACKERS] [COMMITTERS] pgsql: Tag refs/tags/REL_10_BETA1 was created

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 8:04 AM, Andrew Dunstan wrote: >> When we get to v100, we'll need some other hack to make it work ... >> but I plan to be safely dead by then. > > Me too. Since posterity will be deprived of both of us let's note that > the same hack will

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-17 Thread Remi Colinet
2017-05-13 14:38 GMT+02:00 Amit Kapila : > On Wed, May 10, 2017 at 10:10 PM, Remi Colinet > wrote: > > > > Parallel queries can also be monitored. The same mecanism is used to > monitor > > child workers with a slight difference: the main worker

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-17 Thread Peter Eisentraut
On 5/17/17 05:15, Masahiko Sawada wrote: > BTW, why should max_replication_slots be set more than 0 even on the > subscriber side? It's documented but I could not understand reason. Because that setting also controls replication origin tracking slots. -- Peter Eisentraut

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Peter Eisentraut
On 5/17/17 10:14, Tom Lane wrote: > What I was concerned about was that pgindent will reindent the second > line so that it's impossible to tell whether the spacing is correct. pgindent moving string continuations to the left is a completely terrible behavior anyway and we should look into

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-17 Thread Remi Colinet
2017-05-13 3:53 GMT+02:00 Robert Haas : > On Wed, May 10, 2017 at 10:05 PM, Michael Paquier > wrote: > > Regarding the patch, this is way to close to the progress facility > > already in place. So why don't you extend it for the executor? > > I

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Peter Eisentraut
On 5/17/17 11:37, Tom Lane wrote: > I wrote: >> BTW, I would say that the problem with -p is that somebody failed to >> understand the difference between --help and a man page. > > Concretely, how about the attached? I don't think this looks any > worse than the current layout. The previous

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
I wrote: > BTW, I would say that the problem with -p is that somebody failed to > understand the difference between --help and a man page. Concretely, how about the attached? I don't think this looks any worse than the current layout. regards, tom lane diff --git

[HACKERS] Pulling up more complicated subqueries

2017-05-17 Thread Heikki Linnakangas
Hi, I spent some time staring at TPC-DS benchmark's query 6. It contains a somewhat complicated subquery, and most of the time spent on that query is currently spent on executing the subquery again and again. The essence of the query boils down to this: CREATE TABLE foo (i int4, j int4);

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-05-17 Thread Bossart, Nathan
On 5/16/17, 11:21 PM, "Michael Paquier" wrote: > On Wed, May 17, 2017 at 7:56 AM, Bossart, Nathan wrote: >> I think this issue already exists, as this comment in get_rel_oids(…) seems >> to indicate: >> >> /* >> * Since we don't take a

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-17 Thread Sokolov Yura
Alvaro Herrera писал 2017-05-15 20:13: As I understand, these patches are logically separate, so putting them together in a single file isn't such a great idea. If you don't edit the patches further, then you're all set because we already have the previously archived patches. Next commitfest

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: >> ... Particularly in pg_waldump's -p, where a >> phrase is now cut in the middle. BTW, I would say that the problem with -p is that somebody failed to understand the difference between --help and a man page. That entry should be -p,

Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Tom Lane
Alvaro Herrera writes: > There are some changes here that should be reverted; for instance: > - printf(_(" -c, --checkpoint=fast|spread\n" > -" set fast or spread checkpointing\n")); > + printf(_(" -c,

[HACKERS] Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.

2017-05-17 Thread Alvaro Herrera
Tom Lane wrote: > src/bin/pg_basebackup/pg_basebackup.c | 24 +- > src/bin/pg_waldump/pg_waldump.c| 18 ++--- There are some changes here that should be reverted; for instance: - printf(_(" -c, --checkpoint=fast|spread\n" -"

Re: [HACKERS] [POC] hash partitioning

2017-05-17 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 2:07 PM, amul sul wrote: > >> In partition_bounds_equal(), please add comments explaining why is it safe to >> check just the indexes? May be we should add code under assertion to make >> sure >> that the datums are equal as well. > > Added assert in

Re: [HACKERS] [COMMITTERS] pgsql: Tag refs/tags/REL_10_BETA1 was created

2017-05-17 Thread Magnus Hagander
On Wed, May 17, 2017 at 2:41 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 5/16/17 22:37, Tom Lane wrote: > > BTW, I now remember having wondered[2] if we should make any other > changes > > in version-number formatting while we're at it, like maybe "10beta1" > > should be

Re: [HACKERS] [COMMITTERS] pgsql: Tag refs/tags/REL_10_BETA1 was created

2017-05-17 Thread Peter Eisentraut
On 5/16/17 22:37, Tom Lane wrote: > BTW, I now remember having wondered[2] if we should make any other changes > in version-number formatting while we're at it, like maybe "10beta1" > should be "10.beta1". That's not a naming format I've ever seen. I think the current format is fine. -- Peter

Re: [HACKERS] [COMMITTERS] pgsql: Tag refs/tags/REL_10_BETA1 was created

2017-05-17 Thread Andrew Dunstan
On 05/16/2017 10:37 PM, Tom Lane wrote: > Peter Eisentraut writes: >> On 5/16/17 18:14, pg...@postgresql.org wrote: >>> Tag refs/tags/REL_10_BETA1 was created. >> Was this change in naming pattern intentional? > Yes, it was. Andrew Dunstan suggested[1] during

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Rushabh Lathia
On Wed, May 17, 2017 at 12:06 PM, Dilip Kumar wrote: > On Fri, May 12, 2017 at 4:17 PM, Amit Khandekar > wrote: > > Option 3 > > > > > > BR, AR delete triggers on source partition > > BR, AR insert triggers on destination partition. > > >

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-17 Thread Robert Haas
On Tue, May 16, 2017 at 8:15 PM, Haribabu Kommi wrote: > Ok. In this approach, we need to share some of the gatherstate structure > members in the shared memory to access by the other background process > or some better logic to update these details whenever a new worker

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 6:29 AM, Amit Kapila wrote: > I think we can do this even without using an additional infomask bit. > As suggested by Greg up thread, we can set InvalidBlockId in ctid to > indicate such an update. Hmm. How would that work? -- Robert Haas

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-17 Thread Masahiko Sawada
On Mon, May 15, 2017 at 8:02 PM, Kyotaro HORIGUCHI wrote: > Hello, > > At Fri, 12 May 2017 17:24:07 +0900, Masahiko Sawada > wrote in >> On Fri, May 12, 2017 at 11:24 AM,

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

2017-05-17 Thread Amit Kapila
On Tue, May 16, 2017 at 9:39 PM, Robert Haas wrote: > On Sun, May 7, 2017 at 11:54 AM, Robert Haas wrote: >> I'm having second thoughts based on some more experimentation I did >> this morning. I'll update again once I've had a bit more time to poke

[HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Jeevan Ladhe
Hi, As discussed in default partition thread[1] , here is the patch to remove has_null from PartitionBoundInfoData structure. Basically flag has_null is not needed and null_index can be

Re: [HACKERS] [POC] hash partitioning

2017-05-17 Thread amul sul
On Wed, May 17, 2017 at 11:11 AM, Ashutosh Bapat wrote: > On Wed, May 17, 2017 at 12:04 AM, amul sul wrote: >> On Tue, May 16, 2017 at 10:00 PM, Dilip Kumar wrote: >>> On Tue, May 16, 2017 at 4:22 PM, amul sul

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Dilip Kumar
On Wed, May 17, 2017 at 3:15 PM, Amit Kapila wrote: >> Earlier I thought that option1 is better but later I think that this >> can complicate the situation as we are firing first BR update then BR >> delete and can change the row multiple time and defining such >>

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Amit Kapila
On Mon, May 15, 2017 at 5:28 PM, Robert Haas wrote: > On Fri, May 12, 2017 at 3:07 AM, Amit Kapila wrote: >> I agree with you that it might not be straightforward to make it work, >> but now that earliest it can go is v11, do we want to try doing

  1   2   >