Re: Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence

2019-09-30 Thread Andrew Gierth
> "Antonin" == Antonin Houska writes: >> It is set to false for numeric and float4, float8. Antonin> Are you sure about these? numeric values can compare equal but have different display scales (see hash_numeric). float4 and float8 both have representations for -0, which compares equal

Re: Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence

2019-09-30 Thread Antonin Houska
Anastasia Lubennikova wrote: > The patch implementing new opclass option is attached. > > It adds new attribute pg_opclass.opcisbitwise, which is set to true if opclass > equality is the same as binary equality. > By default it is true. I think the default value should be false and we should

Re: recovery_min_apply_delay in archive recovery causes assertion failure in latch

2019-09-30 Thread Michael Paquier
On Mon, Sep 30, 2019 at 05:50:03PM +0900, Fujii Masao wrote: > Thanks for the review! OK, attached is the patch which also added > two assertion checks as you described. Thanks, looks fine. The indentation looks a bit wrong for the comments, but that's a nit. -- Michael signature.asc

Re: pgbench - allow to create partitioned tables

2019-09-30 Thread Amit Kapila
On Mon, Sep 30, 2019 at 5:17 PM Fabien COELHO wrote: > > > > I don't want to introduce a new pattern in tests which people can then > > tomorrow copy at other places even though such code is not required. > > OTOH, if there is a genuine need for the same, then I am fine. > > Hmmm. The committer

Re: A comment fix in xlogreader.c

2019-09-30 Thread Kyotaro Horiguchi
At Thu, 26 Sep 2019 11:57:59 +0900, Michael Paquier wrote in <20190926025759.gb2...@paquier.xyz> > On Thu, Sep 26, 2019 at 11:08:09AM +0900, Kyotaro Horiguchi wrote: > > While rechecking another patch, I found that 709d003fbd forgot to > > edit a comment mentioning three members removed from > >

Re: Attempt to consolidate reading of XLOG page

2019-09-30 Thread Kyotaro Horiguchi
Hello, At Sat, 28 Sep 2019 15:00:35 +0200, Antonin Houska wrote in <9236.1569675635@antos> > Antonin Houska wrote: > > > Alvaro Herrera wrote: > > > > > BTW that tli_p business to the openSegment callback is horribly > > > inconsistent. Some callers accept a NULL tli_p, others will

Re: Hooks for session start and end, take two

2019-09-30 Thread Michael Paquier
On Mon, Sep 30, 2019 at 02:46:42PM -0300, Fabrízio de Royes Mello wrote: > Makes sense to me. I become a reviewer and run all tests (make check && > make check-world) and everything is ok. Changed status to "ready for > commiter". Thanks. There was an extra problem in the module hidden in the

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Alexander Korotkov
On Mon, Sep 30, 2019 at 10:54 PM Peter Geoghegan wrote: > > On Sun, Sep 29, 2019 at 8:12 AM Alexander Korotkov > wrote: > > I just managed to reproduce this using two sessions on master branch. > > > > session 1 > > session 2 > > Was the involvement of the pending list stuff in Chen's

Re: Commit fest 2019-09

2019-09-30 Thread Amit Kapila
On Tue, Oct 1, 2019 at 12:54 AM Alvaro Herrera wrote: > > Hello, > > After closing a few patches that have been dead for months, and moving > the rest to the next commitfest, here's the results: > > statusstring │ week1 │ week2 │ week3 │ week4 │ final >

Re: Memory Accounting

2019-09-30 Thread Tomas Vondra
On Mon, Sep 30, 2019 at 01:34:13PM -0700, Jeff Davis wrote: On Sun, 2019-09-29 at 00:22 +0200, Tomas Vondra wrote: Notice that when CLOBBER_FREED_MEMORY is defined, the code first > calls > wipe_mem and then accesses fields of the (wiped) block. > Interesringly > enough, the regression tests

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-09-30 Thread Paul Guo
> > BTW in the future if you have two separate patches, please post them in > separate threads and use separate commitfest items for each, even if > they have minor conflicts. > Sure. Thanks.

Re: PL/pgSQL — "commit" illegal in the executable section of a block statement that has an exception section

