Typos from Covering Index patch

2018-04-11 Thread Michael Paquier
Hi all, I am catching up with new features so I have begun going through Covering indexes. While reading the code, I have noticed a couple of things: 1) Some typos. 2) An inconsistent variable name in pg_dump. The thing and structure of the code is pretty interesting by the way. That's nice work

Fix for documentation of Covering Indexes

2018-04-11 Thread Michael Paquier
Hi all, The documentation of covering indexes is incorrect for CREATE and ALTER TABLE: - ALTER TABLE's page is missing the call. - Exclusion constraints can use INCLUDE clauses. In order to simplify the documentation, please let me suggest the attached which moves the definition of the INCLUDE cl

Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process

2018-04-11 Thread Thomas Munro
On Wed, Apr 11, 2018 at 12:47 PM, Thomas Munro wrote: > On Wed, Apr 11, 2018 at 12:26 PM, Andres Freund wrote: >> On 2018-04-11 12:17:14 +1200, Thomas Munro wrote: >>> I arrived at this idea via the realisation that the closest thing to >>> prctl(PR_SET_PDEATHSIG) on BSD-family systems today is >

Re: Boolean partitions syntax

2018-04-11 Thread Kyotaro HORIGUCHI
Thank you for the comments. At Wed, 11 Apr 2018 13:51:55 +0900, Amit Langote wrote in <3d0fda29-986c-d970-a22c-b4bd44f56...@lab.ntt.co.jp> > Horiguchi-san, > > Thanks for working on this. > > On 2018/04/11 13:20, Kyotaro HORIGUCHI wrote: > > At Wed, 11 Apr 2018 11:27:17 +0900, Amit Langote wr

Re: submake-errcodes

2018-04-11 Thread Christoph Berg
Re: Tom Lane 2018-04-10 <24426.1523387...@sss.pgh.pa.us> > The short-term solution seems to be to put that back, but that's sort > of annoying because it means this isn't a bulletproof solution. It > will only work for builds started in one of the directories that we > take the trouble to put this

Re: [HACKERS] path toward faster partition pruning

2018-04-11 Thread David Rowley
On 11 April 2018 at 18:04, Amit Langote wrote: > Updated patch attached. Thanks for the updated patch. The only thing I'm not sure about is the chances you've made to the COALESCE function. +CREATE OR REPLACE FUNCTION pp_hashint4_noop(int4, int8) RETURNS int8 AS +$$SELECT coalesce($1, $2)::int8

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2018-04-11 Thread Mark Rofail
On Tue, 10 Apr 2018 at 4:17 pm, Alvaro Herrera wrote: > Mark Rofail wrote: > I meant for the GIN operator. (Remember, these are two patches, and each > of them needs its own tests.) Yes, you are right. I have been dealing with the code as a single patch that I almost forgot. True. So my impres

Re: [HACKERS] path toward faster partition pruning

2018-04-11 Thread Amit Langote
Hi David. Thanks for the review. On 2018/04/11 17:59, David Rowley wrote: > On 11 April 2018 at 18:04, Amit Langote wrote: >> Updated patch attached. > > Thanks for the updated patch. > > The only thing I'm not sure about is the chances you've made to the > COALESCE function. > > +CREATE OR R

Re: [HACKERS] path toward faster partition pruning

2018-04-11 Thread Ashutosh Bapat
On Wed, Apr 11, 2018 at 2:52 PM, Amit Langote wrote: >> >> I've attached a delta patch that applies to your v2 which does this. >> Do you think it's worth doing? > > We can see check by inspection that individual values are in appropriate > partitions, which is the point of having the inserts and

Re: [sqlsmith] Failed assertion in create_gather_path

2018-04-11 Thread Jeevan Chalke
On Tue, Apr 10, 2018 at 11:14 PM, Robert Haas wrote: > On Tue, Apr 10, 2018 at 2:59 AM, Jeevan Chalke > wrote: > > I actually wanted to have rel->consider_parallel in the condition (yes, > for > > additional safety) as we are adding a partial path into rel. But then > > observed that it is same

Re: Excessive PostmasterIsAlive calls slow down WAL redo

2018-04-11 Thread Heikki Linnakangas
On 10/04/18 04:36, Thomas Munro wrote: On Tue, Apr 10, 2018 at 12:53 PM, Andres Freund wrote: I coincidentally got pinged about our current approach causing performance problems on FreeBSD and started writing a patch. The problem there appears to be that constantly attaching events to the read

'make check' fails

