Re: Memory-Bounded Hash Aggregation

2019-12-04 Thread Jeff Davis
On Wed, 2019-12-04 at 17:24 -0800, Melanie Plageman wrote: > > It looks like the parameter input_tuples passed to hash_spill_init() > in lookup_hash_entries() is the number of groups estimated by > planner. > However, when reloading a spill file, if we run out of memory and > re-spill, hash_spill

Re: Memory-Bounded Hash Aggregation

2019-12-04 Thread Jeff Davis
On Wed, 2019-12-04 at 19:50 -0800, Adam Lee wrote: > On Wed, Dec 04, 2019 at 06:55:43PM -0800, Jeff Davis wrote: > > > > Thanks very much for a great review! I've attached a new patch. > > Hi, > > About the `TODO: project needed attributes only` in your patch, when > would the input tuple contai

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Amit Kapila
On Thu, Dec 5, 2019 at 10:52 AM Amit Kapila wrote: > > On Thu, Dec 5, 2019 at 1:41 AM Robert Haas wrote: > > > > On Mon, Dec 2, 2019 at 2:26 PM Masahiko Sawada > > wrote: > > > It's just an example, I'm not saying your idea is bad. ISTM the idea > > > is good on an assumption that all indexes ta

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Dilip Kumar
On Thu, Dec 5, 2019 at 1:41 AM Robert Haas wrote: > > On Mon, Dec 2, 2019 at 2:26 PM Masahiko Sawada > wrote: > > It's just an example, I'm not saying your idea is bad. ISTM the idea > > is good on an assumption that all indexes take the same time or take a > > long time so I'd also like to consi

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Amit Kapila
On Thu, Dec 5, 2019 at 1:41 AM Robert Haas wrote: > > On Mon, Dec 2, 2019 at 2:26 PM Masahiko Sawada > wrote: > > It's just an example, I'm not saying your idea is bad. ISTM the idea > > is good on an assumption that all indexes take the same time or take a > > long time so I'd also like to consi

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Dilip Kumar
On Thu, Dec 5, 2019 at 12:21 AM Masahiko Sawada wrote: > > On Wed, 4 Dec 2019 at 04:57, Dilip Kumar wrote: > > > > On Wed, Dec 4, 2019 at 9:12 AM Amit Kapila wrote: > > > > > > On Wed, Dec 4, 2019 at 1:58 AM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, 3 Dec 2019 at 11:55, Amit Kapila

Re: Append with naive multiplexing of FDWs

2019-12-04 Thread Thomas Munro
On Thu, Dec 5, 2019 at 4:26 PM Kyotaro Horiguchi wrote: > There's my pending (somewhat stale) patch, which allows to run local > scans while waiting for remote servers. > > https://www.postgresql.org/message-id/20180515.202945.69332784.horiguchi.kyot...@lab.ntt.co.jp > > I (or we) wanted to introd

Re: Memory-Bounded Hash Aggregation

2019-12-04 Thread Adam Lee
On Wed, Dec 04, 2019 at 06:55:43PM -0800, Jeff Davis wrote: > > Thanks very much for a great review! I've attached a new patch. Hi, About the `TODO: project needed attributes only` in your patch, when would the input tuple contain columns not needed? It seems like anything you can project has to

Re: Increase footprint of %m and reduce strerror()