2019-09-30 Thread Christophe Pettus
> On Sep 30, 2019, at 15:37, Bryn Llewellyn wrote: > I wrote up the problem here: > > https://github.com/yugabyte/yugabyte-db/issues/2464 This is documented; it's the very last line of the page you reference in the Github issue: A transaction cannot be ended inside a block with

Re: subscriptionCheck failures on nightjar

2019-09-30 Thread Tom Lane
Andrew Dunstan writes: > On 9/20/19 6:17 PM, Tom Lane wrote: >> Dromedary is running the last release of macOS that supports 32-bit >> hardware, so if we decide to kick that to the curb, I'd either shut >> down the box or put some newer Linux or BSD variant on it. > Well, nightjar is on FBSD 9.0

Re: Don't codegen deform code for virtual tuples in expr eval for scan fetch

2019-09-30 Thread Soumyadeep Chakraborty
Awesome! Thanks so much for all the review! :) -- Soumyadeep

Re: SSL tests failing for channel_binding with OpenSSL <= 1.0.1

2019-09-30 Thread Michael Paquier
On Mon, Sep 30, 2019 at 11:08:20AM -0700, Jeff Davis wrote: > On Mon, 2019-09-30 at 09:37 -0400, Tom Lane wrote: >> The committed fix looks odd: isn't the number of executed tests the >> same in both code paths? (I didn't try it yet.) > > test_connect_fails actually runs two tests, one for the

Re: Don't codegen deform code for virtual tuples in expr eval for scan fetch

2019-09-30 Thread Andres Freund
Hi, On 2019-09-30 09:14:45 -0700, Soumyadeep Chakraborty wrote: > I don't feel very strongly about the changes I proposed. > > > > I completely agree, that was an important consideration. > > > > > > I had some purely cosmetic suggestions: > > > 1. Rename ExecComputeSlotInfo to eliminate the

PL/pgSQL — "commit" illegal in the executable section of a block statement that has an exception section

2019-09-30 Thread Bryn Llewellyn
I work for YugaByte, Inc (www.yugabyte.com ). YugabyteDB re-uses the source code that implements the “upper half” of PostgreSQL Version 11.2. See here: https://blog.yugabyte.com/distributed-postgresql-on-a-google-spanner-architecture-query-layer/ This means that the

Re: Commit fest 2019-09

2019-09-30 Thread David Steele
On 9/30/19 5:26 PM, David Fetter wrote: Thanks for doing all this work! +1! -- -David da...@pgmasters.net

Value of Transparent Data Encryption (TDE)

2019-09-30 Thread Bruce Momjian
For plan for full-cluster Transparent Data Encryption (TDE) is here: https://wiki.postgresql.org/wiki/Transparent_Data_Encryption#TODO_for_Full-Cluster_Encryption The values it has, I think, are: * encrypts data for anyone with read-access to the file system (but not memory)

Re: Commit fest 2019-09

2019-09-30 Thread David Fetter
On Mon, Sep 30, 2019 at 04:24:15PM -0300, Alvaro Herrera wrote: > Hello, > > After closing a few patches that have been dead for months, and moving > the rest to the next commitfest, here's the results: > > statusstring │ week1 │ week2 │ week3 │ week4 │ final >

Transparent Data Encryption (TDE) and encrypted files

2019-09-30 Thread Bruce Momjian
For full-cluster Transparent Data Encryption (TDE), the current plan is to encrypt all heap and index files, WAL, and all pgsql_tmp (work_mem overflow). The plan is: https://wiki.postgresql.org/wiki/Transparent_Data_Encryption#TODO_for_Full-Cluster_Encryption We don't see much value to

msys2 is missing pexports

2019-09-30 Thread Andrew Dunstan
We rely on pexports to extract exported symbols from DLL files (e.g. for linking in PLs) when building with mingw. However, this program isn't present in msys2. Instead the approved way is apparently to call "gendef" from the appropriate toolset (e.g. /mingw64/bin). I have worked around this on

Re: Memory Accounting

