Re: BUG #15346: Replica fails to start after the crash

2018-08-31 Thread Michael Paquier
On Thu, Aug 30, 2018 at 11:23:54PM -0700, Michael Paquier wrote: > Yes that's a matter of safety, as I put into the truck any modules which > may use XLogFlush(). And that maps with the old code, so there is no > more surprise. Okay, I have pushed my previous version as that's the safest

Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3

2018-08-31 Thread Jean-Pierre Pelletier
Btw, pg_dump is handling this right. Jean-Pierre Pelletier Le ven. 31 août 2018 10:33, Tom Lane a écrit : > "jean.pierre.pelletier0" writes: > > To reproduce, compare the output of \dC on two built-in casts(json to > jsonb) and (xml to text) where only the the first is really "with inout". >

Re: Bug in slot.c and are replication slots ever used at Window?

2018-08-31 Thread Michael Paquier
Hi Konstantin, On Thu, Aug 30, 2018 at 11:27:31AM -0700, Michael Paquier wrote: > It seems to me that you are right here, "path" points to > pg_replslot/$SLOTNAME/state which is a file so the fsync is incorrect. > I am not sure that we'd want to publish fsync_parent_path out of fd.c > though, so

Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3

2018-08-31 Thread Tom Lane
I wrote: > Not sure if this rises to the level of a back-patchable bug. > People might be surprised if we change that output in minor releases. > But we could still squeeze it into v11, I think. I pushed a fix into HEAD & v11. regards, tom lane

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Tom Lane
I wrote: > Some of these places might be performance-critical enough that adding > a palloc/pfree cycle would not be nice. What I was considering doing > was inventing something like > > typedef union PGAlignedBuffer > { > chardata[BLCKSZ]; > double force_align; > }

Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3

2018-08-31 Thread Jean-Pierre Pelletier
Awesome, thanks! Le ven. 31 août 2018 16:46, Tom Lane a écrit : > I wrote: > > Not sure if this rises to the level of a back-patchable bug. > > People might be surprised if we change that output in minor releases. > > But we could still squeeze it into v11, I think. > > I pushed a fix into HEAD

Re: WIP: Covering + unique indexes.