2019-12-04 Thread Kyotaro Horiguchi
(Just to clarifying the last mail..) At Thu, 05 Dec 2019 12:06:54 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 5 Dec 2019 11:36:48 +0900, Michael Paquier > wrote in > > On Wed, Dec 04, 2019 at 03:32:11PM +0900, Kyotaro Horiguchi wrote: > > > It sounds good to me. Message unification (i

Re: Append with naive multiplexing of FDWs

2019-12-04 Thread Kyotaro Horiguchi
Hello. At Sat, 30 Nov 2019 14:26:11 -0500, Bruce Momjian wrote in > On Sun, Nov 17, 2019 at 09:54:55PM +1300, Thomas Munro wrote: > > On Sat, Sep 28, 2019 at 4:20 AM Bruce Momjian wrote: > > > On Wed, Sep 4, 2019 at 06:18:31PM +1200, Thomas Munro wrote: > > > > A few years back[1] I experiment

Re: Increase footprint of %m and reduce strerror()

2019-12-04 Thread Kyotaro Horiguchi
At Thu, 5 Dec 2019 11:36:48 +0900, Michael Paquier wrote in > On Wed, Dec 04, 2019 at 03:32:11PM +0900, Kyotaro Horiguchi wrote: > > It sounds good to me. Message unification (including printf) needs > > somehow treating trailing new lines, though. About translation > > burden, I'm not sure ho

Re: Memory-Bounded Hash Aggregation

2019-12-04 Thread Jeff Davis
Thanks very much for a great review! I've attached a new patch. There are some significant changes in the new version also: In the non-spilling path, removed the extra nullcheck branch in the compiled evaltrans expression. When the first tuple is spilled, I the branch becomes necessary, so I rec

Re: Session WAL activity

2019-12-04 Thread Kyotaro Horiguchi
Hi. At Wed, 4 Dec 2019 16:40:27 +0300, Konstantin Knizhnik wrote in > > > On 04.12.2019 8:33, Kyotaro Horiguchi wrote: > > It seems to be useful to me. We also might want statistics of other > > session IOs. In that case the table name would be > > "pg_stat_session/process_activity". We are

Re: Increase footprint of %m and reduce strerror()

2019-12-04 Thread Michael Paquier
On Wed, Dec 04, 2019 at 03:32:11PM +0900, Kyotaro Horiguchi wrote: > It sounds good to me. Message unification (including printf) needs > somehow treating trailing new lines, though. About translation > burden, I'm not sure how the message unification eases translators' > work. Identical messages

Re: pg_upgrade fails with non-standard ACL

2019-12-04 Thread Michael Paquier
On Wed, Dec 04, 2019 at 06:15:52PM +0900, Arthur Zakirov wrote: > On 2019/12/04 17:15, Michael Paquier wrote: >> FWIW, I am not much a fan of that part because the output generated by >> the description is most likely not compatible with the grammar >> supported. > > Ah, I thought that pg_identify

Re: Update minimum SSL version

2019-12-04 Thread Tom Lane
Peter Eisentraut writes: > On 2019-12-04 13:53, Tom Lane wrote: >> So, what exactly are we going to set as the new minimum version in >> each case? I'll have to go update my trailing-edge-Johnnie buildfarm >> critters, and it'd make sense to have them continue to test the >> oldest nominally-supp

Re: Update minimum SSL version

2019-12-04 Thread Michael Paquier
On Mon, Dec 02, 2019 at 02:09:51PM +0100, Daniel Gustafsson wrote: > However, looking at the signatures detected by autoconf we can however get an > idea of which version is used. SSL_clear_options and X509_get_signature_nid() > first shipped in 1.0.2, while SSL_get_current_compression first shipp

Re: could not stat promote trigger file leads to shutdown

2019-12-04 Thread Kyotaro Horiguchi
At Wed, 4 Dec 2019 11:52:33 +0100, Peter Eisentraut wrote in > On 2019-11-20 16:21, Tom Lane wrote: > >> AFAICT, a GUC check hook wouldn't actually be able to address the > >> specific scenario I described. At the time the GUC is set, the > >> containing the directory of the trigger file does n

Re: Memory-Bounded Hash Aggregation

2019-12-04 Thread Melanie Plageman
On Thu, Nov 28, 2019 at 9:47 AM Tomas Vondra wrote: > On Wed, Nov 27, 2019 at 02:58:04PM -0800, Jeff Davis wrote: > >On Wed, 2019-08-28 at 12:52 -0700, Taylor Vesely wrote: > >> Right now the patch always initializes 32 spill partitions. Have you > >> given > >> any thought into how to intelligen

Re: Implementing Incremental View Maintenance

2019-12-04 Thread Yugo Nagata
On Wed, 4 Dec 2019 21:18:02 +0900 nuko yokohama wrote: > Hi. > > I found the problem after running "ALTER MATERIALIZED VIEW ... RENAME TO". > If a view created with "CREATE INCREMENT MATERIALIZED VIEW" is renamed, > subsequent INSERT operations to the base table will fail. > > Error message. >

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

2019-12-04 Thread Smith, Peter
-Original Message- From: Andres Freund Sent: Tuesday, 3 December 2019 2:56 AM > +StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_ADVISORY + 1), > + "LockTagTypeNames array inconsistency"); > + > >These error messages strike me as somewhat unhelpful. I'd

