PGOPTIONS="-fh" make check gets stuck since Postgres 11

2019-07-07 Thread Michael Paquier
Hi all, I have begun playing with regressplans.sh which enforces various combinations of "-f s|i|n|m|h" when running the regression tests, and I have noticed that -fh can cause the server to become stuck in the test join_hash.sql with this query (not sure which portion of the SET LOCAL parameters

Re: proposal - patch: psql - sort_by_size

2019-07-07 Thread Pavel Stehule
Hi po 8. 7. 2019 v 6:12 odesílatel Thomas Munro napsal: > On Sun, Jun 30, 2019 at 8:48 PM Pavel Stehule > wrote: > > I used this text in today patch > > Hi Pavel, > > Could you please post a rebased patch? > rebased patch attached Regards Pavel > > Thanks, > > -- > Thomas Munro >

Re: Declared but no defined functions

2019-07-07 Thread Masahiko Sawada
On Sun, Jul 7, 2019 at 10:04 AM Michael Paquier wrote: > > On Sun, Jul 07, 2019 at 07:31:12AM +0800, Masahiko Sawada wrote: > > Attached patch removes these functions. > > Thanks, applied. Thank you! Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source

Re: [HACKERS] [PATCH] Generic type subscripting

2019-07-07 Thread Thomas Munro
On Fri, Jun 7, 2019 at 6:22 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > >> Rebase after pg_indent. Besides, off the list there was a suggestion > > > >> that this > > > >> could be useful to accept more than one data type as a key for > > > >> subscripting. > > > >> E.g. for jsonb it

Re: fix for BUG #3720: wrong results at using ltree

2019-07-07 Thread Thomas Munro
On Sun, Apr 7, 2019 at 3:46 AM Tom Lane wrote: > =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: > > Here is my attempt to fix a 12-years old ltree bug (which is a todo item). > > I see it's not backward-compatible, but in my understanding that's > > what is documented. Previous behavior was

Re: Fix typos and inconsistencies for HEAD (take 5)

2019-07-07 Thread Michael Paquier
On Sun, Jul 07, 2019 at 08:03:01AM +0300, Alexander Lakhin wrote: > 5.8. dictlexize -> thesaurus_lexize There could be other dictionaries. > 5.9. regression.diffsregression.planregress/inh -> regression.diffs > planregress/diffs.inh I am wondering if we should not just nuke that... For now I

Re: proposal - patch: psql - sort_by_size

2019-07-07 Thread Thomas Munro
On Sun, Jun 30, 2019 at 8:48 PM Pavel Stehule wrote: > I used this text in today patch Hi Pavel, Could you please post a rebased patch? Thanks, -- Thomas Munro https://enterprisedb.com

Re: Add test case for sslinfo

2019-07-07 Thread Thomas Munro
On Mon, Jul 8, 2019 at 2:59 PM Hao Wu wrote: > I see there is no test case for sslinfo. I have added a test case for it in > my project. Hi Hao Wu, Thanks! I see that you created a CF entry https://commitfest.postgresql.org/24/2203/. While I was scanning through the current CF looking for

RE: Run-time pruning for ModifyTable

2019-07-07 Thread Kato, Sho
On Monday, July 8, 2019 11:34 AM, Amit Langote wrote: > By the way, let's keep any further discussion on this particular topic > in the other thread. Thanks for the details. I got it. Regards, Kato sho > -Original Message- > From: Amit Langote [mailto:amitlangot...@gmail.com] > Sent:

Re: allow_system_table_mods stuff

2019-07-07 Thread Bruce Momjian
On Mon, Jun 24, 2019 at 11:20:51AM -0400, Tom Lane wrote: > I do see value in two switches not one, but it's what I said above, > to not need to give people *more* chance-to-break-things than they > had before when doing manual catalog fixes. That is, we need a > setting that corresponds more or

Re: refactoring - share str2*int64 functions

2019-07-07 Thread Thomas Munro
On Fri, May 24, 2019 at 3:23 AM Fabien COELHO wrote: > >> Although I agree it is not worth a lot of trouble, and even if I don't do > >> Windows, I think it valuable that the behavior is the same on all platform. > >> The attached match shares pg_str2*int64 functions between frontend and > >>

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2019-07-07 Thread Thomas Munro
On Wed, Jun 19, 2019 at 7:22 PM Paul Guo wrote: > I updated the patch to v3. In this version, we skip the error if copydir > fails due to missing src/dst directory, > but to make sure the ignoring is legal, I add a simple log/forget mechanism > (Using List) similar to the xlog invalid page >

Re: tableam vs. TOAST

2019-07-07 Thread Thomas Munro
On Wed, Jun 12, 2019 at 4:17 AM Robert Haas wrote: > On Tue, May 21, 2019 at 2:10 PM Robert Haas wrote: > > Updated and rebased patches attached. > > And again. Hi Robert, Thus spake GCC: detoast.c: In function ‘toast_fetch_datum’: detoast.c:308:12: error: variable ‘toasttupDesc’ set but not

Re: warning to publication created and wal_level is not set to logical

2019-07-07 Thread Thomas Munro
On Wed, Mar 27, 2019 at 1:36 AM Lucas Viecelli wrote: >> Oh, OK, then this seems like it's basically covered already. I think >> the original suggestion to add a WARNING during CREATE PUBLICATION >> isn't unreasonable. But we don't need to do more than that (and it >> shouldn't be higher than

Add test case for sslinfo

2019-07-07 Thread Hao Wu
Hi Hackers, I see there is no test case for sslinfo. I have added a test case for it in my project. Do you mind if I apply this test case to postgresql? Best regards, Hao Wu 0001-Add-certificates-keys-and-test-cases-for-contrib-ssl.patch Description: Binary data

Re: Improve search for missing parent downlinks in amcheck

2019-07-07 Thread Thomas Munro
On Wed, May 1, 2019 at 12:58 PM Peter Geoghegan wrote: > On Sun, Apr 28, 2019 at 10:15 AM Alexander Korotkov > wrote: > > I think this definitely not bug fix. Bloom filter was designed to be > > lossy, no way blaming it for that :) > > I will think about a simple fix, but after the upcoming