2018-08-31 Thread Alvaro Herrera
I'm wondering what's the genesis of this coninclude column actually. As far as I can tell, the only reason this column is there, is to be able to print the INCLUDE clause in a UNIQUE/PK constraint in ruleutils ... but surely the same list can be obtained from the pg_index.indkey instead? --

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Michael Paquier
On Fri, Aug 31, 2018 at 03:55:51PM -0400, Tom Lane wrote: > I wrote: >> Some of these places might be performance-critical enough that adding >> a palloc/pfree cycle would not be nice. What I was considering doing >> was inventing something like >> >> typedef union PGAlignedBuffer >> { >>

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-31 Thread Andres Freund
Hi, On 2018-08-31 19:53:43 -0400, Tom Lane wrote: > My thought is to do (and back-patch) my change, and then work on yours > as a performance improvement for HEAD only. That does make sense. > I don't believe that yours would make mine redundant, either --- they > are good complementary changes

Re: Dimension limit in contrib/cube (dump/restore hazard?)

2018-08-31 Thread Alexander Korotkov
On Fri, Aug 31, 2018 at 6:18 PM Alvaro Herrera wrote: > On 2018-Aug-30, Alexander Korotkov wrote: > > > Personally I get tired with cube.out > > and cube_2.out. They are different with only few checks involving > > scientific notation. But all the patches touching cube regression > > tests

Re: file cloning in pg_upgrade and CREATE DATABASE

2018-08-31 Thread Peter Eisentraut
rebased patch, no functionality changes -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >From 5e0f60e9cf182063f2f711251430d79282be1f93 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 1 Sep 2018

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-31 Thread Andres Freund
On 2018-08-29 17:58:19 -0400, Tom Lane wrote: > I wrote: > > We could perhaps fix this with a less invasive change than what you > > suggest here, by attacking the missed-call-due-to-recursion aspect > > rather than monkeying with how relcache rebuild itself works. > > Seeing that rearranging the

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-31 Thread Tom Lane
Andres Freund writes: > Leaving that aside, I think there's one architectural aspect of my > approach that I prefer over yours: Deduplicating eager cache rebuilds > like my approach does seems quite advantageous. That is attractive, for sure, but the other side of the coin is that getting there

Re: remove ancient pre-dlopen dynloader code

2018-08-31 Thread Peter Eisentraut
On 31/08/2018 10:52, Peter Eisentraut wrote: > On 16/08/2018 16:10, Andres Freund wrote: If I had my druthers, we'd just remove all that configure magic for selecting these files and just use ifdefs. Personally I find it occasionally that they're linked into place, rather than

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Fabien COELHO
Hello, Okay, for the memo replay_image_masked and master_image_masked in xlog.c could make use of the new structure. SetWALSegSize in pg_standby.c and WriteEmptyXLOG in pg_resetwal.c, and pg_upgrade's file.c could also be patched. I intentionally didn't change

Re: Some pgq table rewrite incompatibility with logical decoding?

2018-08-31 Thread Tomas Vondra
Hi, On 08/29/2018 12:01 AM, Tomas Vondra wrote: > On 08/28/2018 07:41 PM, Jeremy Finzel wrote: >> Jeremy, are you able to reproduce the issue locally, using pgq? >> That would be very valuable. >> >> >> Tomas et al: >> >> We have hit this error again, and we plan to snapshot the

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Tom Lane
Michael Paquier writes: > On Fri, Aug 31, 2018 at 03:55:51PM -0400, Tom Lane wrote: >> I also fixed a few places that were using the palloc solution, and >> one that was actually doing hand-alignment of the pointer (ugh). >> I didn't try to be thorough about getting rid of such pallocs, >> just

Re: pg_verify_checksums failure with hash indexes

2018-08-31 Thread Robert Haas
On Thu, Aug 30, 2018 at 7:27 AM, Amit Kapila wrote: > We have previously changed this define in 620b49a1 with the intent to > allow many non-unique values in hash indexes without worrying to reach > the limit of the number of overflow pages. I think this didn't occur > to us that it won't work

RE: [HACKERS] Proposal to add work_mem option to postgres_fdw module

2018-08-31 Thread Shinoda, Noriyoshi (PN Japan GCS Delivery)
Eisentraut-san Thank you for becoming a reviewer. > The reason is that postgres_fdw filters out connection settings that are > marked debug ("D"), and the "options" keyword is marked as such. > I think this is wrong. Just remove that designation and then this will work. > > (Perhaps

Re: pg_verify_checksums failure with hash indexes

2018-08-31 Thread Dilip Kumar
On Sat, Sep 1, 2018 at 8:22 AM, Robert Haas wrote: > On Thu, Aug 30, 2018 at 7:27 AM, Amit Kapila wrote: >> We have previously changed this define in 620b49a1 with the intent to >> allow many non-unique values in hash indexes without worrying to reach >> the limit of the number of overflow

Re: Progress reporting for pg_verify_checksums

2018-08-31 Thread Fabien COELHO
Hallo Michael, my colleague Bernd Helmle recently added progress reporting to our pg_checksums application[1]. I have now forward ported this to pg_verify_checksums for the September commitfest, please see the attached patch. It seems that the patch does not apply cleanly on master, neither

Re: patch to allow disable of WAL recycling

2018-08-31 Thread Tomas Vondra
On 08/27/2018 03:59 AM, Thomas Munro wrote: > On Mon, Aug 27, 2018 at 10:14 AM Tomas Vondra > mailto:tomas.von...@2ndquadrant.com>> wrote: >> zfs (Linux) >> --- >> On scale 200, there's pretty much no difference. > > Speculation: It could be that the dnode and/or indirect blocks that >

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Michael Paquier
On Fri, Aug 31, 2018 at 07:59:58PM -0400, Tom Lane wrote: > The others you mention could be changed, probably, but I didn't > bother as they didn't seem performance-critical. It is not really critical indeed. There is an argument to change them so as other folks get used to it though. > (I also

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-31 Thread Fabien COELHO
Hello Yugo-san, Attached is a patch to allow pg_verity_checksums to specify a database to scan. This is usefule for users who want to verify checksums of relations in a specific database. We can specify a database by OID using -d or --dboid option. Also, when -g or --global-only is used

PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Georgy Buranov
Hi. I have a question about PostgreSQL logical decoder output plugin. I am not specialist in Postgres at all, so maybe I miss some very basic point. In the plugin, I want to always get all the values (even those that are unchanged toast data) When I try to get the datum that is internal on

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Tom Lane
Maksim Milyutin writes: > 30.08.2018 19:52, Peter Eisentraut wrote: >> I think the hint is backwards. When you don't have permission to chmod >> the tablespace directory, you probably want to fix the permissions on >> the tablespace directory or its parent. > In this case I propose to: > -

Re: BUG #15346: Replica fails to start after the crash

2018-08-31 Thread Michael Paquier
On Fri, Aug 31, 2018 at 02:52:06PM +0900, Kyotaro HORIGUCHI wrote: > The patch inhibits turning off updateMinRecoveryPoint on other > than the startup process running crash-recovery except at the end > of XLogNeedsFlush. Yes that's a matter of safety, as I put into the truck any modules which may

Re: Extra word in src/backend/optimizer/README

2018-08-31 Thread Etsuro Fujita
(2018/08/31 4:37), Magnus Hagander wrote: On Thu, Aug 30, 2018 at 1:27 PM, Etsuro Fujita mailto:fujita.ets...@lab.ntt.co.jp>> wrote: Here is a small patch to remove $SUBJECT: s/has contains/contains/ Definitely looks correct. A good first test to verify your own commit/push privileges,

TR: pgadmin not displaying data from postgresql_fdw

2018-08-31 Thread Olivier Leprêtre
Hi, Please find a question that didn't get an answer in the pgsql-sql list. I hope I'll get an answer here. Thanks, Olivier De : Olivier Leprêtre [mailto:o.lepre...@gmail.com] Envoyé : mardi 28 août 2018 17:37 À : 'pgsql-...@lists.postgresql.org' Objet : pgadmin not displaying

Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module

2018-08-31 Thread Masahiko Sawada
On Tue, Aug 28, 2018 at 12:55 PM, Shinoda, Noriyoshi (PN Japan GCS Delivery) wrote: > Hi Everyone, thank you for your comment. > >>> I like the direction of your thinking, but it seems to me that this >>> would cause a problem if you want to set search_path=foo,bar. >>... OPTIONS ( host

Re: 10.5 but not 10.4: backend startup during reindex system: could not read block 0 in file "base/16400/..": read only 0 of 8192 bytes

2018-08-31 Thread Justin Pryzby
On Thu, Aug 30, 2018 at 01:25:00PM -0700, Andres Freund wrote: > On August 30, 2018 1:24:12 PM PDT, Justin Pryzby wrote: > >On Thu, Aug 30, 2018 at 01:18:59PM -0700, Andres Freund wrote: > >> Could you check if both of the proposed attempts at fixing the issue > >> also solves your problem? > > >

RE: automatic restore point

2018-08-31 Thread Yotsunaga, Naoki
-Original Message- From: Yotsunaga, Naoki [mailto:yotsunaga.na...@jp.fujitsu.com] Sent: Tuesday, June 26, 2018 10:18 AM To: Postgres hackers Subject: automatic restore point Hi, I attached a patch to output the LSN before execution to the server log when executing a specific command

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2018-08-31 Thread Ashutosh Bapat
On Thu, Aug 30, 2018 at 2:23 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > >> I won't be working on this actively in the next commitfest. I will be >> glad if somebody else wants to take this up. If there's nobody, >> probably we should mark this entry as "returned with feedback" in the >>

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Michael Banck
Hi, Am Donnerstag, den 30.08.2018, 19:02 -0400 schrieb Tom Lane: > Andres Freund writes: > > On 2018-08-30 18:11:40 -0400, Tom Lane wrote: > > > I suspect people will complain about the added cost of doing that. > > I think the compiler will just optimize it away. > > Maybe. In any case, the

Re: CREATE ROUTINE MAPPING

2018-08-31 Thread Masahiko Sawada
On Thu, Jan 25, 2018 at 2:13 PM, David Fetter wrote: > On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: >> > >> > >> > > >> > > But other situations seem un-handle-able to me: >> > > >> > > SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true; >> > >> > Do we have any

RE: speeding up planning with partitions

2018-08-31 Thread Kato, Sho
Hi, Amit Great! With the total number of records being 6400, I benchmarked while increasing the number of partitions from 100 to 6400. Applying three all patches, 20% performance improved for 100 partitions. I have the same number of records for each partition, do you do the same? Also, in my

Re: FETCH FIRST clause PERCENT option

2018-08-31 Thread Surafel Temesgen
On Tue, Aug 28, 2018 at 7:33 PM Erik Rijkers wrote: > ; > > TRAP: FailedAssertion("!(slot != ((void *)0))", File: "execTuples.c", > Line: 42 The attache patch include a fix for the crash .can you check it again? Regards Surafel diff --git a/doc/src/sgml/ref/select.sgml

Re: Startup cost of sequential scan

2018-08-31 Thread Alexander Korotkov
On Thu, Aug 30, 2018 at 6:55 PM Tom Lane wrote: > Alexander Korotkov writes: > > I understand that startup cost is not "time to find the first row". > > But I think this example highlight not one but two issues. > > 1) Row count estimates for joins are wrong. > > Yup. > > > 2) Rows are assumed

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-31 Thread Yugo Nagata
On Mon, 27 Aug 2018 21:05:33 +0900 Yugo Nagata wrote: > On Mon, 27 Aug 2018 13:34:12 +0200 > Michael Banck wrote: > > > Hi, > > > > On Mon, Aug 27, 2018 at 07:53:36PM +0900, Yugo Nagata wrote: > > > On Fri, 24 Aug 2018 18:01:09 +0200 > > > Peter Eisentraut wrote: > > > > I'm curious about

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Peter Eisentraut
On 31/08/2018 01:37, Tom Lane wrote: > The fact that some of these are pretty old and we've not noticed is > not good. It suggests that we don't currently have any compilers in the > buildfarm that under-align char[] arrays on the stack, which seems like > a gotcha waiting to bite us. I wonder

Re: [HACKERS] GnuTLS support

2018-08-31 Thread Peter Eisentraut
On 20/08/2018 05:13, Michael Paquier wrote: > Patch v6 of this thread is failing to apply. Could you rebase? attached Changes in v7 since v6: - Added support for ssl_passphrase_command. - Test suite needed some adjustment because GnuTLS doesn't appear to understand the previously used file

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-31 Thread Etsuro Fujita
(2018/08/30 20:25), Etsuro Fujita wrote: (2018/08/29 18:40), Etsuro Fujita wrote: (2018/08/29 0:21), Jonathan S. Katz wrote: On Aug 24, 2018, at 8:38 AM, Etsuro Fujita wrote: (2018/08/24 11:47), Michael Paquier wrote: On Thu, Aug 23, 2018 at 10:00:49PM +0900, Etsuro Fujita wrote: I tried

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Rafia Sabih
On Fri, Aug 24, 2018 at 3:05 PM, Maksim Milyutin wrote: > On 08/24/2018 05:18 AM, Michael Paquier wrote: > > On Thu, Aug 23, 2018 at 02:24:25PM +0300, Maksim Milyutin wrote: >> >>> I want to add patch that prints hint to set required owner for the >>> tablespace directory if this is the cause of

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Rafia Sabih
On Fri, Aug 31, 2018 at 3:30 PM, Maksim Milyutin wrote: > On 08/31/2018 11:55 AM, Rafia Sabih wrote: > > > Adding to that this patch needs a rebase. And, please don't forget to run > 'git diff --check', as it has some white-space issues. > > > git apply

Re: Negotiating the SCRAM channel binding type

2018-08-31 Thread Peter Eisentraut
On 05/08/2018 14:45, Michael Paquier wrote: > On Sun, Aug 05, 2018 at 03:30:43PM +0300, Heikki Linnakangas wrote: >> That test just tested that the scram_channel_binding libpq option works, but >> I removed the option. I know you wanted to keep it as a feature flag, but as >> discussed earlier, I

Re: Undo logs

2018-08-31 Thread Dilip Kumar
On Fri, Aug 31, 2018 at 3:08 PM, Dilip Kumar wrote: > Hello hackers, > > As Thomas has already mentioned upthread that we are working on an > undo-log based storage and he has posted the patch sets for the lowest > layer called undo-log-storage. > > This is the next layer which sits on top of the

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Maksim Milyutin
On 08/31/2018 01:12 PM, Rafia Sabih wrote: On Fri, Aug 31, 2018 at 3:30 PM, Maksim Milyutin > wrote: On 08/31/2018 11:55 AM, Rafia Sabih wrote: Adding to that this patch needs a rebase. And, please don't forget to run 'git diff --check', as it has

Re: remove ancient pre-dlopen dynloader code

2018-08-31 Thread Peter Eisentraut
On 16/08/2018 16:10, Andres Freund wrote: >>> If I had my druthers, we'd just remove all that configure magic for >>> selecting these files and just use ifdefs. Personally I find it >>> occasionally that they're linked into place, rather than built under >>> their original name. >> >> Even if we

Re: Undo logs

2018-08-31 Thread Dilip Kumar
Hello hackers, As Thomas has already mentioned upthread that we are working on an undo-log based storage and he has posted the patch sets for the lowest layer called undo-log-storage. This is the next layer which sits on top of the undo log storage, which will provide an interface for prepare,

Re: automatic restore point

2018-08-31 Thread Pavel Stehule
2018-08-31 10:14 GMT+02:00 Yotsunaga, Naoki : > -Original Message- > From: Yotsunaga, Naoki [mailto:yotsunaga.na...@jp.fujitsu.com] > Sent: Tuesday, June 26, 2018 10:18 AM > To: Postgres hackers > Subject: automatic restore point > > Hi, I attached a patch to output the LSN before

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Maksim Milyutin
On 08/31/2018 11:55 AM, Rafia Sabih wrote: Adding to that this patch needs a rebase. And, please don't forget to run 'git diff --check', as it has some white-space issues. Hmm, it's odd. Provided patch is fluently applied on the current master HEAD (2e39f69) and *git diff --check* doesn't

Re: pg_verify_checksums vs windows

2018-08-31 Thread Amit Kapila
On Thu, Aug 30, 2018 at 5:04 PM Magnus Hagander wrote: > > On Thu, Aug 30, 2018 at 1:32 PM, Amit Kapila wrote: >> >> >> Okay. I will commit this in a day or so after once verifying it on >> PG11 as well. I think this needs to be backpatched, let me know if >> you think otherwise. >> > >

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-31 Thread Jonathan S. Katz
On 8/31/18 7:54 AM, Etsuro Fujita wrote: > (2018/08/30 20:25), Etsuro Fujita wrote: >> (2018/08/29 18:40), Etsuro Fujita wrote: >>> (2018/08/29 0:21), Jonathan S. Katz wrote: > On Aug 24, 2018, at 8:38 AM, Etsuro > Fujita wrote: > (2018/08/24 11:47), Michael Paquier wrote: >> On

Re: Hint to set owner for tablespace directory

2018-08-31 Thread Maksim Milyutin
30.08.2018 19:52, Peter Eisentraut wrote: On 23/08/2018 13:24, Maksim Milyutin wrote: I have noticed the novice users are stuck trying to create tablespace over a directory whose owner is not the system postgres user. They observed the message "could not set permissions on directory ...:

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-31 Thread Etsuro Fujita
(2018/08/31 21:30), Jonathan S. Katz wrote: On 8/31/18 7:54 AM, Etsuro Fujita wrote: (2018/08/30 20:25), Etsuro Fujita wrote: (2018/08/29 18:40), Etsuro Fujita wrote: (2018/08/29 0:21), Jonathan S. Katz wrote: On Aug 24, 2018, at 8:38 AM, Etsuro Fujita wrote: (2018/08/24 11:47), Michael

Progress reporting for pg_verify_checksums

2018-08-31 Thread Michael Banck
Hi, my colleague Bernd Helmle recently added progress reporting to our pg_checksums application[1]. I have now forward ported this to pg_verify_checksums for the September commitfest, please see the attached patch. Here's the description: This optionally prints the progress of

TR: redundant constraint_schema

2018-08-31 Thread Olivier Leprêtre
Hi, Please find a question that didn't get an answer in the pgsql-sql list. I hope I'll get an answer here. Thanks, Olivier De : Olivier Leprêtre [mailto:o.lepre...@gmail.com] Envoyé : mercredi 29 août 2018 15:49 À : 'pgsql-...@lists.postgresql.org' Objet : redundant

Re: remove ancient pre-dlopen dynloader code

2018-08-31 Thread Andres Freund
On 2018-08-31 10:52:18 +0200, Peter Eisentraut wrote: > How about this: We only have two nonstandard dlopen() implementations > left: Windows and (old) HP-UX. We move those into src/port/dlopen.c and > treat it like a regular libpgport member. That gets rid of all those > duplicative empty

Re: FailedAssertion on partprune

2018-08-31 Thread Jaime Casanova
On Thu, 16 Aug 2018 at 11:38, Alvaro Herrera wrote: > > On 2018-Jul-23, Jaime Casanova wrote: > > > > I was trying sqlsmith on REL_11_STABLE (commit > > 1b957e59b92dc44c14708762f882d7910463a9ac) with a database i have at > > hand, and got an assertion failure. > > It seems to happen during

Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3

2018-08-31 Thread Tom Lane
"jean.pierre.pelletier0" writes: > To reproduce, compare the output of \dC on two built-in casts(json to jsonb) > and (xml to text) where only the the first is really "with inout". Hm, yeah, it just does " CASE WHEN castfunc = 0 THEN '(binary coercible)'\n"

Re: remove ancient pre-dlopen dynloader code

2018-08-31 Thread Tom Lane
Peter Eisentraut writes: > How about this: We only have two nonstandard dlopen() implementations > left: Windows and (old) HP-UX. We move those into src/port/dlopen.c and > treat it like a regular libpgport member. That gets rid of all those > duplicative empty per-platform files. +1. I

Re: Dimension limit in contrib/cube (dump/restore hazard?)

2018-08-31 Thread Alvaro Herrera
On 2018-Aug-30, Alexander Korotkov wrote: > Personally I get tired with cube.out > and cube_2.out. They are different with only few checks involving > scientific notation. But all the patches touching cube regression > tests should update both cube.out and cube_2.out. I propose to split >

Re: [HACKERS] WIP: Aggregation push-down

2018-08-31 Thread Antonin Houska
Antonin Houska wrote: > I've reworked the patch so that separate RelOptInfo is used for grouped > relation. The attached patch is only the core part. Neither postgres_fdw > changes nor the part that tries to avoid the final aggregation is included > here. I'll add these when the patch does not

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Andres Freund
Hi, On 2018-08-31 16:55:37 +0200, Georgy Buranov wrote: > Ok, thank you very much for your explanation, > > maybe I need something else in my case. > > As far as I understand, "On-disk toasted data for tuples from the WAL > are not guaranteed in any way to be retain", but still, the LATEST >

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Georgy Buranov
> Again, you can set REPLICA IDENTITY to FULL and it'll be there. > So, why I think this is complicated * We use primary keys for all tables, so we do not need REPLICA IDENTITY full actually. As far as I understand, it will make master/slave replication ineffective as well * I need the

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Tom Lane
Michael Banck writes: > Am Donnerstag, den 30.08.2018, 19:02 -0400 schrieb Tom Lane: >> Maybe. In any case, the attached version avoids any need for memcpy >> and is, I think, cleaner code anyhow. It fixes the problem for me >> with Fedora's gcc, though I'm not sure that it'd be enough to get

Re: FailedAssertion on partprune

2018-08-31 Thread Jonathan S. Katz
On 8/29/18 1:38 PM, Robert Haas wrote: > On Mon, Aug 27, 2018 at 6:05 PM, Jonathan S. Katz > wrote: >> On behalf of the RMT, I just want to make sure this keeps moving along. >> It sounds like the next step is for Robert to verify that [3] is the >> expected >> behavior and then David can decide

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Georgy Buranov
Ok, thank you very much for your explanation, maybe I need something else in my case. As far as I understand, "On-disk toasted data for tuples from the WAL are not guaranteed in any way to be retain", but still, the LATEST value for the same cell should exist in postgres (in on-disk toast if it

Re: pg_verify_checksums and -fno-strict-aliasing

2018-08-31 Thread Tom Lane
Michael Paquier writes: > On Thu, Aug 30, 2018 at 07:37:37PM -0400, Tom Lane wrote: >> Anyway, I'll work on a patch for that, unless you were on it already? > I have begun working on that and am less than halfway through it as I > needed a fresh problem, however I am not sure I would be able to

Re: TupleTableSlot abstraction

2018-08-31 Thread Andres Freund
Hi, On 2018-08-31 10:05:05 +0530, Amit Khandekar wrote: > On 28 August 2018 at 22:43, Ashutosh Bapat > >> I think I was wrong at saying that we should remove this. I think you > >> were right that it should become a callback... > > > We have replaced all slot_getsysattrs() with

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Andres Freund
Hi, Hi, On 2018-08-31 15:36:26 +0200, Georgy Buranov wrote: > I am not specialist in Postgres at all, so maybe I miss some very > basic point. In the plugin, I want to always get all the values (even > those that are unchanged toast data) > When I try to get the datum that is internal on disk

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Andres Freund
On 2018-08-31 17:34:02 +0200, Georgy Buranov wrote: > > Again, you can set REPLICA IDENTITY to FULL and it'll be there. > > > > So, why I think this is complicated > > * We use primary keys for all tables, so we do not need REPLICA > IDENTITY full actually. As far as I understand, it will make >

Re: PostgreSQL logical decoder output plugin - unchanged toast data

2018-08-31 Thread Georgy Buranov
Ok, I got false understanding that REPLICA IDENTITY is used for something more than a WAL. This is basically not true. So, what I can do * Set the REPLICA IDENTITY to full, and in this case I can still get the pk from rd_pkindex. In this case the WAL will be bigger, but we will have all the

Re: Negotiating the SCRAM channel binding type

2018-08-31 Thread Michael Paquier
On Fri, Aug 31, 2018 at 12:18:52PM +0200, Peter Eisentraut wrote: > I was updating the gnutls patch for the changed channel binding setup, > and I noticed that the 002_scram.pl test now passes even though the > gnutls patch currently does not support channel binding. So AFAICT, > we're not