Re: about allow_system_table_mods and SET STATISTICS

2019-12-04 Thread Tom Lane
Peter Eisentraut writes: > Until PostgreSQL 9.1, it was possible to run ALTER TABLE ... SET > STATISTICS without allow_system_table_mods. In PostgreSQL 9.2 and > later, this no longer works. This change was apparently accidental. (I > gave up after a while trying to bisect it exactly, but pr

Re: Update minimum SSL version

2019-12-04 Thread Peter Eisentraut
On 2019-12-02 16:13, Tom Lane wrote: Peter Eisentraut writes: On 2019-11-30 04:06, Tom Lane wrote: I think the real question we have to answer is this: are we intent on making people upgrade ancient openssl installations? The trade-off is that this makes the defaults better for the vast maj

about allow_system_table_mods and SET STATISTICS

2019-12-04 Thread Peter Eisentraut
Until PostgreSQL 9.1, it was possible to run ALTER TABLE ... SET STATISTICS without allow_system_table_mods. In PostgreSQL 9.2 and later, this no longer works. This change was apparently accidental. (I gave up after a while trying to bisect it exactly, but probably something related to 1489e

Re: adding strndup

2019-12-04 Thread Tom Lane
Alvaro Herrera writes: >> I can get behind that ... it makes the patch a lot smaller. > Here it is. LGTM. > I noticed that ECPG's copy was setting errno. I had forgot to do that > in my previous patch, but on second look, malloc failure already sets > it, so doing it again is pointless. Right

Re: adding strndup

2019-12-04 Thread Alvaro Herrera
On 2019-Dec-04, Alvaro Herrera wrote: > On 2019-Dec-04, Tom Lane wrote: > > > Andres Freund writes: > > > On 2019-12-04 11:40:21 -0300, Alvaro Herrera wrote: > > >> I think this should be pretty uncontroversial, but wanted to give a > > >> heads-up outside that thread. I attach the patch here f

Re: more backtraces

2019-12-04 Thread Tom Lane
Andres Freund writes: > It'd be bad if the addition of backtraces for SEGV/BUS suddenly made it > harder to attach a debugger and getting useful results. Yeah. TBH, I'm not sure I want this, at least not in debug builds. regards, tom lane

Re: Dumping/restoring fails on inherited generated column

2019-12-04 Thread Tom Lane
Peter Eisentraut writes: > On 2019-12-04 15:14, Tom Lane wrote: >> It looks like gtest1_1 inherits column "b" from gtest1, so possibly >> pg_dump is just confused about the combination of inheritance and >> generated columns. > Yeah, there was some stuff about the "separate" dumping of defaults t

Re: more backtraces

2019-12-04 Thread Peter Eisentraut
On 2019-12-04 20:59, Andres Freund wrote: On 2019-12-04 20:45:25 +0100, Peter Eisentraut wrote: In the previous discussions on backtrace support, some people asked for backtraces in more situations. Here is a patch that prints backtraces on SIGABRT, SIGBUS, and SIGSEGV signals. SIGABRT include

Re: Dumping/restoring fails on inherited generated column

2019-12-04 Thread Peter Eisentraut
On 2019-12-04 15:14, Tom Lane wrote: Run the regression tests with "make installcheck", then: $ pg_dump -Fc regression >r.dump $ createdb r2 $ pg_restore -d r2 r.dump pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6005; 2604 24821 DEFAULT gtest1_1 b postgres pg_restore: error: coul

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Robert Haas
On Mon, Dec 2, 2019 at 2:26 PM Masahiko Sawada wrote: > It's just an example, I'm not saying your idea is bad. ISTM the idea > is good on an assumption that all indexes take the same time or take a > long time so I'd also like to consider if this is true even in > production and which approaches i

Re: more backtraces

2019-12-04 Thread Andres Freund
Hi, On 2019-12-04 20:45:25 +0100, Peter Eisentraut wrote: > In the previous discussions on backtrace support, some people asked for > backtraces in more situations. Here is a patch that prints backtraces on > SIGABRT, SIGBUS, and SIGSEGV signals. SIGABRT includes assertions and > elog(PANIC). H

more backtraces

2019-12-04 Thread Peter Eisentraut
In the previous discussions on backtrace support, some people asked for backtraces in more situations. Here is a patch that prints backtraces on SIGABRT, SIGBUS, and SIGSEGV signals. SIGABRT includes assertions and elog(PANIC). Do signals work like this on Windows? Do we need special EXEC_B

Re: Why JIT speed improvement is so modest?

2019-12-04 Thread Andres Freund
Hi, On 2019-11-25 18:09:29 +0300, Konstantin Knizhnik wrote: > I wonder why even at this query, which seems to be ideal use case for JIT, > we get such modest improvement? I think there's a number of causes: 1) There's bottlenecks elsewhere: - The order of sequential scan memory accesses is b

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Robert Haas
On Thu, Nov 21, 2019 at 12:32 AM Dilip Kumar wrote: > In v33-0001-Add-index-AM-field-and-callback-for-parallel-ind patch, I > am a bit doubtful about this kind of arrangement, where the code in > the "if" is always unreachable with the current AMs. I am not sure > what is the best way to handle

Re: Unsigned 64 bit integer to numeric

2019-12-04 Thread Dmitry Dolgov
> On Wed, Dec 04, 2019 at 11:49:20AM +, Andrew Gierth wrote: > > > "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: > > Dmitry> Hi, > > Dmitry> Probably a simple question, but I don't see a simple answer so > Dmitry> far. In one extension I want to convert uint64 into a numeric

Re: adding strndup

2019-12-04 Thread Alvaro Herrera
On 2019-Dec-04, Tom Lane wrote: > Andres Freund writes: > > On 2019-12-04 11:40:21 -0300, Alvaro Herrera wrote: > >> I think this should be pretty uncontroversial, but wanted to give a > >> heads-up outside that thread. I attach the patch here for completeness. > > > I'd just provide pnstrdup()

Re: adding strndup

2019-12-04 Thread Tom Lane
Andres Freund writes: > On 2019-12-04 11:40:21 -0300, Alvaro Herrera wrote: >> I think this should be pretty uncontroversial, but wanted to give a >> heads-up outside that thread. I attach the patch here for completeness. > I'd just provide pnstrdup() in the frontend, without adding strndup().

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Masahiko Sawada
On Wed, 4 Dec 2019 at 04:57, Dilip Kumar wrote: > > On Wed, Dec 4, 2019 at 9:12 AM Amit Kapila wrote: > > > > On Wed, Dec 4, 2019 at 1:58 AM Masahiko Sawada > > wrote: > > > > > > On Tue, 3 Dec 2019 at 11:55, Amit Kapila wrote: > > > > > > > In your code, I think if two workers enter to compute

Re: backup manifests

2019-12-04 Thread Robert Haas
On Wed, Dec 4, 2019 at 1:01 PM Rushabh Lathia wrote: > As per the discussion on the thread, here is the patch which > > a) Make checksum for manifest file optional. > b) Allow user to choose a particular algorithm. > > Currently with the WIP patch SHA256 and CRC checksum algorithm > supported. P

