[HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-08-08 Thread Dean Rasheed
On 8 August 2017 at 19:22, Robert Haas wrote: > On Fri, Jul 21, 2017 at 4:24 AM, Dean Rasheed > wrote: >> Also drop the constraint prohibiting finite values after an unbounded >> column, and just document the fact that any values after MINVALUE

Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests

2017-08-08 Thread Tom Lane
Michael Paquier writes: > On Tue, Jun 27, 2017 at 3:44 AM, Tom Lane wrote: >> Looks good as far as it goes, but I wonder whether any of the other >> get_slot_xmins calls need polling too. Don't feel a need to add such >> calls until someone

[HACKERS] Re: [COMMITTERS] pgsql: Fix inadequacies in recently added wait events

2017-08-08 Thread Alvaro Herrera
Thread moved to -hackers. Thomas Munro wrote: > On Wed, Aug 9, 2017 at 7:39 AM, Alvaro Herrera > wrote: > > While at it, fix numerous other problems in the vicinity: > All of the above seem like good candidates for a checker script in > src/tools/check_XXX.pl, a bit

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

2017-08-08 Thread Tsunakawa, Takayuki
From: Robert Haas [mailto:robertmh...@gmail.com] > Well, I started out believing that the current behavior was for the best, > and then completely reversed my position and favored the OP's proposal. > Nothing has really happened since then to change my mind, so I guess I'm > still in that camp.

Re: [HACKERS] [BUGS] Replication to Postgres 10 on Windows is broken

2017-08-08 Thread Peter Eisentraut
On 8/7/17 21:06, Noah Misch wrote: >> That would fit. Until v10 (commit 1e8a850), PQconnectStart() had no in-tree >> callers outside of libpq itself. > [Action required within three days. This is a generic notification.] > > The above-described topic is currently a PostgreSQL 10 open item.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-08-08 Thread David G. Johnston
On Tue, Aug 8, 2017 at 4:33 PM, Dean Rasheed wrote: > On 8 August 2017 at 19:22, Robert Haas wrote: > > On Fri, Jul 21, 2017 at 4:24 AM, Dean Rasheed > wrote: > >> Also drop the constraint prohibiting finite values

Re: [HACKERS] dubious error message from partition.c

2017-08-08 Thread Amit Langote
On 2017/08/09 3:50, Robert Haas wrote: > In the original table partitioning commit > (f0e44751d7175fa3394da2c8f85e3ceb3cdbfe630), we introduced the > following code, which hasn't changed materially since then: > > +if (partition_rbound_cmp(key, lower->datums, > lower->content,

Re: [HACKERS] Draft for 2017-08-10 Release

2017-08-08 Thread Jonathan Katz
Hi, > On Aug 6, 2017, at 11:14 AM, Jonathan Katz > wrote: > > Hi, > > I have put together a draft of the press release notes for the upcoming > 20170810 release. It is available here: > > >

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

2017-08-08 Thread Amit Kapila
On Wed, Aug 2, 2017 at 11:12 PM, Jeff Janes wrote: > 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

Re: [HACKERS] WIP: Failover Slots

2017-08-08 Thread Craig Ringer
On 3 August 2017 at 04:35, Robert Haas wrote: > 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

Re: [HACKERS] free space % calculation in pgstathashindex

2017-08-08 Thread Amit Kapila
On Mon, Aug 7, 2017 at 9:38 PM, Ashutosh Sharma wrote: > On Mon, Aug 7, 2017 at 7:19 PM, Amit Kapila wrote: >> On Mon, Aug 7, 2017 at 6:07 PM, Ashutosh Sharma >> wrote: >>> Hi, >>> >> .. .. >> Why an extra parenthesis in

[HACKERS] Re: [GSOC][weekly report 9] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-08-08 Thread Mengxing Liu
> From: "Alvaro Herrera" > * I wonder why did you settle on a skip list as the best optimization > path for this. Did you consider other data structures? (We don't > seem to have much that would be usable in shared memory, I fear.) > There are three typical

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

2017-08-08 Thread Fabien COELHO
Attached patch I'll look into it. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-08 Thread Tom Lane
Andrey Borodin writes: > 7 авг. 2017 г., в 18:37, Tom Lane написал(а): >> Yeah. Keep in mind that if the extension does anything at all that could >> possibly throw an error, and if that error condition persists across >> multiple tries, you will have

Re: [HACKERS] Default Partition for Range

2017-08-08 Thread Beena Emerson
On Fri, Aug 4, 2017 at 7:48 PM, Robert Haas wrote: > On Mon, Jul 31, 2017 at 8:28 AM, Beena Emerson > wrote: > > Why do we need to introduce PARTITION_RANGE_DATUM_DEFAULT at all? It > seems to me that the handling of default range partitions

Re: [HACKERS] "make check" with non-GNU make

2017-08-08 Thread Tom Lane
Thomas Munro writes: > Does anyone know why "make check" doesn't work on BSD systems if > tmp_install doesn't exist yet? It's no big deal, you just have to run > "gmake check", but Makefile is supposed to do that for you and it > works fine for every other target.

Re: [HACKERS] Error : undefined symbol : LWLockAssign in 9.6.3

2017-08-08 Thread Konstantin Knizhnik
On 08/09/2017 07:07 AM, 송기훈 wrote: 본문 이미지 1 Hi. I'm trying to use imcs module with 9.6 and got this error message. LWLockAssign function has been deleted from 9.6. I can't use this module anymore from 9.6. What I want to ask you something is that your team decides not to support imcs module

Re: [HACKERS] dubious error message from partition.c

2017-08-08 Thread Tom Lane
Amit Langote writes: > On 2017/08/09 3:50, Robert Haas wrote: >> In retrospect, I'm not thrilled by this error message, for two reasons: >> 1. It gives no details, as other nearby messages do. For example, >> further down in the function, we have a message

[HACKERS] Error : undefined symbol : LWLockAssign in 9.6.3

2017-08-08 Thread 송기훈
[image: 본문 이미지 1] Hi. I'm trying to use imcs module with 9.6 and got this error message. LWLockAssign function has been deleted from 9.6. I can't use this module anymore from 9.6. What I want to ask you something is that your team decides not to support imcs module anymore or doesn't concern

Re: [HACKERS] "make check" with non-GNU make

2017-08-08 Thread Thomas Munro
On Wed, Aug 9, 2017 at 3:44 PM, Tom Lane wrote: > Thomas Munro writes: >> Does anyone know why "make check" doesn't work on BSD systems if >> tmp_install doesn't exist yet? It's no big deal, you just have to run >> "gmake check", but Makefile

Re: [HACKERS] Possible issue with expanded object infrastructure on Postgres 9.6.1

2017-08-08 Thread Peter Geoghegan
On Thu, Jan 19, 2017 at 5:45 PM, Peter Geoghegan wrote: > A customer is on 9.6.1, and complains of a segfault observed at least > 3 times. > I can use GDB to get details of the instruction pointer that appeared > in the kernel trap error, which shows a function from the expanded

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-08-08 Thread Amit Langote
On 2017/08/09 9:03, David G. Johnston wrote: > On Tue, Aug 8, 2017 at 4:33 PM, Dean Rasheed wrote: >> Well perhaps verbosity-reduction isn't sufficient justification but I >> still think this is correct because logically any values in the bound >> after MINVALUE/MAXVALUE are irrelevant, so it

Re: [HACKERS] Small code improvement for btree

2017-08-08 Thread Masahiko Sawada
On Mon, Aug 7, 2017 at 1:44 PM, Masahiko Sawada wrote: > On Sat, Aug 5, 2017 at 3:29 AM, Peter Geoghegan wrote: >> On Fri, Aug 4, 2017 at 11:12 AM, Alvaro Herrera >> wrote: >>> Interesting. We learned elsewhere that it's better to

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 8, 2017 at 4:34 PM, Tom Lane wrote: >> In the meantime, I think my vote would be to remove AtEOXact_CatCache. > In all supported branches? Whatever we do about this issue, I don't feel a need to do it further back

Re: [HACKERS] dubious error message from partition.c

2017-08-08 Thread David G. Johnston
On Tue, Aug 8, 2017 at 8:34 PM, Tom Lane wrote: > A small suggestion is that it'd be better to write it like "Specified > upper bound \"%s\" precedes lower bound \"%s\"." I think "succeeds" has > more alternate meanings than "precedes", so the wording you have seems > more

[HACKERS] "make check" with non-GNU make

2017-08-08 Thread Thomas Munro
Hi hackers, Does anyone know why "make check" doesn't work on BSD systems if tmp_install doesn't exist yet? It's no big deal, you just have to run "gmake check", but Makefile is supposed to do that for you and it works fine for every other target. No big deal, but it'd be nice to unravel this

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Robert Haas
On Tue, Aug 8, 2017 at 4:34 PM, Tom Lane wrote: > In the meantime, I think my vote would be to remove AtEOXact_CatCache. In all supported branches? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] Possible issue with expanded object infrastructure on Postgres 9.6.1

2017-08-08 Thread Tom Lane
Peter Geoghegan writes: > On Thu, Jan 19, 2017 at 5:45 PM, Peter Geoghegan wrote: >> A customer is on 9.6.1, and complains of a segfault observed at least >> 3 times. > ... > For the sake of the archives: this now looks very much like the issue > that Tom just

Re: [HACKERS] Error : undefined symbol : LWLockAssign in 9.6.3

2017-08-08 Thread Andres Freund
Hi, On 2017-08-09 13:07:53 +0900, 송기훈 wrote: > [image: 본문 이미지 1] > Hi. > I'm trying to use imcs module with 9.6 and got this error message. > LWLockAssign function has been deleted from 9.6. I can't use this module > anymore from 9.6. > > What I want to ask you something is that your team

Re: [HACKERS] parallelize queries containing initplans

2017-08-08 Thread Haribabu Kommi
On Mon, Jul 17, 2017 at 10:53 PM, Amit Kapila wrote: > On Tue, Mar 28, 2017 at 7:25 AM, Amit Kapila > wrote: > > On Thu, Mar 16, 2017 at 2:34 AM, Kuntal Ghosh > > wrote: > >> On Tue, Mar 14, 2017 at 3:20 PM, Amit

Re: [HACKERS] dubious error message from partition.c

2017-08-08 Thread Amit Langote
On 2017/08/09 13:03, David G. Johnston wrote: > On Tue, Aug 8, 2017 at 8:34 PM, Tom Lane wrote: > >> A small suggestion is that it'd be better to write it like "Specified >> upper bound \"%s\" precedes lower bound \"%s\"." I think "succeeds" has >> more alternate meanings

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-08-08 Thread Alexander Korotkov
On Sat, Aug 5, 2017 at 11:36 PM, Mark Rofail wrote: > This is the query fired upon any UPDATE/DELETE for RI checks: > > SELECT 1 FROM ONLY x WHERE pkatt1 = $1 [AND ...] FOR KEY SHARE > OF x > > in the case of foreign key arrays, it's wrapped in this query: > > SELECT 1

[HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Jeevan Chalke
Hi, We have observed a random server crash (FailedAssertion), while running few tests at our end. Stack-trace is attached. By looking at the stack-trace, and as discussed it with my team members; what we have observed that in SearchCatCacheList(), we are incrementing refcount and then

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

2017-08-08 Thread Rushabh Lathia
Thanks Rajkumar for testing and reporting this. It seems like with we set the numParents and parents only for the dumpable objects (flagInhTables()). Current patch relies on the numParents and parents to get the root partition TableInfo, but when --schema is been specified - it doesn't load

Re: [HACKERS] pl/perl extension fails on Windows

2017-08-08 Thread Sandeep Thakkar
Hi An update from beta3 build: We are no longer seeing this issue (handshake failure) on Windows 64bit, but on Windows 32bit it still persists. On Mon, Jul 31, 2017 at 10:15 PM, Christoph Berg wrote: > Re: Tom Lane 2017-07-31 <30582.1501508...@sss.pgh.pa.us> > > Christoph Berg

Re: [HACKERS] Subscription code improvements

2017-08-08 Thread Masahiko Sawada
Petr, On Thu, Aug 3, 2017 at 5:24 AM, Stephen Frost wrote: > * 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

Re: [HACKERS] More race conditions in logical replication

2017-08-08 Thread Alvaro Herrera
Robert Haas wrote: > On Mon, Aug 7, 2017 at 8:14 PM, Alvaro Herrera > wrote: > > BTW, I noticed that the PG_WAIT_LOCK value that we're using for wait > > event here (and in the replication slot case) is bogus. We probably > > need something new here. > > Yeah, if

[HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-08-08 Thread Robert Haas
On Fri, Jul 21, 2017 at 4:24 AM, Dean Rasheed wrote: > Also drop the constraint prohibiting finite values after an unbounded > column, and just document the fact that any values after MINVALUE or > MAXVALUE are ignored. Previously it was necessary to repeat UNBOUNDED >

[HACKERS] dubious error message from partition.c

2017-08-08 Thread Robert Haas
In the original table partitioning commit (f0e44751d7175fa3394da2c8f85e3ceb3cdbfe630), we introduced the following code, which hasn't changed materially since then: +if (partition_rbound_cmp(key, lower->datums, lower->content, true, + upper)

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 8, 2017 at 11:36 AM, Tom Lane wrote: >> We could respond to this by using PG_ENSURE_ERROR_CLEANUP there instead >> of plain PG_TRY. But I have an itchy feeling that there may be a lot >> of places with similar issues.

[HACKERS] The error message "sorry, too many clients already" is imprecise

2017-08-08 Thread Piotr Stefaniak
I recently started getting the "sorry, too many clients already" error. There are currently four places that can generate it, but fortunately log_error_verbosity was set to verbose so I was able to see that in this case the warning was generated by proc.c:InitProcess(). But it's still not much,

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

2017-08-08 Thread Rajkumar Raghuwanshi
Hi Rushabh, While testing latest v2 patch, I got a crash when using --load-via-partition-root with --schema options. Below are steps to reproduce. --create below test data create schema a; create schema b; create schema c; create table t1 (a int,b text) partition by list(a); create table

Re: [HACKERS] FYI: branch for v11 devel is planned for next week

2017-08-08 Thread Michael Paquier
On Mon, Aug 7, 2017 at 5:33 AM, Tom Lane wrote: > The release team discussed this a couple weeks ago, but I don't > think anybody mentioned it on -hackers: v10 seems to be in good > enough shape that it's okay to make the REL_10_STABLE branch soon, > and open HEAD for v11

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-08-08 Thread Mark Rofail
On Tue, Aug 8, 2017 at 2:25 PM, Alexander Korotkov wrote: > > Do we already assume that default btree opclass for array element type > matches PK opclass when using @>> operator on UPDATE/DELETE of referenced > table? > I believe so, since it's a polymorphic function. > If

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-08-08 Thread Alexander Korotkov
On Tue, Aug 8, 2017 at 4:12 PM, Mark Rofail wrote: > On Tue, Aug 8, 2017 at 2:25 PM, Alexander Korotkov > wrote: >> >> Do we already assume that default btree opclass for array element type >> matches PK opclass when using @>> operator on

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

2017-08-08 Thread Fabien COELHO
Hello Mahahiko-san, My 0.02€ about the patch & feature, which only reflect my point of view: Please add a number to patches to avoid ambiguities. This was patch was the second sent on the thread. There is no need to have both custom_init & init functions. I'll suggest to remove function

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Robert Haas
On Tue, Aug 8, 2017 at 12:26 PM, Tom Lane wrote: > Yeah, I thought about weakening the assertions too, but I couldn't > see a fix of that kind that didn't seem mighty ad-hoc. I don't really see what's ad-hoc about skipping it in the case where a FATAL is in progress. I mean,

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

2017-08-08 Thread Robert Haas
On Tue, Aug 8, 2017 at 8:48 AM, Rushabh Lathia wrote: > It seems like with we set the numParents and parents only for the > dumpable objects (flagInhTables()). Current patch relies on the numParents > and parents to get the root partition TableInfo, but when --schema is

[HACKERS] Infrastructure for JIT compiling tuple deforming

2017-08-08 Thread Andres Freund
Hi, As previously mentioned, tuple deforming is a major bottleneck, and JITing it can be highly beneficial. I previously had posted a prototype that does JITing at the slot_deform_tuple() level, caching the deformed function in the tupledesc. Storing things in the tupledesc isn't a great

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 8, 2017 at 12:26 PM, Tom Lane wrote: >> Yeah, I thought about weakening the assertions too, but I couldn't >> see a fix of that kind that didn't seem mighty ad-hoc. > More concretely, the present example seems no

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Tom Lane
Jeevan Chalke writes: > We have observed a random server crash (FailedAssertion), while running few > tests at our end. Stack-trace is attached. > By looking at the stack-trace, and as discussed it with my team members; > what we have observed that in

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

2017-08-08 Thread amul sul
On Tue, Aug 8, 2017 at 6:18 PM, Rushabh Lathia wrote: > Thanks Rajkumar for testing and reporting this. > > > It seems like with we set the numParents and parents only for the > dumpable objects (flagInhTables()). Current patch relies on the numParents > and parents to

Re: [HACKERS] Server crash (FailedAssertion) due to catcache refcount mis-handling

2017-08-08 Thread Robert Haas
On Tue, Aug 8, 2017 at 11:36 AM, Tom Lane wrote: >> By looking at the stack-trace, and as discussed it with my team members; >> what we have observed that in SearchCatCacheList(), we are incrementing >> refcount and then decrementing it at the end. However for some reason, if

Re: [HACKERS] pl/perl extension fails on Windows

2017-08-08 Thread Robert Haas
On Tue, Aug 8, 2017 at 8:37 AM, Sandeep Thakkar wrote: > An update from beta3 build: We are no longer seeing this issue (handshake > failure) on Windows 64bit, but on Windows 32bit it still persists. Hmm, maybe you should've reported it sooner, so we could've