Re: FETCH FIRST clause PERCENT option

2019-07-07 Thread Ryan Lambert
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: not tested Documentation:not tested The basic functionality works as I expect. In the following example I

Re: Run-time pruning for ModifyTable

2019-07-07 Thread Amit Langote
Kato-san, On Thu, Jul 4, 2019 at 1:40 PM Kato, Sho wrote: > > If I understand the details of [1] correctly, ModifyTable will no longer > > have N subplans for N result relations as there are today. So, it doesn't > > make sense for ModifyTable to contain PartitionedRelPruneInfos and for > >

Re: Another way to fix inherited UPDATE/DELETE

2019-07-07 Thread Amit Langote
On Wed, Jul 3, 2019 at 10:50 PM Tom Lane wrote: > > Amit Langote writes: > > On Wed, Feb 20, 2019 at 6:49 AM Tom Lane wrote: > >> Obviously this'd be a major rewrite with no chance of making it into v12, > >> but it doesn't sound too big to get done during v13. > > > Are you planning to work on

Re: [RFC] [PATCH] Flexible "partition pruning" hook

2019-07-07 Thread Thomas Munro
On Sat, Apr 6, 2019 at 3:06 PM Andres Freund wrote: > I've moved this to the next CF, and marked it as targeting v13. Hi Mike, Commifest 1 for PostgreSQL 13 is here. I was just going through the automated build results for the 'fest and noticed that your patch causes a segfault in the

Re: FETCH FIRST clause PERCENT option

2019-07-07 Thread Thomas Munro
On Thu, Jun 27, 2019 at 9:06 PM Surafel Temesgen wrote: > The attached patch include the fix for all the comment given Hi Surafel, There's a call to adjust_limit_rows_costs() hiding under contrib/postgres_fdw, so this fails check-world. -- Thomas Munro https://enterprisedb.com

Re: Optimze usage of immutable functions as relation

2019-07-07 Thread Thomas Munro
On Thu, Mar 21, 2019 at 5:58 AM Alexander Kuzmenkov wrote: > On 11/16/18 22:03, Tom Lane wrote: > > A possible fix for this is to do eval_const_expressions() on > > function RTE expressions at this stage (and then not need to > > do it later), and then pull up only when we find that the > > RTE

Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3

2019-07-07 Thread Thomas Munro
On Sat, Jul 6, 2019 at 2:42 AM Antonin Houska wrote: > I've reworked the way key is passed to postmaster (v04-0003-...) so it's > easier to call the encryption key command interactively, adjusted pg_upgrade > so that it preserves database, tablespace and relfilenode OIDs (v04-0014-...), >

Re: Duplicated LSN in ReorderBuffer