Re: adding strndup

2019-12-04 Thread Andres Freund
Hi, On 2019-12-04 11:40:21 -0300, Alvaro Herrera wrote: > I just proposed in > https://postgr.es/m/0191204143715.GA17312@alvherre.pgsql the addition of > strndup() to our src/port. > > I think this should be pretty uncontroversial, but wanted to give a > heads-up outside that thread. I attach th

Re: backup manifests

2019-12-04 Thread Rushabh Lathia
As per the discussion on the thread, here is the patch which a) Make checksum for manifest file optional. b) Allow user to choose a particular algorithm. Currently with the WIP patch SHA256 and CRC checksum algorithm supported. Patch also changed the manifest file format to append the used algo

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

2019-12-04 Thread Andres Freund
Hi, On 2019-12-04 10:09:28 +0100, Peter Eisentraut wrote: > On 2019-12-02 16:55, Andres Freund wrote: > > > +StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_ADVISORY + 1), > > > + "LockTagTypeNames array inconsistency"); > > > + > > These error messages strike me a

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

2019-12-04 Thread Andres Freund
On 2019-12-04 15:16:25 +0900, Michael Paquier wrote: > On Mon, Dec 02, 2019 at 07:55:45AM -0800, Andres Freund wrote: > > Now that I'm back from vacation, I'll try to take a stab at b). It > > should definitely doable to use the same approach for StaticAssertStmt, > > the problematic case might be