2018-04-11 Thread Bruce Momjian
I have discovered that: make clean; make check fails with: /bin/mkdir -p '/pgtop'/tmp_install/log make -C '.' DESTDIR='/pgtop'/tmp_install install >'/pgtop'/tmp_install/log/install.log 2>&1 src/Makefile.global:388: recipe for target 'temp-install' failed

Re: ERROR: invalid memory alloc request size 1073741824

2018-04-11 Thread Suhal Vemu
Hi all, This is gisdb and my POSTGIS VERSION - *gisdb=# SELECT PostGIS_version();* *postgis_version* *---* * 2.4 USE_GEOS=1 USE_PROJ=1 USE_STATS

Re: Excessive PostmasterIsAlive calls slow down WAL redo

2018-04-11 Thread Thomas Munro
On Wed, Apr 11, 2018 at 10:22 PM, Heikki Linnakangas wrote: > On 10/04/18 04:36, Thomas Munro wrote: >> Just an idea, not tested: what about a reusable WaitEventSet with zero >> timeout? Using the kqueue patch, that'd call kevent() which'd return >> immediately and tell you if any postmaster deat

Re: Problem while setting the fpw with SIGHUP

2018-04-11 Thread Heikki Linnakangas
On 09/04/18 11:13, Kyotaro HORIGUCHI wrote: At Fri, 6 Apr 2018 17:59:58 +0530, Amit Kapila wrote in On Fri, Apr 6, 2018 at 1:50 PM, Kyotaro HORIGUCHI wrote: Hello. At Wed, 04 Apr 2018 17:26:46 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180404.172646.238325981.horiguchi.

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Pavan Deolasee
On Tue, Apr 10, 2018 at 7:24 PM, Pavan Deolasee wrote: > Hi Heikki, > > On Tue, Apr 10, 2018 at 7:07 PM, Heikki Linnakangas > wrote: > >> >>> >> It would seem more straightforward to add a snapshot parameter to >> GetNewOidWithIndex(), so that the this one caller could pass SnapshotToast, >> whi

Re: [PATCH] Add missing type conversion functions for PL/Python

2018-04-11 Thread David Steele
On 4/11/18 2:36 AM, Haozhou Wang wrote: > > Thanks for your email. > Just wondering will I need to re-submit this patch? No need to resubmit, the CF entry has been moved here: https://commitfest.postgresql.org/18/1499/ You should have a look at Nikita's patch, though. Regards, -- -David da...

Re: [HACKERS] path toward faster partition pruning

2018-04-11 Thread David Rowley
On 11 April 2018 at 21:22, Amit Langote wrote: >> Also just wondering if it's worth adding some verification that we've >> actually eliminated the correct partitions by backing the tests up >> with a call to satisfies_hash_partition. >> >> I've attached a delta patch that applies to your v2 which

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-11 Thread Jonathan Corbet
On Tue, 10 Apr 2018 17:40:05 +0200 Anthony Iliopoulos wrote: > LSF/MM'18 is upcoming and it would > have been the perfect opportunity but it's past the CFP deadline. > It may still worth contacting the organizers to bring forward > the issue, and see if there is a chance to have someone from > Pg

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-11 Thread Greg Stark
On 10 April 2018 at 19:58, Joshua D. Drake wrote: > You can't unmount the file system --- that requires writing out all of the > pages > such that the dirty bit is turned off. I always wondered why Linux didn't implement umount -f. It's been in BSD since forever and it's a major annoyance that i

Re: User defined data types in Logical Replication

2018-04-11 Thread Đặng Minh Hướng
2018-04-11 10:16 GMT+09:00 Masahiko Sawada : > On Mon, Mar 19, 2018 at 7:57 PM, Masahiko Sawada > wrote: > > > > Attached an updated test patch added the above test(0002 patch). Since > > for this test case it's enough to use existing test functions I didn't > > create new test functions. Also I

Re: [HACKERS] path toward faster partition pruning

2018-04-11 Thread Alvaro Herrera
Here's an idea. Why don't we move the function/opclass creation lines to insert.sql, without the DROPs, and use the same functions/opclasses in the three tests insert.sql, alter_table.sql, hash_part.sql and partition_prune.sql, i.e. not recreate what are essentially the same objects three times?

Re: pgbench doc typos

2018-04-11 Thread Peter Eisentraut
On 3/30/18 03:30, Edmund Horner wrote: > On 30 March 2018 at 19:26, Fabien COELHO wrote: >> Thanks for the check. You might consider turning the patch as ready in the >> cf app. > > Ok, I have done so, since the patch is small and simple. > >>> Fixing the abs/hash bracketing seems clear. The wa