2019-07-07 Thread Thomas Munro
On Wed, Jun 26, 2019 at 2:46 AM Ildar Musin wrote: > Attached is a simple patch that uses subxid instead of top-level xid > in ReorderBufferAddNewTupleCids() call. It seems to fix the bug, but > i'm not sure that this is a valid change. Can someone please verify it > or maybe suggest a better

Re: Built-in connection pooler

2019-07-07 Thread Thomas Munro
On Tue, Jul 2, 2019 at 3:11 AM Konstantin Knizhnik wrote: > On 01.07.2019 12:57, Thomas Munro wrote: > > Interesting work. No longer applies -- please rebase. > > > Rebased version of the patch is attached. > Also all this version of built-ni proxy can be found in conn_proxy > branch of

Re: Bloom index cost model seems to be wrong

2019-07-07 Thread Thomas Munro
On Fri, Mar 1, 2019 at 7:11 AM Jeff Janes wrote: > I'm adding it to the commitfest targeting v13. I'm more interested in > feedback on the conceptual issues rather than stylistic ones, as I would > probably merge the two functions together before proposing something to > actually be

Re: [HACKERS] Cached plans and statement generalization

2019-07-07 Thread Thomas Munro
On Tue, Jul 2, 2019 at 3:29 AM Konstantin Knizhnik wrote: > Attached please find rebased version of the patch. > Also this version can be found in autoprepare branch of this repository > https://github.com/postgrespro/postgresql.builtin_pool.git > on github. Thanks. I haven't looked at the code

Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development

2019-07-07 Thread Tom Mercha
On 06/07/2019 00:06, Tomas Vondra wrote: > First of all, it's pretty difficult to follow the discussion when it's > not clear what's the original message and what's the response. E-mail > clients generally indent the original message with '>' or someting like > that, but your client does not do

Re: Control your disk usage in PG: Introduction to Disk Quota Extension

2019-07-07 Thread Thomas Munro
On Mon, Feb 18, 2019 at 7:39 PM Hubert Zhang wrote: > Based on the assumption we use smgr as hook position, hook API option1 or > option2 which is better? > Or we could find some balanced API between option1 and option2? > > Again comments on other better hook positions are also appreciated! Hi

Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-07-07 Thread Thomas Munro
On Mon, Jul 8, 2019 at 9:51 AM Thomas Munro wrote: > I noticed that check-world passed several times with this patch > applied, but the most recent CI run failed in multiple-cic: > > +error in steps s2i s1i: ERROR: cache lookup failed for index 26303 > >

Re: dropdb --force

2019-07-07 Thread Thomas Munro
On Thu, Jun 27, 2019 at 7:15 AM Pavel Stehule wrote: > fixed Hi Pavel, FYI t/050_dropdb.pl fails consistently with this patch applied: https://travis-ci.org/postgresql-cfbot/postgresql/builds/555234838 -- Thomas Munro https://enterprisedb.com

Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?

2019-07-07 Thread Thomas Munro
On Wed, Jun 12, 2019 at 1:21 AM Daniel Gustafsson wrote: > The patch is still rough around the edges (TODO’s left to mark some areas), > but > I prefer to get some feedback early rather than working too far in potentially > the wrong direction, so parking this in the CF for now. Hi Daniel,

Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-07-07 Thread Thomas Munro
On Sun, Jun 30, 2019 at 7:30 PM Goel, Dhruv wrote: > > On Jun 10, 2019, at 1:20 PM, Goel, Dhruv wrote: > >> On Jun 9, 2019, at 5:33 PM, Tom Lane wrote: > >> Andres Freund writes: > >>> On June 9, 2019 8:36:37 AM PDT, Tom Lane wrote: > I think you are mistaken that doing transactional

Re: SQL/JSON path issues/questions

2019-07-07 Thread Alexander Korotkov
On Thu, Jul 4, 2019 at 4:38 PM Liudmila Mantrova wrote: > Thank you! > > I think we can make this sentence even shorter, the fix is attached: > > "To refer to a JSON element stored at a lower nesting level, add one or > more accessor operators after @." Thanks, looks good to me. Attached

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2019-07-07 Thread Tomas Vondra
On Sun, Jul 07, 2019 at 09:01:43AM -0400, James Coleman wrote: On Sun, Jul 7, 2019 at 8:34 AM Tomas Vondra wrote: On Thu, Jul 04, 2019 at 09:29:49AM -0400, James Coleman wrote: >On Tue, Jun 25, 2019 at 7:22 PM Tomas Vondra > wrote: >> >> On Tue, Jun 25, 2019 at 04:53:40PM -0400, James Coleman