Re: Allow superuser to grant passwordless connection rights on postgres_fdw

2019-12-04 Thread Andrew Dunstan
On Tue, Dec 3, 2019 at 9:36 AM Stephen Frost wrote: > > > A necessary prerequisite is that Pg be able to cope with passwordless > > user-mappings though. Hence this patch. > > Sure, that part seems like it makes sense to me (and perhaps has now > been done, just catching up on things after trave

Re: Windows buildfarm members vs. new async-notify isolation test

2019-12-04 Thread Andrew Dunstan
On Wed, Dec 4, 2019 at 12:12 AM Tom Lane wrote: > > Amit Kapila writes: > > On Tue, Dec 3, 2019 at 10:10 PM Tom Lane wrote: > >> Hmm ... just looking at the code again, could it be that there's > >> no well-placed CHECK_FOR_INTERRUPTS? Andrew, could you see if > >> injecting one in what 7900269

Re: adding strndup

2019-12-04 Thread Tom Lane
Alvaro Herrera writes: > I just proposed in > https://postgr.es/m/0191204143715.GA17312@alvherre.pgsql the addition of > strndup() to our src/port. > I think this should be pretty uncontroversial, but wanted to give a > heads-up outside that thread. I attach the patch here for completeness. Grep

Re: Runtime pruning problem

2019-12-04 Thread Tom Lane
I wrote: >> This may be arguing for a change in ruleutils' existing behavior, >> not sure. But when dealing with traditional-style inheritance, >> I've always thought that Vars above the Append were referring to >> the parent rel in its capacity as the parent, not in its capacity >> as the first c

Re: Update minimum SSL version

2019-12-04 Thread Peter Eisentraut
On 2019-12-04 09:20, Michael Paquier wrote: On Wed, Dec 04, 2019 at 09:10:04AM +0100, Peter Eisentraut wrote: This would mean we'd stop support for RHEL 5, which is probably OK, seeing that even the super-extended support ends in November 2020. Sounds like a plan. I can work on the OpenSSL pa

Re: Update minimum SSL version

2019-12-04 Thread Peter Eisentraut
On 2019-12-04 13:53, Tom Lane wrote: So, what exactly are we going to set as the new minimum version in each case? I'll have to go update my trailing-edge-Johnnie buildfarm critters, and it'd make sense to have them continue to test the oldest nominally-supported versions. For OpenSSL it seems

adding strndup

2019-12-04 Thread Alvaro Herrera
I just proposed in https://postgr.es/m/0191204143715.GA17312@alvherre.pgsql the addition of strndup() to our src/port. I think this should be pretty uncontroversial, but wanted to give a heads-up outside that thread. I attach the patch here for completeness. -- Álvaro Herrera

Re: log bind parameter values on error

2019-12-04 Thread Alvaro Herrera
On 2019-Dec-04, Alvaro Herrera wrote: > > > (Maybe do strnlen(maxlen), then count strnlen(1) starting at that point > > -- so if that returns >=1, print the "..."?) > > So I found that I can make the code more reasonable with this simple > coding, With strndup. -- Álvaro Herrera

Dumping/restoring fails on inherited generated column

2019-12-04 Thread Tom Lane
Run the regression tests with "make installcheck", then: $ pg_dump -Fc regression >r.dump $ createdb r2 $ pg_restore -d r2 r.dump pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6005; 2604 24821 DEFAULT gtest1_1 b postgres pg_restore: error: could not execute query: ERROR: column "b"

Re: Yet another vectorized engine

2019-12-04 Thread Konstantin Knizhnik
On 04.12.2019 12:13, Hubert Zhang wrote: 3. Why you have to implement your own plan_tree_mutator and not using expression_tree_mutator? I also want to replace plan node, e.g. Agg->CustomScan(with VectorAgg implementation). expression_tree_mutator cannot be used to mutate plan node such as A

Re: Session WAL activity

2019-12-04 Thread Konstantin Knizhnik
On 04.12.2019 8:33, Kyotaro Horiguchi wrote: It seems to be useful to me. We also might want statistics of other session IOs. In that case the table name would be "pg_stat_session/process_activity". We are aleady collecting most kinds of the IO activity but it loses session information... W

Re: log bind parameter values on error

2019-12-04 Thread Alvaro Herrera
> (Maybe do strnlen(maxlen), then count strnlen(1) starting at that point > -- so if that returns >=1, print the "..."?) So I found that I can make the code more reasonable with this simple coding, if (maxlen > 0) { s = pnstrdup(s, maxlen); ellips

Re: Update minimum SSL version

2019-12-04 Thread Tom Lane
Peter Eisentraut writes: > On 2019-12-03 12:44, Magnus Hagander wrote: >> On Tue, Dec 3, 2019 at 12:09 PM Michael Paquier > > wrote: >> On Tue, Dec 03, 2019 at 10:10:57AM +0100, Magnus Hagander wrote: >>> Is 1.0.1 considered a separate major from 1.0.0, in this reasonin

Re: Implementing Incremental View Maintenance

2019-12-04 Thread nuko yokohama
2019年12月3日(火) 14:42 Yugo Nagata : > On Mon, 2 Dec 2019 13:48:40 -0300 > Alvaro Herrera wrote: > > > On 2019-Dec-02, Yugo Nagata wrote: > > > > > On Mon, 02 Dec 2019 10:36:36 +0900 (JST) > > > Tatsuo Ishii wrote: > > > > > > > >> One thing pending in this development line is how to catalogue > ag

Re: Implementing Incremental View Maintenance

2019-12-04 Thread nuko yokohama
Hi. I found the problem after running "ALTER MATERIALIZED VIEW ... RENAME TO". If a view created with "CREATE INCREMENT MATERIALIZED VIEW" is renamed, subsequent INSERT operations to the base table will fail. Error message. ``` ERROR: could not open relation with OID 0 ``` Execution log. ``` [e

Re: [HACKERS] Block level parallel vacuum

2019-12-04 Thread Amit Kapila
On Wed, Dec 4, 2019 at 2:01 AM Masahiko Sawada wrote: > > On Tue, 3 Dec 2019 at 11:57, Amit Kapila wrote: > > > > > > Forgot one minor point. Please run pgindent on all the patches. > > Got it. I will run pgindent before sending patch from next time. > Today, I again read the patch and found a

Re: Unsigned 64 bit integer to numeric

2019-12-04 Thread Andrew Gierth
> "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: Dmitry> Hi, Dmitry> Probably a simple question, but I don't see a simple answer so Dmitry> far. In one extension I want to convert uint64 into a numeric Dmitry> to put it eventually into a jsonb object. As far as I see in Dmitry

Re: Unsigned 64 bit integer to numeric

2019-12-04 Thread didier
Hi, I don't think so, but there's an (unmaintained?) uint extension at https://github.com/petere/pguint.git On Wed, Dec 4, 2019 at 11:24 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > Hi, > > Probably a simple question, but I don't see a simple answer so far. In > one extension I want to con

Re: Does 'instead of delete' trigger support modification of OLD

2019-12-04 Thread Eugen Konkov
Hello Eugen, > https://dbfiddle.uk/?rdbms=postgres_12&fiddle=95ed9fab6870d7c4b6266ea4d93def13 sorry, forget to update link to the latest example: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=8e114ccc9f15a30ca3115cdc6c70d247 -- Best regards, Eugen Konkov

Re: Does 'instead of delete' trigger support modification of OLD

2019-12-04 Thread Eugen Konkov
Hi again. > Thinking some more on this, I now don't think a TODO makes sense, so I > have removed it. Please look into this example: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=95ed9fab6870d7c4b6266ea4d93def13 This is real life code from our production. You can see that this is important to

Re: could not stat promote trigger file leads to shutdown

2019-12-04 Thread Peter Eisentraut
On 2019-11-20 16:21, Tom Lane wrote: AFAICT, a GUC check hook wouldn't actually be able to address the specific scenario I described. At the time the GUC is set, the containing the directory of the trigger file does not exist yet. This is currently not an error. The problem only happens if aft

Re: [PATCH] Fix PostgreSQL 12.1 server build and install problems under MSYS2

2019-12-04 Thread Guram Duka
Master branch got error in configure stage and then compiling like 12.1 branch. checking how to link an embedded Python application... configure: error: > could not find shared library for Python > You might have to rebuild your Python installation. Refer to the > documentation for details. Use

Re: Simplify passing of configure arguments to pg_config

2019-12-04 Thread Peter Eisentraut
On 2019-12-03 06:03, Tom Lane wrote: Peter Eisentraut writes: Currently, configure puts the configure args into the makefiles and then have the makefiles pass them to the build of pg_config. That looks like an unnecessary redirection, and indeed that method was put in place when pg_config was

Unsigned 64 bit integer to numeric

2019-12-04 Thread Dmitry Dolgov
Hi, Probably a simple question, but I don't see a simple answer so far. In one extension I want to convert uint64 into a numeric to put it eventually into a jsonb object. As far as I see in numeric.c there are functions only for signed int64. Is there a way to achive this with uint64 (without dupl

Re: pg_upgrade fails with non-standard ACL

2019-12-04 Thread Arthur Zakirov
On 2019/12/04 17:15, Michael Paquier wrote: On Wed, Dec 04, 2019 at 12:17:25PM +0900, Arthur Zakirov wrote: I updated the patch. It generates "revoke_objects.sql" (similar to v3 patch) now and doesn't rely on --check option. It also logs still FATAL message because it seems pg_upgrade should sto

Re: Yet another vectorized engine

2019-12-04 Thread Hubert Zhang
Thanks Konstantin for your detailed review! On Tue, Dec 3, 2019 at 5:58 PM Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > > > On 02.12.2019 4:15, Hubert Zhang wrote: > > > The prototype extension is at https://github.com/zhangh43/vectorize_engine > > > I am very sorry, that I have no f

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

2019-12-04 Thread Peter Eisentraut
On 2019-12-02 16:55, Andres Freund wrote: +StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_ADVISORY + 1), +"LockTagTypeNames array inconsistency"); + These error messages strike me as somewhat unhelpful. I'd probably just reword them as "array length misma

Re: progress report for ANALYZE

2019-12-04 Thread Tatsuro Yamada
Hi Amit-san, Thanks for your comments! Attached patch is the revised patch. :) I wonder two things below. What do you think? 1) For now, I'm not sure it should be set current_child_table_relid to zero when the current phase is changed from "acquiring inherited sample rows" to "computing stats

Re: Update minimum SSL version

2019-12-04 Thread Michael Paquier
On Wed, Dec 04, 2019 at 09:10:04AM +0100, Peter Eisentraut wrote: > This would mean we'd stop support for RHEL 5, which is probably OK, seeing > that even the super-extended support ends in November 2020. Sounds like a plan. I can work on the OpenSSL part, if you need help of course. And if othe

Re: pg_upgrade fails with non-standard ACL

2019-12-04 Thread Michael Paquier
On Wed, Dec 04, 2019 at 12:17:25PM +0900, Arthur Zakirov wrote: > I updated the patch. It generates "revoke_objects.sql" (similar to v3 patch) > now and doesn't rely on --check option. It also logs still FATAL message > because it seems pg_upgrade should stop here since it fails later if there > ar

Re: Update minimum SSL version

2019-12-04 Thread Peter Eisentraut
On 2019-12-03 12:44, Magnus Hagander wrote: On Tue, Dec 3, 2019 at 12:09 PM Michael Paquier > wrote: On Tue, Dec 03, 2019 at 10:10:57AM +0100, Magnus Hagander wrote: > Is 1.0.1 considered a separate major from 1.0.0, in this reasoning? Because > whil

Re: [PATCH] Fix PostgreSQL 12.1 server build and install problems under MSYS2

2019-12-04 Thread Michael Paquier
On Wed, Dec 04, 2019 at 10:46:39AM +0300, Guram Duka wrote: > I made a patch fixing build and install problems under MSYS2, including > llvmjit. > > I have tested this in my environment and it works, of course need more > extensive testing. > Attached is a patch that fixes it. Tag REL_12_1. Do yo

Re: Rework manipulation and structure of attribute mappings

2019-12-04 Thread Michael Paquier
On Mon, Nov 25, 2019 at 05:55:50PM +0900, Amit Langote wrote: > Actually, I was just suggesting that we create a new function > convert_tuples_by_position_map() and put the logic that compares the > two TupleDescs to create the AttrMap in it, just like > convert_tuples_by_name_map(). Now you could