Re: [WIP] Document update for Logical Replication security

2018-04-11 Thread Peter Eisentraut
On 3/3/18 07:35, Shinoda, Noriyoshi wrote: > Hi, Hackers, > > The attached patch adds the following information to the document on Logical > Replication. > About the requirement of connection role of Logical Replication, written in > 31.7 of the manual is as follows. > -- > The role used for th

Re: segmentation fault in pg head with SQL function.

2018-04-11 Thread Peter Eisentraut
On 3/16/18 11:40, Tom Lane wrote: > Michael Paquier writes: >> On Fri, Mar 16, 2018 at 11:35:13AM +0530, Prabhat Sahu wrote: >>> postgres=# CREATE OR REPLACE FUNCTION func1() RETURNS VOID >>> LANGUAGE SQL >>> AS $$ >>> select 10; >>> $$; > >> Problem reproducible here, and the bug has been introd

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Peter Eisentraut
On 2/18/18 22:42, Michael Paquier wrote: > Okay, I have created a skeleton of page here: > https://wiki.postgresql.org/wiki/PostgreSQL_11_Open_Items > Feel free to add any bugs or issues related to v11 that need to be > tracked before the release. Do people find it useful to move the resolved item

Re: lazy detoasting

2018-04-11 Thread Amit Kapila
On Wed, Apr 11, 2018 at 2:34 AM, Chapman Flack wrote: > On 04/10/2018 04:03 PM, Robert Haas wrote: > >> I suspect you want, or maybe need, to use the same snapshot as the >> scan that retrieved the tuple containing the toasted datum. > > I'm sure it's worth more than that, but I don't know if it's

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2018-04-11 Thread Alvaro Herrera
Mark Rofail wrote: > > In particular: it seemed to me that you decided to throw away the idea > > of the new GIN operator without sufficient evidence that it was > > unnecessary. > > I have to admit to that. But in my defence @> is also GIN indexable so the > only difference in performance betwee

Re: submake-errcodes

2018-04-11 Thread Tom Lane
Christoph Berg writes: > It still doesn't work on current HEAD: *What* still doesn't work on current HEAD? I don't know what commands you are running to get this. regards, tom lane

Re: Boolean partitions syntax

2018-04-11 Thread Jonathan S. Katz
> On Apr 11, 2018, at 4:33 AM, Kyotaro HORIGUCHI > wrote: > > Thank you for the comments. > > At Wed, 11 Apr 2018 13:51:55 +0900, Amit Langote > wrote in > <3d0fda29-986c-d970-a22c-b4bd44f56...@lab.ntt.co.jp> >> Horiguchi-san, >> >> Thanks for working on this. >> >> On 2018/04/11 13:20, K

Re: Partitioned tables and covering indexes

2018-04-11 Thread Teodor Sigaev
Thank you, pushed Amit Langote wrote: Hi. On 2018/04/11 0:36, Teodor Sigaev wrote:     Does the attached fix look correct?  Haven't checked the fix with ATTACH     PARTITION though. Attached patch seems to fix the problem.  However, I would rather get rid of modifying stmt->indexParams.  T

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Ashutosh Bapat
On Wed, Apr 11, 2018 at 6:53 PM, Peter Eisentraut wrote: > On 2/18/18 22:42, Michael Paquier wrote: >> Okay, I have created a skeleton of page here: >> https://wiki.postgresql.org/wiki/PostgreSQL_11_Open_Items >> Feel free to add any bugs or issues related to v11 that need to be >> tracked before

Re: WIP: Covering + unique indexes.

2018-04-11 Thread Teodor Sigaev
_bt_mark_page_halfdead() looked like it had a problem, but it now looks like I was wrong. I also verified every other BTreeInnerTupleGetDownLink() caller. It now looks like everything is good here. Right - it tries to find right page by conlsulting in parent page, by taking of next key. --

Re: submake-errcodes

2018-04-11 Thread Devrim Gündüz
Hi, On Wed, 2018-04-11 at 09:38 -0400, Tom Lane wrote: > *What* still doesn't work on current HEAD? I don't know what commands > you are running to get this. I think my build and Christoph's builds fail because of the same reason again (the same as yesterday): =

Re: submake-errcodes