Re: Switching PL/Python to Python 3 by default in PostgreSQL 12

2019-07-07 Thread Steven Pousty
The point of the links I sent from the Python community is that they wanted Python extinct in the wild as of Jan 1 next year. They are never fixing it, even for a security vulnerability. It seems to me we roll out breaking changes with major versions. So yes, if the user chooses to upgrade to 12

Broken defenses against dropping a partitioning column

2019-07-07 Thread Tom Lane
(Moved from pgsql-bugs thread at [1]) Consider regression=# create domain d1 as int; CREATE DOMAIN regression=# create table t1 (f1 d1) partition by range(f1); CREATE TABLE regression=# alter table t1 drop column f1; ERROR: cannot drop column named in partition key So far so good, but that

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2019-07-07 Thread Peter Eisentraut
On 2019-07-05 22:24, Tomas Vondra wrote: > What if the granular encryption (not the "whole cluster with a single > key") case does not encrypt whole blocks, but just tuple data? Would > that allow at least the most critical WAL use cases (recovery, physical > replication) to work without having to

Re: [RFC] Removing "magic" oids

2019-07-07 Thread Noah Misch
On Tue, Nov 20, 2018 at 01:20:04AM -0800, Andres Freund wrote: > On 2018-11-14 21:02:41 -0800, Andres Freund wrote: > > On 2018-11-15 04:57:28 +, Noah Misch wrote: > > > On Wed, Nov 14, 2018 at 12:01:52AM -0800, Andres Freund wrote: > > > > - one pgbench test tested concurrent insertions into

Re: Switching PL/Python to Python 3 by default in PostgreSQL 12

2019-07-07 Thread Tom Lane
Peter Eisentraut writes: > On 2019-07-07 00:34, Steven Pousty wrote: >> Why would it be a 13 or later issue? > Because PostgreSQL 12 is feature frozen and in beta, and this issue is > not a regression. More to the point: it does not seem to me that we should change what "plpythonu" means until

Re: Switching PL/Python to Python 3 by default in PostgreSQL 12

2019-07-07 Thread Peter Eisentraut
On 2019-07-07 00:34, Steven Pousty wrote: > Why would it be a 13 or later issue? Because PostgreSQL 12 is feature frozen and in beta, and this issue is not a regression. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training &

Re: (select query)/relation as first class citizen

2019-07-07 Thread Roman Pekar
Hi, Yes, I'm thinking about 'query like a view', 'query like a cursor' is probably possible even now in ms sql server (not sure about postgresql), but it requires this paradygm shift from set-based thinking to row-by-row thinking which I'd not want to do. I completely agree with your points of

Re: Use relative rpath if possible

2019-07-07 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> rebased patch attached, no functionality changes > I poked at this a bit, and soon found that it fails check-world, > because the isolationtester binary is built with an rpath that > only works if it's part of the temp install tree, which it ain't. Oh ...

Re: (select query)/relation as first class citizen

2019-07-07 Thread Pavel Stehule
Hi ne 7. 7. 2019 v 14:54 odesílatel Roman Pekar napsal: > Hello, > > Just a bit of background - I currently work as a full-time db developer, > mostly with Ms Sql server but I like Postgres a lot, especially because I > really program in sql all the time and type system / plpgsql language of >

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2019-07-07 Thread James Coleman
On Sun, Jul 7, 2019 at 8:34 AM Tomas Vondra wrote: > > On Thu, Jul 04, 2019 at 09:29:49AM -0400, James Coleman wrote: > >On Tue, Jun 25, 2019 at 7:22 PM Tomas Vondra > > wrote: > >> > >> On Tue, Jun 25, 2019 at 04:53:40PM -0400, James Coleman wrote: > >> > > >> >Unrelated: if you or someone else

(select query)/relation as first class citizen

2019-07-07 Thread Roman Pekar
Hello, Just a bit of background - I currently work as a full-time db developer, mostly with Ms Sql server but I like Postgres a lot, especially because I really program in sql all the time and type system / plpgsql language of Postgres seems to me more suitable for actual programming then t-sql.

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2019-07-07 Thread Tomas Vondra
On Thu, Jul 04, 2019 at 09:29:49AM -0400, James Coleman wrote: On Tue, Jun 25, 2019 at 7:22 PM Tomas Vondra wrote: On Tue, Jun 25, 2019 at 04:53:40PM -0400, James Coleman wrote: > >Unrelated: if you or someone else you know that's more familiar with >the parallel code, I'd be interested in