2019-09-30 Thread Jeff Davis
On Sun, 2019-09-29 at 00:22 +0200, Tomas Vondra wrote: > Notice that when CLOBBER_FREED_MEMORY is defined, the code first > > calls > > wipe_mem and then accesses fields of the (wiped) block. > > Interesringly > > enough, the regression tests don't seem to exercise these bits - > > I've > > tried

Re: pgsql: Implement jsonpath .datetime() method

2019-09-30 Thread Robert Haas
On Sun, Sep 29, 2019 at 10:30 AM Alexander Korotkov wrote: > So, jsonpath behaves like 100 is not greater than 2020. This > looks like plain false. And user can't expect that unless she is > familiar with our particular issues. Now I got opinion that such > errors shouldn't be suppressed.

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Peter Geoghegan
On Sun, Sep 29, 2019 at 8:12 AM Alexander Korotkov wrote: > I just managed to reproduce this using two sessions on master branch. > > session 1 > session 2 Was the involvement of the pending list stuff in Chen's example just a coincidence? Can you recreate the problem while eliminating that

Re: Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

2019-09-30 Thread Tom Lane
Peter Eisentraut writes: > Instead of AC_STRUCT_TIMEZONE we use our own variant called > PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were > found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we > don't use tzname anymore, so we don't need this anymore. Hmm.

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Peter Geoghegan
On Mon, Sep 30, 2019 at 11:00 AM Alexander Korotkov wrote: > Thank you for pointing. I remember this thread, but don't remember > details. I'll reread it. I think that doing this now would be a good idea: """ Defensively checking the page type (pending, posting, etc) within

Re: Commit fest 2019-09

2019-09-30 Thread Alvaro Herrera
Hello, After closing a few patches that have been dead for months, and moving the rest to the next commitfest, here's the results: statusstring │ week1 │ week2 │ week3 │ week4 │ final ┼───┼───┼───┼───┼─── Needs review │ 165 │

Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

2019-09-30 Thread Peter Eisentraut
Instead of AC_STRUCT_TIMEZONE we use our own variant called PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we don't use tzname anymore, so we don't need this anymore. The attached patches revert back to the

Re: Auxiliary Processes and MyAuxProc

2019-09-30 Thread Mike Palmiotto
On Thu, Sep 26, 2019 at 6:03 PM Mike Palmiotto wrote: > > On Thu, Sep 26, 2019 at 10:56 AM Alvaro Herrera > wrote: > > > > > Well, I think it would be easier to manage as split patches, yeah. > > I think it'd be infrastructure that needs to be carefully reviewed, > > while the other ones are

Re: Commit fest 2019-09

2019-09-30 Thread Alvaro Herrera
On 2019-Sep-30, Alvaro Herrera wrote: > I've closed the following items as Returned with Feedback. These were > all Waiting-on-Author for a long time, with no new versions posted. In > most cases these are still patches that appear to be useful ... but if > they're not kept updated to feedback,

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Peter Geoghegan
On Sun, Sep 29, 2019 at 10:38 PM Andrey Borodin wrote: > As far as I understand deleted page is stamped with > GinPageSetDeleteXid(page, ReadNewTransactionId()); > It will not be recycled until that Xid is far behind. That only gets used within posting tree pages, though. ginInsertCleanup() is

Re: Partitioning versus autovacuum

2019-09-30 Thread Greg Stark
Actually -- I'm sorry to followup to myself (twice) -- but that's wrong. That Todo item predates the modern partitioning code. It came from when the partitioned statistics were added for inheritance trees. The resulting comment almost doesn't make sense any more since it talks about updates to the

Re: Commit fest 2019-09

2019-09-30 Thread Alvaro Herrera
I've closed the following items as Returned with Feedback. These were all Waiting-on-Author for a long time, with no new versions posted. In most cases these are still patches that appear to be useful ... but if they're not kept updated to feedback, they're clutter in the CF system. patch_id │

Re: Partitioning versus autovacuum

2019-09-30 Thread Greg Stark
Actually I did just find it in the To-do wiki: Have autoanalyze of parent tables occur when child tables are modified - http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php On Mon., Sep. 30, 2019, 1:48 p.m. Greg Stark, wrote: > So we now support `ANALYZE

Re: errbacktrace

2019-09-30 Thread Peter Eisentraut
On 2019-09-27 17:50, Alvaro Herrera wrote: > On 2019-Sep-13, Alvaro Herrera wrote: > >> On 2019-Aug-20, Peter Eisentraut wrote: >> >>> The memory management of that seems too complicated. The "extra" >>> mechanism of the check/assign hooks only supports one level of malloc. >>> Using a List

Re: Minimal logical decoding on standbys

2019-09-30 Thread Robert Haas
On Mon, Sep 30, 2019 at 7:35 AM Amit Khandekar wrote: > Alright. Attached is the updated patch that splits the file into two > files, one that does only xmin related testing, and the other test > file that tests conflict recovery scenarios, and also one scenario > where drop-database drops the

Re: SSL tests failing for channel_binding with OpenSSL <= 1.0.1

2019-09-30 Thread Jeff Davis
On Mon, 2019-09-30 at 09:37 -0400, Tom Lane wrote: > Michael Paquier writes: > > On Fri, Sep 27, 2019 at 11:44:57AM +0900, Michael Paquier wrote: > > > We need to do something similar to c3d41cc for the test, as per > > > the > > > attached. I have tested that with OpenSSL 1.0.1 and 1.0.2 to > >

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Alexander Korotkov
On Sun, Sep 29, 2019 at 10:53 PM Peter Geoghegan wrote: > On Sun, Sep 29, 2019 at 7:38 AM Alexander Korotkov > wrote: > > Starting from root seems OK for me, because vacuum blocks all > > concurrent inserts before doing this. But this needs to be properly > > documented in readme. > > I never

Partitioning versus autovacuum

2019-09-30 Thread Greg Stark
So we now support `ANALYZE partitioned_table` which will gather statistics for the main table by gathering stats from all the partitions. However as far as I can tell autovacuum will never actually trigger this analyze. Because we never generate any update records for the parent table in the

Re: Hooks for session start and end, take two

2019-09-30 Thread Fabrízio de Royes Mello
On Sun, Sep 29, 2019 at 10:29 PM Michael Paquier wrote: > > This code path can only be taken by normal backends, so that would > apply, still I don't actually see why we should limit us here on the > backend side. If for a reason or another those two code paths begin > to be taken by a backend

Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

2019-09-30 Thread Alexander Korotkov
On Mon, Sep 30, 2019 at 8:38 AM Andrey Borodin wrote: > > > 29 сент. 2019 г., в 21:27, Alexander Korotkov > > написал(а): > > > > Patch with fix is attached. Idea is simple: ginScanToDelete() now > > keeps exclusive lock on left page eliminating the need to relock it. > > So, we preserve

Re: Optimize partial TOAST decompression

2019-09-30 Thread Tomas Vondra
On Mon, Sep 30, 2019 at 09:20:22PM +0500, Andrey Borodin wrote: 30 сент. 2019 г., в 20:56, Tomas Vondra написал(а): I mean this: /* * Use int64 to prevent overflow during calculation. */ compressed_size = (int32) ((int64) rawsize * 9 + 8) / 8; I'm not very familiar with pglz

Re: Proposal: Add more compile-time asserts to expose inconsistencies.

2019-09-30 Thread Andres Freund
Hi, On September 30, 2019 10:20:54 AM PDT, Tom Lane wrote: >Andres Freund writes: >> On 2019-09-19 04:46:27 +, Smith, Peter wrote: >>> In the attached patch example I have defined a new macro >>> StaticAssertDecl. A typical usage of it is shown in the relpath.c >>> file. > >> I'm in favor

Re: Proposal: Add more compile-time asserts to expose inconsistencies.

2019-09-30 Thread Tom Lane
Andres Freund writes: > On 2019-09-19 04:46:27 +, Smith, Peter wrote: >> In the attached patch example I have defined a new macro >> StaticAssertDecl. A typical usage of it is shown in the relpath.c >> file. > I'm in favor of adding that - in fact, when I was working on adding a a >

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-09-30 Thread Alvaro Herrera
On 2019-Mar-19, Paul Guo wrote: > Hello, Postgres hackers, > > Please see the attached patches. BTW in the future if you have two separate patches, please post them in separate threads and use separate commitfest items for each, even if they have minor conflicts. -- Álvaro Herrera

Re: Proposal: Add more compile-time asserts to expose inconsistencies.

2019-09-30 Thread Andres Freund
Hi, On 2019-09-19 04:46:27 +, Smith, Peter wrote: > In the attached patch example I have defined a new macro > StaticAssertDecl. A typical usage of it is shown in the relpath.c > file. I'm in favor of adding that - in fact, when I was working on adding a a static_assert wrapper, I was

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-09-30 Thread Alvaro Herrera
OK, I pushed this patch as well as Alexey's test patch. It all works for me, and the coverage report shows that we're doing the new thing ... though only in the case that rewind *is* required. There is no test to verify the case where rewind is *not* required. I guess it'd also be good to test

Re: Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence

2019-09-30 Thread Anastasia Lubennikova
26.08.2019 14:15, Antonin Houska wrote: Peter Geoghegan wrote: Consumers of this new infrastructure probably won't be limited to the deduplication feature; It'd also solve an open problem of the aggregate push-down patch [1], in particular see the mention of pg_opclass in [2]: the partial

Re: FETCH FIRST clause PERCENT option

2019-09-30 Thread Ryan Lambert
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested The latest patch applies cleanly and passes all tests. I believe

Re: Optimize partial TOAST decompression

2019-09-30 Thread Andrey Borodin
> 30 сент. 2019 г., в 20:56, Tomas Vondra > написал(а): > > I mean this: > > /* >* Use int64 to prevent overflow during calculation. >*/ > compressed_size = (int32) ((int64) rawsize * 9 + 8) / 8; > > I'm not very familiar with pglz internals, but I'm a bit puzzled by > this. My

Re: Don't codegen deform code for virtual tuples in expr eval for scan fetch

2019-09-30 Thread Soumyadeep Chakraborty
Hi Andres, I don't feel very strongly about the changes I proposed. > > I completely agree, that was an important consideration. > > > > I had some purely cosmetic suggestions: > > 1. Rename ExecComputeSlotInfo to eliminate the need for the asserts. > > How does renaming it do so? I feel like

Re: Online checksums patch - once again

2019-09-30 Thread Andres Freund
Hi, On 2019-09-30 16:59:00 +0200, Magnus Hagander wrote: > On Mon, Sep 30, 2019 at 2:49 PM Tomas Vondra > wrote: > > IMHO the patch is ready to go - I think the global barrier solves the > > issue in the previous version, and that's the only problem I'm aware of. > > So +1 from me to go ahead

Re: SQL/JSON: JSON_TABLE

2019-09-30 Thread Pavel Stehule
Hi so 28. 9. 2019 v 3:53 odesílatel Nikita Glukhov napsal: > Attached 39th version of the patches rebased onto current master. > > Regress tests fails on my comp - intel 64bit Linux, gcc 9.2.1 Comments: * +<->/* Only XMLTABLE and JSON_TABLE are supported currently */ this comment has not

Re: Optimize partial TOAST decompression

2019-09-30 Thread Tomas Vondra
On Fri, Sep 27, 2019 at 01:00:36AM +0200, Tomas Vondra wrote: On Wed, Sep 25, 2019 at 05:38:34PM -0300, Alvaro Herrera wrote: Hello, can you please update this patch? I'm not the patch author, but I've been looking at the patch recently and I have a rebased version at hand - so attached.

Re: Online checksums patch - once again

2019-09-30 Thread Magnus Hagander
On Mon, Sep 30, 2019 at 2:49 PM Tomas Vondra wrote: > On Mon, Sep 30, 2019 at 01:03:20PM +0200, Magnus Hagander wrote: > >On Thu, Sep 26, 2019 at 9:48 PM Alvaro Herrera > >wrote: > > > >> On 2019-Aug-26, Magnus Hagander wrote: > >> > >> > OK, let's try this again :) > >> > > >> > This is work

Re: Online checksums patch - once again

2019-09-30 Thread Bruce Momjian
On Mon, Sep 30, 2019 at 04:57:41PM +0200, Magnus Hagander wrote: > > > On Mon, Sep 30, 2019 at 4:53 PM Bruce Momjian wrote: > > On Mon, Sep 30, 2019 at 02:49:44PM +0200, Tomas Vondra wrote: > > On Mon, Sep 30, 2019 at 01:03:20PM +0200, Magnus Hagander wrote: > > > Other than bots,

Re: Online checksums patch - once again

2019-09-30 Thread Magnus Hagander
On Mon, Sep 30, 2019 at 4:53 PM Bruce Momjian wrote: > On Mon, Sep 30, 2019 at 02:49:44PM +0200, Tomas Vondra wrote: > > On Mon, Sep 30, 2019 at 01:03:20PM +0200, Magnus Hagander wrote: > > > Other than bots, this patch doesn't seem to have attracted any > reviewers > > > > this time around.

Re: Online checksums patch - once again

2019-09-30 Thread Bruce Momjian
On Mon, Sep 30, 2019 at 02:49:44PM +0200, Tomas Vondra wrote: > On Mon, Sep 30, 2019 at 01:03:20PM +0200, Magnus Hagander wrote: > > Other than bots, this patch doesn't seem to have attracted any reviewers > > > this time around. Perhaps you need to bribe someone? (Maybe "how sad > > > your

Re: Commit fest 2019-09

2019-09-30 Thread Alvaro Herrera
Pencils down! Commitfest now has officially ended, and here are some numbers: statusstring │ week1 │ week2 │ week3 │ week4 │ count ┼───┼───┼───┼───┼─── Needs review │ 165 │ 138 │ 116 │ 118 │ 117 Waiting on Author

Re: add a MAC check for TRUNCATE

2019-09-30 Thread Alvaro Herrera
On 2019-Sep-30, Joe Conway wrote: > I am not sure I will get to this today. I assume it is ok for me to move > it forward e.g. next weekend, or is that not in line with commitfest rules? You can commit whatever patch whenever you feel like it. I will probably move this patch to the next

Re: add a MAC check for TRUNCATE

2019-09-30 Thread Joe Conway
On 9/25/19 4:47 PM, Joe Conway wrote: > On 9/25/19 3:56 PM, Alvaro Herrera wrote: >> Hello >> >> On 2019-Sep-09, Yuli Khodorkovskiy wrote: >> >>> I have included an updated version of the sepgql patch. The >>> Truncate-Hook patch is unchanged from the last version. >> >> This patch no longer

Re: SSL tests failing for channel_binding with OpenSSL <= 1.0.1

2019-09-30 Thread Tom Lane
Michael Paquier writes: > On Fri, Sep 27, 2019 at 11:44:57AM +0900, Michael Paquier wrote: >> We need to do something similar to c3d41cc for the test, as per the >> attached. I have tested that with OpenSSL 1.0.1 and 1.0.2 to stress >> both scenarios. >> Any objections to this fix? > Committed

Re: Implementing Incremental View Maintenance

2019-09-30 Thread Yugo Nagata
Hi, Attached is the latest patch for supporting self-join views. This also including the following fix mentioned by Tatsuo Ishii. > > On 2019-Aug-06, Tatsuo Ishii wrote: > > > >> It's not mentioned below but some bugs including seg fault when > >> --enable-casser is enabled was also fixed in

Re: Online checksums patch - once again

2019-09-30 Thread Tomas Vondra
On Mon, Sep 30, 2019 at 01:03:20PM +0200, Magnus Hagander wrote: On Thu, Sep 26, 2019 at 9:48 PM Alvaro Herrera wrote: On 2019-Aug-26, Magnus Hagander wrote: > OK, let's try this again :) > > This is work mainly based in the first version of the online checksums > patch, but based on top of

Re: pgbench - allow to create partitioned tables

2019-09-30 Thread Fabien COELHO
Hello Amit, $node->safe_psql('postgres', "CREATE TABLESPACE regress_pgbench_tap_1_ts LOCATION '$ets';" I think that this last command fails if the path contains a "'", so the '-escaping is necessary. I had to make changes in TAP tests before because it was not working when the path

Re: Minimal logical decoding on standbys

2019-09-30 Thread Amit Khandekar
On Fri, 27 Sep 2019 at 23:21, Robert Haas wrote: > > On Fri, Sep 27, 2019 at 12:41 PM Amit Khandekar > wrote: > > Preferably I want wait_for_xmins() to get rid of the $node parameter, > > because we can deduce it using slot name. But that requires having > > get_node_from_slotname(). Your

Re: Online checksums patch - once again

2019-09-30 Thread Magnus Hagander
On Thu, Sep 26, 2019 at 9:48 PM Alvaro Herrera wrote: > On 2019-Aug-26, Magnus Hagander wrote: > > > OK, let's try this again :) > > > > This is work mainly based in the first version of the online checksums > > patch, but based on top of Andres WIP patchset for global barriers ( > > >

Re: pgbench - allow to create partitioned tables

2019-09-30 Thread Amit Kapila
On Mon, Sep 30, 2019 at 2:26 PM Fabien COELHO wrote: > > I am leaning towards approach (b) unless you and or Alvaro feels (a) > > is good for now or if you have some other idea. > > No other idea. I put back the tablespace creation which I just removed, > with comments about why it is there. > >

Re: Zedstore - compressed in-core columnar storage

2019-09-30 Thread Ashutosh Sharma
On Fri, Sep 27, 2019 at 3:09 PM Alexandra Wang wrote: > > Hi Ashutosh, > > Sorry I indeed missed your question, thanks for the reminder! > > On Wed, Sep 25, 2019 at 4:10 AM Ashutosh Sharma wrote: >> >> > Further, the UPDATE operation on zedstore table is very slow. I think >> > that's because in

Re: backup manifests

2019-09-30 Thread Rushabh Lathia
On Wed, Sep 25, 2019 at 6:17 PM vignesh C wrote: > On Sat, Sep 21, 2019 at 12:25 AM Robert Haas > wrote: > > > Some comments: > > Manifest file will be in plain text format even if compression is > specified, should we compress it? > May be this is intended, just raised the point to make sure

Drop Trigger Mechanism with Detached partitions

2019-09-30 Thread M Beena Emerson
Detach partition does not remove the partition trigger dependency as seen in below scenario. rm44010_p had 2 partition p1 and p2 and p2 was detached. A. Description of a partitioned table \d+ rm44010_p Partitioned table "public.rm44010_p" Column | Type | Collation

Re: Parallel grouping sets

2019-09-30 Thread Pengzhou Tang
Hi Richard & Tomas: I followed the idea of the second approach to add a gset_id in the targetlist of the first stage of grouping sets and uses it to combine the aggregate in final stage. gset_id stuff is still kept because of GROUPING() cannot uniquely identify a grouping set, grouping sets may

Re: backup manifests

2019-09-30 Thread Jeevan Chalke
Entry for directory is not added in manifest. So it might be difficult at client to get to know about the directories. Will it be good to add an entry for each directory too? May be like: Dir Also, on latest HEAD patches does not apply. On Wed, Sep 25, 2019 at 6:17 PM vignesh C wrote: >

Re: Usage of the system truststore for SSL certificate validation

2019-09-30 Thread Magnus Hagander
On Sat, Sep 28, 2019 at 9:59 PM Bruce Momjian wrote: > On Thu, Sep 19, 2019 at 12:26:27PM -0400, Isaac Morland wrote: > > If we're going to open this up, can we add an option to say "this key is > > allowed to log in to this account", SSH style? > > > > I like the idea of using keys rather than

Re: pgbench - allow to create partitioned tables

2019-09-30 Thread Fabien COELHO
Hello Amit, Attached v18: - remove the test tablespace I had to work around a strange issue around partitioned tables and the default tablespace. - if (tablespace != NULL) + if (tablespace != NULL && strcmp(tablespace, "pg_default") != 0) [...] I don't think we need any such

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-09-30 Thread Alexey Kondratov
On 27.09.2019 17:28, Alvaro Herrera wrote: + # Now, when pg_rewind apparently succeeded with minimal permissions, + # add REPLICATION privilege. So we could test that new standby + # is able to connect to the new master with generated config. +

Re: recovery_min_apply_delay in archive recovery causes assertion failure in latch

2019-09-30 Thread Fujii Masao
On Mon, Sep 30, 2019 at 12:42 PM Michael Paquier wrote: > > On Mon, Sep 30, 2019 at 12:49:03AM +0900, Fujii Masao wrote: > > Attached patch fixes this issue by making archive recovery always ignore > > recovery_min_apply_delay. This change is OK because > > recovery_min_apply_delay was introduced

Re: Skip recovery/standby signal files in pg_basebackup

2019-09-30 Thread Ashutosh Sharma
Hi David, On Sat, Sep 28, 2019 at 12:23 AM David Steele wrote: > > Hackers, > > Restoring these files could cause surprising behaviors so it seems best > to let the restore process create them when needed. > Could you please let us know what is the surprising behaviour you are talking about

Re: Removing unneeded self joins

2019-09-30 Thread Konstantin Knizhnik
Slightly refactored version of the patch with more comments. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index b0dcd02..dc8cb9c 100644 ---

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-30 Thread Masahiko Sawada
On Mon, Sep 30, 2019 at 5:03 PM Michael Paquier wrote: > > On Mon, Sep 30, 2019 at 12:53:58PM +0900, Masahiko Sawada wrote: > > I think that the above checks are always true because isnt() function > > checks if the 1st argument and 2nd argument are not the same. > > Dammit. I overlooked this

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-30 Thread Michael Paquier
On Mon, Sep 30, 2019 at 12:53:58PM +0900, Masahiko Sawada wrote: > I think that the above checks are always true because isnt() function > checks if the 1st argument and 2nd argument are not the same. Dammit. I overlooked this part of the module's doc. > I've attached the updated version patch

Re: Don't codegen deform code for virtual tuples in expr eval for scan fetch

2019-09-30 Thread Andres Freund
Hi, On 2019-09-27 23:01:05 -0700, Soumyadeep Chakraborty wrote: > I completely agree, that was an important consideration. > > I had some purely cosmetic suggestions: > 1. Rename ExecComputeSlotInfo to eliminate the need for the asserts. How does renaming it do so? I feel like the asserts are a

Inconsistent usage of BACKEND_* symbols

2019-09-30 Thread Kyotaro Horiguchi
Hello. While I looked around shutdown sequence, pmdie() uses "BACKEND_TYPE_AUTOVAC | BACKEND_TYPE_BGWORKER" for sending signal and PostmasterStateMachine counts them using BACKEND_TYPE_WORKER. It is the only usage of the combined one. It seems to me just a leftover of da07a1e856. regards. --

Re: Batch insert in CTAS/MatView code

2019-09-30 Thread Andres Freund
Hi, On 2019-09-30 12:12:31 +0800, Paul Guo wrote: > > > > However, I can also see that there is no better alternative. We need > > to > > > > compute the size of accumulated tuples so far, in order to decide > > whether > > > > to stop accumulating tuples. There is no convenient way to obtain

Re: Skip recovery/standby signal files in pg_basebackup

2019-09-30 Thread Michael Paquier
On Fri, Sep 27, 2019 at 02:52:54PM -0400, David Steele wrote: > Restoring these files could cause surprising behaviors so it seems best > to let the restore process create them when needed. > > Patch is attached. When taking a base backup from a standby, we have always copied recovery.conf if

Re: Skip recovery/standby signal files in pg_basebackup

2019-09-30 Thread Masahiko Sawada
On Sat, Sep 28, 2019 at 3:53 AM David Steele wrote: > > Hackers, > > Restoring these files could cause surprising behaviors so it seems best > to let the restore process create them when needed. It's not a normal situation where a running postgres has either recovery.signal or standby.signal but

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-09-30 Thread Paul Guo
> > > I went through the remaining two patches and they seem to be very clear > and concise. However, there are two points I could complain about: > > 1) Maybe I've missed it somewhere in the thread above, but currently > pg_rewind allows to run itself with -R and --source-pgdata. In that case >

Re: pgbench - allow to create partitioned tables

2019-09-30 Thread Amit Kapila
On Sat, Sep 28, 2019 at 11:41 AM Fabien COELHO wrote: > > > Hello Amit, > > > I think we might also need to use pg_get_partkeydef along with > > pg_partition_tree to fetch the partition method information. However, > > I think to find reloid of pgbench_accounts in the current search path, > > we