2018-04-11 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= writes: > On Wed, 2018-04-11 at 09:38 -0400, Tom Lane wrote: >> *What* still doesn't work on current HEAD? I don't know what commands >> you are running to get this. > I think my build and Christoph's builds fail because of the same reason again > (the same as

Re: lazy detoasting

2018-04-11 Thread Chapman Flack
On 04/10/2018 10:17 PM, Jan Wieck wrote: > If your session has a transaction snapshot that protects the old toast > slices from being vacuumed away, you are fine. That harks back to my earlier (naïve?) thought that, as long as my lazy datum doesn't have to outlive the transaction, lazy detoasting

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-11 Thread Andres Freund
Hi, On 2018-04-11 06:05:27 -0600, Jonathan Corbet wrote: > The event is April 23-25 in Park City, Utah. I bet that room could be > found for somebody from the postgresql community, should there be > somebody who would like to represent the group on this issue. Let me > know if an introduction or

Re: Transform for pl/perl

2018-04-11 Thread Peter Eisentraut
On 4/10/18 07:33, Dagfinn Ilmari Mannsåker wrote: > 1) both the jsonb_plperl and jsonb_plperlu extensions contain the SQL >functions jsonb_to_plperl and plperl_to_jsonb, so can't be installed >simultaneously > > 2) jsonb scalar values are passed to the plperl function wrapped in not >o

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-11 Thread Jonathan Corbet
On Wed, 11 Apr 2018 07:29:09 -0700 Andres Freund wrote: > If that room can be found, I might be able to make it. Being in SF, I'm > probably the physically closest PG dev involved in the discussion. OK, I've dropped the PC a note; hopefully you'll be hearing from them. jon

Re: lazy detoasting

2018-04-11 Thread Tom Lane
Chapman Flack writes: > On 04/10/2018 10:17 PM, Jan Wieck wrote: >> If your session has a transaction snapshot that protects the old toast >> slices from being vacuumed away, you are fine. > That harks back to my earlier (naïve?) thought that, as long as > my lazy datum doesn't have to outlive th

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Tom Lane
Pavan Deolasee writes: > Or may be we simply err on the side of caution and scan the toast table > with SnapshotAny while looking for a duplicate? That might prevent us from > reusing an OID for a known-dead tuple, but should save us a second index > scan and still work. +1. We really don't want

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Tom Lane
Ashutosh Bapat writes: > On Wed, Apr 11, 2018 at 6:53 PM, Peter Eisentraut > wrote: >> Do people find it useful to move the resolved items to a separate >> section on the page, instead of just removing them? I'm not sure that >> the resolved sections are useful, compared to just using the git lo

Re: 'make check' fails

2018-04-11 Thread Tom Lane
Bruce Momjian writes: > I have discovered that: > make clean; make check > fails with: No doubt this is related to the generated-headers changes I've been making, but I find your recipe confusing. "make clean" should not have removed the generated headers from the previous build. I can be

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Robert Haas
On Wed, Apr 11, 2018 at 10:53 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> On Wed, Apr 11, 2018 at 6:53 PM, Peter Eisentraut >> wrote: >>> Do people find it useful to move the resolved items to a separate >>> section on the page, instead of just removing them? I'm not sure that >>> the resol

Re: lazy detoasting

2018-04-11 Thread Chapman Flack
On 04/11/2018 10:41 AM, Tom Lane wrote: > The core of the problem now is that in a READ COMMITTED transaction, we > may not be holding any snapshot at all between statements. So if you're > hanging onto a toast pointer across statements you're at risk. > > On the other hand, it's also arguable th

Re: lazy detoasting

2018-04-11 Thread Tom Lane
Chapman Flack writes: > On 04/11/2018 10:41 AM, Tom Lane wrote: >> So maybe we need to take two steps back and talk about the semantics >> of what you're doing. > The mission is to implement java.sql.SQLXML, which has long been > missing from PL/Java. > This is the class of object your Java code

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 11, 2018 at 10:53 AM, Tom Lane wrote: >> What *does* take time is adding a link to the commit, so I'd happily >> drop that step. As Peter says, you can usually look in the commit >> log if you care. > The trouble is that sometimes it's not very obvious which co

Re: WARNING in parallel index creation.

2018-04-11 Thread Andres Freund
On 2018-03-12 20:44:01 -0700, Peter Geoghegan wrote: > On Sun, Mar 11, 2018 at 10:15 PM, Jeff Janes wrote: > > Then when I create in index, I get a warning: > > > > jjanes=# create index on pgbench_accounts (foobar(filler)); > > WARNING: cannot set parameters during a parallel operation > > WARNI

Re: es_query_dsa is broken

2018-04-11 Thread Andres Freund
Hi, On 2017-12-07 12:51:56 +1300, Thomas Munro wrote: > 1. Removing es_query_dsa and injecting the right context into the > executor tree as discussed. > > 2. Another idea mentioned by Robert in an off-list chat: We could > consolidate all DSM segments in a multi-gather plan into one. See the

Re: missing support of named convention for procedures

2018-04-11 Thread Andres Freund
Hi Peter, Pavel, On 2018-03-22 15:19:12 +0100, Pavel Stehule wrote: > attached patch should to fix it This is still broken, and has been an open item for a bit. Peter, Could you check whether Pavel's fix resolves the issue for you? Regards, Andres

Re: 'make check' fails

2018-04-11 Thread Bruce Momjian
On Wed, Apr 11, 2018 at 10:59:45AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I have discovered that: > > make clean; make check > > fails with: > > No doubt this is related to the generated-headers changes I've been > making, but I find your recipe confusing. "make clean" should not

Re: relispartition for index partitions

2018-04-11 Thread Andres Freund
Hi, On 2018-01-26 18:57:03 +0900, Amit Langote wrote: > I noticed that relispartition isn't set for index's partitions. > > create table p (a int) partition by list (a); > create table p12 partition of p for values in (1, 2); > create index on p (a); > select relname, relkind from pg_class where

Re: relispartition for index partitions

2018-04-11 Thread Alvaro Herrera
Hello Andres Freund wrote: > On 2018-01-26 18:57:03 +0900, Amit Langote wrote: > > I noticed that relispartition isn't set for index's partitions. > > Is that intentional? > > This appears to be a question about > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8b08f7d4820fd7a8ef

Re: 'make check' fails

2018-04-11 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> No doubt this is related to the generated-headers changes I've Tom> been making, but I find your recipe confusing. "make clean" should Tom> not have removed the generated headers from the previous build. I Tom> can believe that if you started from a bare g

Re: WARNING in parallel index creation.

2018-04-11 Thread Tom Lane
Andres Freund writes: > On 2018-03-12 20:44:01 -0700, Peter Geoghegan wrote: >> I wonder why DefineCustomStringVariable() does not set var->reset_val. >> We see that within DefineCustomEnumVariable(), >> DefineCustomRealVariable(), DefineCustomIntVariable(), etc. > Peter, have you investigated th

Re: 'make check' fails

2018-04-11 Thread Tom Lane
Andrew Gierth writes: > Tom> Please be more explicit about what state you're starting from. > This is consistently failing for me, on FreeBSD with GNU Make 4.2.1, > clang 3.9.1, at commit 651cb90941: > git clean -dfx > ./configure '--prefix=/home/andrew/work/pgsql/head' \ > '--with-includes=/u

Re: 'make check' fails

2018-04-11 Thread Bruce Momjian
On Wed, Apr 11, 2018 at 12:35:41PM -0400, Tom Lane wrote: > Andrew Gierth writes: > > Tom> Please be more explicit about what state you're starting from. > > > This is consistently failing for me, on FreeBSD with GNU Make 4.2.1, > > clang 3.9.1, at commit 651cb90941: > > > git clean -dfx > > ./

Re: 'make check' fails

2018-04-11 Thread Alvaro Herrera
Tom Lane wrote: > We can fix this by making submake-generated-headers be a recursive > prerequisite for "check" as well as "all" and "install". I wonder > whether anybody is expecting any other shortcuts to work. check-world certainly, but presumably that depends on check? -- Álvaro Herrera

Re: Partitioned tables and covering indexes

2018-04-11 Thread Teodor Sigaev
Patch makes buildfarm almost red, patch is temporary reverted. Actually, discovered bug is not related to patch except new test faces with it, problem is: CompareIndexInfo() checks rd_opfamily for equality for all attributes, not only for key attribute. Obviously, CompareIndexInfo() needs more

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Jonathan S. Katz
> On Apr 11, 2018, at 11:54 AM, Tom Lane wrote: > > Robert Haas writes: >> On Wed, Apr 11, 2018 at 10:53 AM, Tom Lane wrote: >>> What *does* take time is adding a link to the commit, so I'd happily >>> drop that step. As Peter says, you can usually look in the commit >>> log if you care. > >

Re: 'make check' fails

2018-04-11 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> We can fix this by making submake-generated-headers be a recursive >> prerequisite for "check" as well as "all" and "install". I wonder >> whether anybody is expecting any other shortcuts to work. > check-world certainly, but presumably that depends on

Native partitioning tablespace inheritance

2018-04-11 Thread Keith Fiske
Just had someone report that pg_partman wasn't handling tablespaces for native partitioning. https://github.com/keithf4/pg_partman/issues/212 I'd assumed that that was a property that was being inherited from the parent table, but apparently the TABLESPACE flag to CREATE TABLE is completely ignor

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Alvaro Herrera
Jonathan S. Katz wrote: > During some RMT discussions I had proposed formatting the open items > into a table on the Wiki page with some useful info to help track the status > and surface the necessary info to track down the open item. The other proposal was that we could have a simple web app to

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Andres Freund
On 2018-04-11 13:54:34 -0300, Alvaro Herrera wrote: > The other proposal was that we could have a simple web app to track open > items. After all, we now know what we need from it. A wiki page seems > more laborious. (The commitfest app also sprung from a wiki page.) Growing a number of non-iss

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Magnus Hagander
On Wed, Apr 11, 2018 at 6:57 PM, Andres Freund wrote: > On 2018-04-11 13:54:34 -0300, Alvaro Herrera wrote: > > The other proposal was that we could have a simple web app to track open > > items. After all, we now know what we need from it. A wiki page seems > > more laborious. (The commitfest

Re: 'make check' fails

2018-04-11 Thread Tom Lane
Bruce Momjian writes: > On Wed, Apr 11, 2018 at 12:35:41PM -0400, Tom Lane wrote: >> We can fix this by making submake-generated-headers be a recursive >> prerequisite for "check" as well as "all" and "install". I wonder >> whether anybody is expecting any other shortcuts to work. > In case it w

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Alvaro Herrera
Andres Freund wrote: > On 2018-04-11 13:54:34 -0300, Alvaro Herrera wrote: > > The other proposal was that we could have a simple web app to track open > > items. After all, we now know what we need from it. A wiki page seems > > more laborious. (The commitfest app also sprung from a wiki page.)

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Alvaro Herrera
Magnus Hagander wrote: > (And of course, if we want to go in *any* direction away from the wiki, > it's not going to happen in time for *this* release..) Absolutely. But if we never start, it'll never get done. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Developmen

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Joshua D. Drake
On 04/11/2018 10:06 AM, Alvaro Herrera wrote: Andres Freund wrote: On 2018-04-11 13:54:34 -0300, Alvaro Herrera wrote: The other proposal was that we could have a simple web app to track open items. After all, we now know what we need from it. A wiki page seems more laborious. (The commitfes

Re: lazy detoasting

2018-04-11 Thread Chapman Flack
On 04/11/2018 11:33 AM, Tom Lane wrote: > Chapman Flack writes: >> The mission is to implement java.sql.SQLXML, which has long been >> missing from PL/Java. >> This is the class of object your Java code can retrieve from a >> ResultSet row from a query with an XML column type. (It's also >> what c

Re: 'make check' fails

2018-04-11 Thread Bruce Momjian
On Wed, Apr 11, 2018 at 01:04:56PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Wed, Apr 11, 2018 at 12:35:41PM -0400, Tom Lane wrote: > >> We can fix this by making submake-generated-headers be a recursive > >> prerequisite for "check" as well as "all" and "install". I wonder > >> wheth

Re: lazy detoasting

2018-04-11 Thread Tom Lane
Chapman Flack writes: > On 04/11/2018 11:33 AM, Tom Lane wrote: >> OK, but if this object only lives within a single function call, >> what's the problem? The underlying row must be visible to the >> calling query, and that condition won't change for the duration >> of the call. > Well, the devi

Re: WARNING in parallel index creation.

2018-04-11 Thread Tom Lane
I wrote: > The WARNING seems to indicate that the error check in set_config_option > is too aggressive. I kind of wonder why it was placed there at all, > rather than in SQL-level operations like ExecSetVariableStmt. BTW, looking back at the thread, nobody seems to have posted an analysis of why

Re: lazy detoasting

2018-04-11 Thread Chapman Flack
On 04/11/2018 01:55 PM, Tom Lane wrote: > Chapman Flack writes: >> Well, the devilsAdvocate() function would stash the object >> in a static, then try to look at it some time in a later call >> in the same transaction. > > If you're worried about that, you should also worry about what happens > i

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Pavan Deolasee
On Wed, Apr 11, 2018 at 8:20 PM, Tom Lane wrote: > Pavan Deolasee writes: > > Or may be we simply err on the side of caution and scan the toast table > > with SnapshotAny while looking for a duplicate? That might prevent us > from > > reusing an OID for a known-dead tuple, but should save us a s

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-11 Thread Alvaro Herrera
Thanks for the discussion. Per your suggestions, I changed the check for default partition OID to an assert instead of the 'if' condition, and removed the code that attempted vainly to verify the constraint when attaching a foreign table as a partition. And pushed. I think we're done here, so ma

Re: using index or check in ALTER TABLE SET NOT NULL

2018-04-11 Thread Sergei Kornilov
Hi I noticed new merge conflict, updated version attached. regards, Sergeidiff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index bd22627..db98a98 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -215,8 +215,15 @@ WITH ( MOD

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Tom Lane
Pavan Deolasee writes: > Ok. I propose attached patches, more polished this time. I'll take these, unless some other committer is hot to do so? regards, tom lane

Re: lazy detoasting

2018-04-11 Thread Tom Lane
Chapman Flack writes: > But let me return to the earlier idea for a moment: are you saying > that it might *not* be sufficient to find an applicable snapshot at > the time of constructing the object, and register that snapshot > on TopTransactionResourceOwner? The problem is to know which snapsho

Re: lazy detoasting

2018-04-11 Thread Chapman Flack
On 04/11/2018 03:04 PM, Tom Lane wrote: > Chapman Flack writes: >> that it might *not* be sufficient to find an applicable snapshot at >> the time of constructing the object, and register that snapshot >> on TopTransactionResourceOwner? > > The problem is to know which snapshot is applicable; if

Re: Partitioned tables and covering indexes

2018-04-11 Thread Teodor Sigaev
Actually, discovered bug is not related to patch except new test faces with it, problem is: CompareIndexInfo() checks rd_opfamily for equality for all attributes, not only for key attribute. Patch attached. But it seems to me, field's names of IndexInfo structure are a bit confused now: int

Re: Partitioned tables and covering indexes

2018-04-11 Thread Alvaro Herrera
Teodor Sigaev wrote: > Patch attached. I wonder why this is a problem in opfamilies but not collations. If we don't compare collations, wouldn't it make more sense to break out of the loop once the number of keys is reached? When this code was written, there was no question as to what length the

Re: lazy detoasting

2018-04-11 Thread Andrew Gierth
> "Chapman" == Chapman Flack writes: Chapman> There's precedent for that kind of thing in PL/Java already Chapman> ... objects that Java considers alive as long as some code Chapman> holds a reference to them, but proxy for things in PG that may Chapman> only have function-call lifetime o

Re: pgsql: New files for MERGE

2018-04-11 Thread Simon Riggs
On 7 April 2018 at 18:45, Tom Lane wrote: > Simon Riggs writes: >> On 6 April 2018 at 17:22, Bruce Momjian wrote: >>> My point was that people didn't ask you to work harder on fixing the >>> patch, but in reverting it. You can work harder on fixing things in the >>> hope they change their minds

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Simon Riggs
On 11 April 2018 at 19:57, Tom Lane wrote: > Pavan Deolasee writes: >> Ok. I propose attached patches, more polished this time. > > I'll take these, unless some other committer is hot to do so? Please go ahead. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 2

Re: Gotchas about pg_verify_checksums

2018-04-11 Thread Daniel Gustafsson
> On 11 Apr 2018, at 01:53, Michael Paquier wrote: > > On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: >>> On 10 Apr 2018, at 06:21, Michael Paquier wrote: >> Does it really imply that? Either way, the tool could potentially be useful >> for debugging a broken cluster so I’m

Re: Problem while setting the fpw with SIGHUP

2018-04-11 Thread Michael Paquier
On Wed, Apr 11, 2018 at 02:09:48PM +0300, Heikki Linnakangas wrote: > I think the new behavior where the GUC only takes effect at next checkpoint > is OK. It seems quite intuitive. > > > [rebased patch version] > > Looks good at a quick glance. Assuming no objections from others, I'll take > a cl

Re: Bugs in TOAST handling, OID assignment and redo recovery

2018-04-11 Thread Tom Lane
So while looking at this, it suddenly occurred to me that probing with SnapshotDirty isn't that safe for regular (non-TOAST) Oid assignment either. SnapshotDirty will consider a row dead the instant the deleting transaction has committed, but it may remain visible to other transactions for awhile

Re: relispartition for index partitions

2018-04-11 Thread Alvaro Herrera
Amit Langote wrote: > Hi. > > I noticed that relispartition isn't set for index's partitions. This patch should fix it. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services diff --git a/src/backend/catalog/index.c b/

Re: Gotchas about pg_verify_checksums

2018-04-11 Thread Michael Paquier
On Wed, Apr 11, 2018 at 10:21:29PM +0200, Daniel Gustafsson wrote: > Right, I misunderstood your initial email but I see what you mean. Yes, you > are right and with that +1 on your patch. OK, no problem. > Naming it pg_checksums, with only verification as an option, seems to me to > imply futur

Re: Native partitioning tablespace inheritance

2018-04-11 Thread Michael Paquier
On Wed, Apr 11, 2018 at 12:52:06PM -0400, Keith Fiske wrote: > Any chance of this being an inheritable property that can simply be > overridden if the TABLESPACE flag is set when creating a child table? If > it's not set, just set the tablespace to whatever was set for the parent. I am wondering h

Re: es_query_dsa is broken

2018-04-11 Thread Thomas Munro
On Thu, Apr 12, 2018 at 4:04 AM, Andres Freund wrote: > This is an open item for v11: > > Tidy up es_query_dsa and possibly ParallelWorkerContext? > Original commit: e13029a5ce353574516c64fd1ec9c50201e705fd (principal > author: Thomas Munro; owner: Robert Haas) > Bug fix: fd7

Re: Partitioned tables and covering indexes

2018-04-11 Thread Alexander Korotkov
On Wed, Apr 11, 2018 at 10:47 PM, Alvaro Herrera wrote: > Teodor Sigaev wrote: > > > Patch attached. > > I wonder why this is a problem in opfamilies but not collations. > If we don't compare collations, wouldn't it make more sense to break out > of the loop once the number of keys is reached? >

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Peter Eisentraut
On 4/11/18 10:53, Tom Lane wrote: > It's not that much work to move the items rather than remove them, Well, toward the end of the cycle, when the list of closed items is quite long, then it does become a bit of a burden to carefully cut and paste the item in the little browser window without maki

Re: Fix for pg_stat_activity putting client hostaddr into appname field

2018-04-11 Thread Heikki Linnakangas
On 29/03/18 10:46, Michael Paquier wrote: On Tue, Mar 27, 2018 at 03:47:07PM +1300, Edmund Horner wrote: I considered whether aux processes really need those strings (especially st_clienthostname), but decided it was more consistent just to assume that they might. (It's an extra 3 kB... if we w

Re: Creation of wiki page for open items of v11

2018-04-11 Thread Tom Lane
Peter Eisentraut writes: > On 4/11/18 10:53, Tom Lane wrote: >> It's not that much work to move the items rather than remove them, > Well, toward the end of the cycle, when the list of closed items is > quite long, then it does become a bit of a burden to carefully cut and > paste the item in the

Re: Partitioned tables and covering indexes

2018-04-11 Thread Peter Geoghegan
On Wed, Apr 11, 2018 at 1:58 PM, Alexander Korotkov wrote: > It appears that INCLUDE columns might have collation defined. > For instance, following query is working: > > create index t_s1_s2_idx on t (s1) include (s2 collate "en_US.UTF-8"); > > However, I don't see any point in defining collation

Re: Native partitioning tablespace inheritance

2018-04-11 Thread Keith Fiske
On Wed, Apr 11, 2018 at 4:54 PM, Michael Paquier wrote: > On Wed, Apr 11, 2018 at 12:52:06PM -0400, Keith Fiske wrote: > > Any chance of this being an inheritable property that can simply be > > overridden if the TABLESPACE flag is set when creating a child table? If > > it's not set, just set th

Re: missing support of named convention for procedures

2018-04-11 Thread Peter Eisentraut
On 4/11/18 12:06, Andres Freund wrote: > On 2018-03-22 15:19:12 +0100, Pavel Stehule wrote: >> attached patch should to fix it > > This is still broken, and has been an open item for a bit. Peter, Could > you check whether Pavel's fix resolves the issue for you? Yes, I will work on this. -- Pet

Re: Partitioned tables and covering indexes

2018-04-11 Thread Peter Eisentraut
On 4/11/18 17:08, Peter Geoghegan wrote: >> However, I don't see any point in defining collations here, because >> INCLUDE attributes exist solely for index-only scans. So, index just >> can return value of INCLUDE attribute "as is", no point to do something >> with collation. >> >> So, I propose

  1   2   >