Re: Efficient output for integer types

2019-09-18 Thread Kyotaro Horiguchi
Hello. At Wed, 18 Sep 2019 05:42:01 +0200, David Fetter wrote in <20190918034201.gx31...@fetter.org> > On Tue, Sep 17, 2019 at 09:01:57AM +0200, David Fetter wrote: > > On Tue, Sep 17, 2019 at 08:55:05AM +0200, David Fetter wrote: > > > On Sun, Sep 15, 2019 at 09:18:49AM +0200, David Fetter wrot

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Fabien COELHO
Hello Amit, +fprintf(stderr, "invalid partition type, expecting \"range\" or \"hash\"," How about "partitioning method" instead of "partition type"? Indeed, this is a left over from a previous version. +fprintf(stderr, "--partition-method requires actual par

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

2019-09-18 Thread Michael Paquier
On Wed, Sep 18, 2019 at 06:46:24AM +, Smith, Peter wrote: > I have identified some OSS code where more compile-time asserts could be > added. > > Mostly these are asserting that arrays have the necessary length to > accommodate the enums that are used to index into them. > > In general the

Re: POC: Cleaning up orphaned files using undo logs

2019-09-18 Thread Amit Kapila
On Mon, Sep 16, 2019 at 10:37 PM Robert Haas wrote: > > It seems to me that zheap went wrong in ending up with separate undo > types for in-place and non-in-place updates. Why not just have ONE > kind of undo record that describes an update, and allow that update to > have either one TID or two TI

Re: base backup client as auxiliary backend process

2019-09-18 Thread Michael Paquier
On Fri, Aug 30, 2019 at 09:10:10PM +0200, Peter Eisentraut wrote: > > Attached is a very hackish patch to implement this. It works like this: > > > > # (assuming you have a primary already running somewhere) > > initdb -D data2 --replica > > $EDITOR data2/postgresql.conf # set primar

Add a GUC variable that control logical replication

2019-09-18 Thread Quan Zongliang
Sybase has a feature to turn off replication at the session level: set replication = off, which can be temporarily turned off when there is a maintenance action on the table. Our users also want this feature. I add a new flag bit in xinfo, control it with a session-level variable, when set to

Re: Allow to_date() and to_timestamp() to accept localized names

2019-09-18 Thread Juan José Santamaría Flecha
On Fri, Sep 13, 2019 at 10:31 PM Alvaro Herrera wrote: > Thanks for taking a look at this. > I'm confused why we acquire the MONTH_DIM / etc definitions. Can't we > just use lengthof() of the corresponding array? AFAICS it should work > just as well. > It was because of the length difference b

Re: Add a GUC variable that control logical replication

2019-09-18 Thread Peter Eisentraut
On 2019-09-18 10:39, Quan Zongliang wrote: > Sybase has a feature to turn off replication at the session level: set > replication = off, which can be temporarily turned off when there is a > maintenance action on the table. Our users also want this feature. These kinds of feature requests are al

Re: some PostgreSQL 12 release notes comments

2019-09-18 Thread Peter Eisentraut
On 2019-09-17 22:22, Tom Lane wrote: > Peter Eisentraut writes: >> * Add GSSAPI encryption support (Robbie Harwood, Stephen Frost) >> This allows TCP/IP connections to be encrypted when using GSSAPI >> authentication without having to set up a separate encryption facility >> like SSL. > Hmm,

Re: Add a GUC variable that control logical replication

2019-09-18 Thread Quan Zongliang
On 2019/9/18 17:11, Peter Eisentraut wrote: On 2019-09-18 10:39, Quan Zongliang wrote: Sybase has a feature to turn off replication at the session level: set replication = off, which can be temporarily turned off when there is a maintenance action on the table. Our users also want this feature.

Re: Global temporary tables

2019-09-18 Thread Konstantin Knizhnik
On 21.08.2019 11:54, Konstantin Knizhnik wrote: On 20.08.2019 20:01, Pavel Stehule wrote: Another solution is wait on ZHeap storage and replica can to have own UNDO log. I thought about implementation of special table access method for temporary tables. +1 Unfortunately imple

Re: Define jsonpath functions as stable

2019-09-18 Thread Alexander Korotkov
On Wed, Sep 18, 2019 at 4:13 AM Jonathan S. Katz wrote: > Here is a v4. I added some more paragraphs the bullet point that > explains the different flags to make it feel a bit less dense. Sorry that I didn't participate this discussion till now. FWIW, I agree with selected approach to document d

Re: Psql patch to show access methods info

2019-09-18 Thread Alexander Korotkov
On Tue, Sep 17, 2019 at 9:01 PM Alvaro Herrera wrote: > It seems strange that there's a way to display AMs, and a way to display > ops and procs in an opfamily; but there's no way to list what opfamilies > exist (possibly given an AM as pattern). Should we add that too? We > had \dAf in the orig

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Dilip Kumar
On Wed, Sep 18, 2019 at 1:02 PM Fabien COELHO wrote: > */ + res = PQexec(con, + "select o.n, p.partstrat, pg_catalog.count(p.partrelid) " + "from pg_catalog.pg_class as c " + "join pg_catalog.pg_namespace as n on (n.oid = c.relnamespace) " + "cross join lateral (select pg_catalog.array_position(pg

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Amit Kapila
On Wed, Sep 18, 2019 at 12:19 AM Fabien COELHO wrote: > > > Attached v9: > > - remove the PART_UNKNOWN and use partitions = -1 to tell > that there is an error, and partitions >= 1 to print info > - use search_path to find at most one pgbench_accounts > It still uses left join because

Re: some PostgreSQL 12 release notes comments

2019-09-18 Thread Magnus Hagander
On Tue, Sep 17, 2019 at 7:09 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > > * Discovery of LDAP servers if PostgreSQL is built with OpenLDAP > > I would remove the "if" part from the major features list, since it's a > qualification of minor importance. Instead I'd write som

Re: patch: psql - enforce constant width of last column

2019-09-18 Thread Ahsan Hadi
On Tue, Sep 17, 2019 at 8:16 PM Pavel Stehule wrote: > > > út 17. 9. 2019 v 17:06 odesílatel Ahsan Hadi > napsal: > >> Hi Pavel, >> >> I have been trying to reproduce the case of badly displaying last columns >> of a query result-set. I played around with the legal values for psql >> border vari

Re: subscriptionCheck failures on nightjar

2019-09-18 Thread Kuntal Ghosh
Hello Michael, On Wed, Sep 18, 2019 at 6:28 AM Michael Paquier wrote: > > On my side, I have let this thing run for a couple of hours with a > patched version to include a sleep between the rename and the sync but > I could not reproduce it either: > #!/bin/bash > attempt=0 > while true; do >

Re: Documentation updates for direct foreign table modification

2019-09-18 Thread Etsuro Fujita
On Tue, Sep 17, 2019 at 3:45 PM Etsuro Fujita wrote: > * Commit 7086be6e3 should have documented the limitation that the > direct modification is disabled when WCO constraints are present, but > didn't, which is definitely my fault. > > * Commit fc22b6623 should have documented the limitation that

Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)

2019-09-18 Thread Peter Eisentraut
On 2019-06-06 11:08, Masahiko Sawada wrote: > On Tue, Apr 9, 2019 at 9:01 PM Christoph Berg wrote: >> >> Re: Peter Eisentraut 2019-04-09 >> >>> I'm okay with changing it. As you indicate, I chose the name so that it >>> doesn't look like a libpq variable. There are some other PG_ variables >>>

Re: [PATCH] Speedup truncates of relation forks

2019-09-18 Thread Fujii Masao
On Tue, Sep 17, 2019 at 10:44 AM Jamison, Kirk wrote: > > On Friday, September 13, 2019 10:06 PM (GMT+9), Fujii Masao wrote: > > On Fri, Sep 13, 2019 at 9:51 PM Alvaro Herrera > > wrote: > > > > > > On 2019-Sep-13, Fujii Masao wrote: > > > > > > > On Mon, Sep 9, 2019 at 3:52 PM Jamison, Kirk > >

RE: A problem presentaion about ECPG, DECLARE STATEMENT

2019-09-18 Thread kuroda.hay...@fujitsu.com
Dear all, Hi, thank you for replying. > It seems far too late to be considering any major rewrite for v12; > If a solid case can be made that ECPG's DECLARE STATEMENT was done > wrong, we'd be better off to just revert the feature out of v12 > and try again, under less time pressure, for v13.

RE: A problem presentaion about ECPG, DECLARE STATEMENT

2019-09-18 Thread kuroda.hay...@fujitsu.com
Dear Peter, I want to complement about another purpose. This is that declaring an SQL identifier. In the oracle (and maybe DB2), the following example is not allowed: ... EXEC SQL DECLARE cursor CURSOR FOR stmt; EXEC SQL PREPARE stmt FOR "SELECT ..." ... T

Re: [PATCH] Speedup truncates of relation forks

2019-09-18 Thread Fujii Masao
On Tue, Sep 17, 2019 at 2:25 PM Michael Paquier wrote: > > On Tue, Sep 17, 2019 at 01:44:12AM +, Jamison, Kirk wrote: > > On Friday, September 13, 2019 10:06 PM (GMT+9), Fujii Masao wrote: > >> On Fri, Sep 13, 2019 at 9:51 PM Alvaro Herrera > >> wrote: > As committed, the smgrdounlinkfor

Re: enhance SPI to support EXECUTE commands

2019-09-18 Thread Ahsan Hadi
I don't see much use for this because the documentation says that "server's execute command cannot be used directly within pl/pgsql function (and it is not needed). Within pl/pgsql you can execute update/delete commands using pl/pgsql EXECUTE command and get results like row_count using "get diagno

Re: Nondeterministic collations vs. text_pattern_ops

2019-09-18 Thread Peter Eisentraut
On 2019-09-17 17:17, Tom Lane wrote: > My recommendation is to get rid of the run-time checks and instead > put a hack like this into DefineIndex or some minion thereof: > > if ((opclass == TEXT_PATTERN_BTREE_CLASS_OID || >opclass == VARCHAR_PATTERN_BTREE_CLASS_OID || >

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2019-09-18 Thread Alexey Kondratov
Hi Surafel, Thank you for looking at the patch! On 17.09.2019 14:04, Surafel Temesgen wrote: * There are NOWAIT option in alter index, is there a reason not to have similar option here? Currently in Postgres SET TABLESPACE always comes with [ NOWAIT ] option, so I hope it worth adding this o

Re: patch: psql - enforce constant width of last column

2019-09-18 Thread Pavel Stehule
st 18. 9. 2019 v 12:52 odesílatel Ahsan Hadi napsal: > > > On Tue, Sep 17, 2019 at 8:16 PM Pavel Stehule > wrote: > >> >> >> út 17. 9. 2019 v 17:06 odesílatel Ahsan Hadi >> napsal: >> >>> Hi Pavel, >>> >>> I have been trying to reproduce the case of badly displaying last >>> columns of a query

Re: another look at macOS SIP

2019-09-18 Thread Robert Haas
On Tue, Sep 17, 2019 at 1:52 PM Andres Freund wrote: > On 2019-09-10 19:14:19 +0200, Peter Eisentraut wrote: > > I think the way forward here is to get rid of all uses of system() for > > calling between PostgreSQL programs. There are only a handful of those, > > and we already have well-tested r

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Fabien COELHO
+ "group by 1, 2 " I have a question, wouldn't it be sufficient to just group by 1? Conceptually yes, it is what is happening in practice, but SQL requires that non aggregated columns must appear explicitely in the GROUP BY clause, so I have to put it even if it will not change groups. -

Re: Minimal logical decoding on standbys

2019-09-18 Thread Robert Haas
On Fri, Sep 13, 2019 at 7:20 AM Amit Khandekar wrote: > > Thanks for notifying about this. Will work this week on rebasing this > > patchset and putting it into the 2019-11 commit fest. > > Rebased patch set attached. > > Added in the Nov commitfest : https://commitfest.postgresql.org/25/2283/ I

Re: Psql patch to show access methods info

2019-09-18 Thread Alvaro Herrera
On 2019-Sep-18, Alexander Korotkov wrote: > On Tue, Sep 17, 2019 at 9:01 PM Alvaro Herrera > wrote: > > I think \dAf is just as critical as \dAo; the former lets you know which > > opfamilies you can use in CREATE INDEX, while the latter lets you know > > which operators would be helped by such

Re: allow online change primary_conninfo

2019-09-18 Thread Fujii Masao
On Wed, Aug 28, 2019 at 6:50 PM Sergei Kornilov wrote: > > Hello > > Updated patch attached. (also I merged into one file) Thanks for updating the patch! Here are some comments from me. #primary_conninfo = '' # connection string to sending server # (change requires restart) #primary_

Re: pg_upgrade check fails on Solaris 10

2019-09-18 Thread Alvaro Herrera
On 2019-Sep-17, Marina Polyakova wrote: > Hello, hackers! > > We got an error for pg_upgrade check on the branch REL_11_STABLE (commit > 40ad4202513c72f5c1beeb03e26dfbc8890770c0) on Solaris 10 because IIUC the > argument to the sed command is not enclosed in quotation marks (see [1]): Hmm, I'm s

Re: Nondeterministic collations vs. text_pattern_ops

2019-09-18 Thread Tom Lane
Peter Eisentraut writes: > Here is a draft patch. > It will require a catversion change because those operator classes don't > have assigned OIDs so far. That's slightly annoying given where we are with v12. We could avoid it by looking up the opclass's opfamily and seeing if it's TEXT_BTREE_FA

Fix parsing of identifiers in jsonpath

2019-09-18 Thread Nikita Glukhov
Hi! Unfortunately, jsonpath lexer, in contrast to jsonpath parser, was written by Teodor and me without a proper attention to the stanard. JSON path lexics is is borrowed from the external ECMAScript [1], and we did not study it carefully. There were numerous deviations from the ECMAScript stan

Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)

2019-09-18 Thread Tom Lane
Peter Eisentraut writes: > On 2019-06-06 11:08, Masahiko Sawada wrote: >>> Do we need two variables to control this? I was only looking at >>> PG_COLOR, and noticed PG_COLORS only later. Keeping PG_COLORS aligned >>> with {GCC,LS}_COLORS makes sense. How about removing PG_COLOR, and >>> making "au

Re: Fix parsing of identifiers in jsonpath

2019-09-18 Thread Chapman Flack
On 9/18/19 11:10 AM, Nikita Glukhov wrote: > 4. Even if the Unicode escape sequence '\u' is used, it cannot produce >    special symbols or whitespace, because the identifiers are displayed > ... > I don't know if it is possible to check Unicode properties "ID_Start" and > "ID_Continue" in Pos

Re: Commit fest 2019-09

2019-09-18 Thread Alvaro Herrera
On 2019-Sep-16, Alvaro Herrera wrote: > The third week for this commitfest starts. The numbers now: > > statusstring │ week1 │ week2 │ week3 > ┼───┼───┼─── > Needs review │ 165 │ 138 │ 116 > Waiting on Author │30 │44 │

Relation extension lock bottleneck

2019-09-18 Thread Konstantin Knizhnik
Hi hackers, We have a customer which suffer from Postgres performance degradation when there are large number of connections performing inserts in the same table. In 2016 Robert Haas has committed optimization of relation extension 719c84c1: Author: Robert Haas Date:   Fri Apr 8 02:04:46

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

2019-09-18 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Sep 18, 2019 at 06:46:24AM +, Smith, Peter wrote: >> I have identified some OSS code where more compile-time asserts could be >> added. >> >> Mostly these are asserting that arrays have the necessary length to >> accommodate the enums that are used to inde

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Fabien COELHO
Hello Amit, - use search_path to find at most one pgbench_accounts It still uses left join because I still think that it is appropriate. I added a lateral to avoid repeating the array_position call to manage the search_path, and use explicit pg_catalog everywhere. It would be go

Re: dropdb --force

2019-09-18 Thread vignesh C
On Wed, Sep 18, 2019 at 9:41 AM Pavel Stehule wrote: > > > > st 18. 9. 2019 v 5:59 odesílatel vignesh C napsal: >> >> On Wed, Sep 18, 2019 at 8:30 AM Pavel Stehule >> wrote: >> > >> > >> Hi Pavel, >> >> One Comment: >> In the documentation we say drop database will fail after 60 seconds >> >

Re: dropdb --force

2019-09-18 Thread Pavel Stehule
st 18. 9. 2019 v 19:11 odesílatel vignesh C napsal: > On Wed, Sep 18, 2019 at 9:41 AM Pavel Stehule > wrote: > > > > > > > > st 18. 9. 2019 v 5:59 odesílatel vignesh C napsal: > >> > >> On Wed, Sep 18, 2019 at 8:30 AM Pavel Stehule > wrote: > >> > > >> > > >> Hi Pavel, > >> > >> One Comment: >

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2019-09-18 Thread Peter Geoghegan
On Tue, Sep 17, 2019 at 9:43 AM Anastasia Lubennikova wrote: > > 3. Third, there is incremental writing of the page itself -- avoiding > > using a temp buffer. Not sure where I stand on this. > > I think it's a good idea. memmove must be much faster than copying > items tuple by tuple. > I'll sen

backup manifests

2019-09-18 Thread Robert Haas
In the lengthy thread on block-level incremental backup,[1] both Vignesh C[2] and Stephen Frost[3] have suggested storing a manifest as part of each backup, somethig that could be useful not only for incremental backups but also for full backups. I initially didn't think this was necessary,[4] but

[DOC] Document concurrent index builds waiting on each other

2019-09-18 Thread James Coleman
In my experience it's not immediately obvious (even after reading the documentation) the implications of how concurrent index builds manage transactions with respect to multiple concurrent index builds in flight at the same time. Specifically, as I understand multiple concurrent index builds runni

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2019-09-18 Thread Peter Geoghegan
On Wed, Sep 18, 2019 at 10:43 AM Peter Geoghegan wrote: > This also suggests that making _bt_dedup_one_page() do raw page adds > and page deletes to the page in shared_buffers (i.e. don't use a temp > buffer page) could pay off. As I went into at the start of this > e-mail, unnecessarily doing exp

Re: dropdb --force

2019-09-18 Thread Pavel Stehule
Hi I am sending updated version - the changes against last patch are two. I use pg_terminate_backed for killing other terminates like Tom proposed. I am not sure if it is 100% practical - on second hand the necessary right to kill other sessions is almost available - and consistency with pg_termi

Re: [PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method

2019-09-18 Thread Nikolay Shaplov
В Fri, 2 Aug 2019 11:12:35 +1200 Thomas Munro пишет: > While moving this to the September CF, I noticed this failure: > > test reloptions ... FAILED 32 ms Do you have any idea, how to reproduce this? I tried this patch on current master, and did not get result you are t

Re: log bind parameter values on error

2019-09-18 Thread Alvaro Herrera
Nice patch, thanks. I didn't like abusing testlibpq3.c for your new stuff, so I moved it off to a new file testlibpq5.c. I cleaned up a few other cosmetics things about this -- v10 attached. I eventually noticed that this patch fails to initialize each param's textValue to NULL, which probably e

Re: Define jsonpath functions as stable

2019-09-18 Thread Tom Lane
"Jonathan S. Katz" writes: > On 9/17/19 6:40 PM, Tom Lane wrote: >> After a re-read of the XQuery spec, it seems to me that the character >> entry form that they have and we don't is actually "&#;" like >> HTML, rather than just "#NN". Can anyone double-check that? > Clicking through the XQu

Re: Fix parsing of identifiers in jsonpath

2019-09-18 Thread Tom Lane
Nikita Glukhov writes: > I don't know if it is possible to check Unicode properties "ID_Start" and > "ID_Continue" in Postgres, and what ZWNJ/ZWJ is. Now, identifier's starting > character set is simply determined by the exclusion of all recognized special > characters. TBH, I think you should s

Re: Memory Accounting

2019-09-18 Thread Melanie Plageman
I wanted to address a couple of questions Jeff asked me off-list about Greenplum's implementations of Memory Accounting. Greenplum has two memory accounting sub-systems -- one is the MemoryContext-based system proposed here. The other memory accounting system tracks "logical" memory owners in glob

Re: subscriptionCheck failures on nightjar

2019-09-18 Thread Tomas Vondra
On Wed, Sep 18, 2019 at 04:25:14PM +0530, Kuntal Ghosh wrote: Hello Michael, On Wed, Sep 18, 2019 at 6:28 AM Michael Paquier wrote: On my side, I have let this thing run for a couple of hours with a patched version to include a sleep between the rename and the sync but I could not reproduce i

Re: Optimization of some jsonb functions

2019-09-18 Thread Alvaro Herrera
On 2019-Jul-26, Joe Nelson wrote: > Thomas Munro wrote: > > This doesn't apply -- to attract reviewers, could we please have a rebase? > > To help the review go forward, I have rebased the patch on 27cd521e6e. > It passes `make check` for me, but that's as far as I've verified the > correctness.

Re: Define jsonpath functions as stable

2019-09-18 Thread Chapman Flack
On 09/18/19 17:12, Tom Lane wrote: > After further reading, it seems like what that text is talking about > is not actually a regex feature, but an outgrowth of the fact that > the regex pattern is being expressed as a string literal in a language > for which XML character entities are a native as

Re: [PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method

2019-09-18 Thread Thomas Munro
On Thu, Sep 19, 2019 at 7:58 AM Nikolay Shaplov wrote: > В Fri, 2 Aug 2019 11:12:35 +1200 > Thomas Munro пишет: > > > While moving this to the September CF, I noticed this failure: > > > > test reloptions ... FAILED 32 ms > > Do you have any idea, how to reproduce this? I

Re: Define jsonpath functions as stable

2019-09-18 Thread Tom Lane
Chapman Flack writes: > On 09/18/19 17:12, Tom Lane wrote: >> As such, I think this doesn't apply to SQL/JSON. The SQL/JSON spec >> seems to defer to Javascript/ECMAscript for syntax details, and >> in either of those languages you have backslash escape sequences >> for writing weird characters,

RE: [PATCH] Speedup truncates of relation forks

2019-09-18 Thread Jamison, Kirk
On Wednesday, September 18, 2019 8:38 PM, Fujii Masao wrote: > On Tue, Sep 17, 2019 at 10:44 AM Jamison, Kirk > wrote: > > > > On Friday, September 13, 2019 10:06 PM (GMT+9), Fujii Masao wrote: > > > On Fri, Sep 13, 2019 at 9:51 PM Alvaro Herrera > > > > > > wrote: > > > > > > > > On 2019-Sep-13,

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

2019-09-18 Thread Smith, Peter
-Original Message- From: Michael Paquier Sent: Wednesday, 18 September 2019 5:40 PM > For some of them it could help, and we could think about a better location > for that stuff than an unused routine. The indentation of your patch is > weird, with "git diff --check" complaining a lo

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

2019-09-18 Thread Michael Paquier
On Wed, Sep 18, 2019 at 04:46:30PM +0100, Dagfinn Ilmari Mannsåker wrote: > Postgres doesn't seem to have it, but it would be possible to define a > StaticAssertDecl macro that can be used at the file level, outside any > function. See for example Perl's STATIC_ASSERT_DECL: > > https://github.com

Re: backup manifests

2019-09-18 Thread David Steele
Hi Robert, On 9/18/19 1:48 PM, Robert Haas wrote: > That whole approach might still be dead on > arrival if it's possible to add new blocks with old LSNs to existing > files,[7] but there seems to be room to hope that there are no such > cases.[8] I sure hope there are no such cases, but we shoul

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2019-09-18 Thread Michael Paquier
On Wed, Sep 18, 2019 at 10:37:27AM +0900, Michael Paquier wrote: > I am attaching an updated patch for now that I would like to commit. > Are there more comments about the shape of the patch, the name of the > columns for the function, etc.? Okay, I have done an extra round of review, and committe

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Amit Langote
Hi Fabien, On Thu, Sep 19, 2019 at 2:03 AM Fabien COELHO wrote: > > If that is the case, then I think if user gives --partitions for the old > > server version, it will also give an error? > > Yes, on -i it will fail because the syntax will not be recognized. Maybe we should be checking the serv

Re: Zedstore - compressed in-core columnar storage

2019-09-18 Thread Alexandra Wang
On Tue, Sep 17, 2019 at 4:15 AM Ashutosh Sharma wrote: > create table t1(a int, b int) using zedstore; > insert into t1 select i, i+10 from generate_series(1, 100) i; > postgres=# update t1 set b = 200; > server closed the connection unexpectedly > This probably means the server terminated ab

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

2019-09-18 Thread Kyotaro Horiguchi
At Thu, 19 Sep 2019 10:07:40 +0900, Michael Paquier wrote in <20190919010740.gc22...@paquier.xyz> > On Wed, Sep 18, 2019 at 04:46:30PM +0100, Dagfinn Ilmari Mannsåker wrote: > > Postgres doesn't seem to have it, but it would be possible to define a > > StaticAssertDecl macro that can be used at t

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2019-09-18 Thread Amit Kapila
On Thu, Sep 19, 2019 at 7:34 AM Michael Paquier wrote: > > On Wed, Sep 18, 2019 at 10:37:27AM +0900, Michael Paquier wrote: > > I am attaching an updated patch for now that I would like to commit. > > Are there more comments about the shape of the patch, the name of the > > columns for the functio

Re: Optimization of some jsonb functions

2019-09-18 Thread Alvaro Herrera
On 2019-Sep-18, Alvaro Herrera wrote: > Well, I think that was useless, so I rebased again -- attached. ... which is how you find out that 0001 as an independent patch is not really a valid one, since it depends on an API change that does not happen until 0005. -- Álvaro Herrera

Re: Feature request: binary NOTIFY

2019-09-18 Thread Mitar
Hi! On Tue, Sep 17, 2019 at 7:10 AM Tom Lane wrote: > Yeah it is ... the internal async-queue data structure assumes > null-terminated strings. What's a lot worse, so does the > wire protocol's NotificationResponse message, as well as every > existing client that can read it. (For instance, lib

Re: Optimization of some jsonb functions

2019-09-18 Thread Alvaro Herrera
On 2019-Sep-19, Alvaro Herrera wrote: > On 2019-Sep-18, Alvaro Herrera wrote: > > > Well, I think that was useless, so I rebased again -- attached. > > ... which is how you find out that 0001 as an independent patch is not > really a valid one, since it depends on an API change that does not > h

Re: Feature request: binary NOTIFY

2019-09-18 Thread Tom Lane
Mitar writes: > What about adding NOTIFYB and LISTENB commands? And > NotificationBinaryResponse? For binary? [ shrug... ] We can put that on the list of things we might want to do if the wire protocol ever gets changed. I urgently recommend not holding your breath. reg

Re: subscriptionCheck failures on nightjar

2019-09-18 Thread Michael Paquier
On Wed, Sep 18, 2019 at 11:58:08PM +0200, Tomas Vondra wrote: > I kinda suspect it might be just a coincidence that it fails during that > particular test. What likely plays a role here is a checkpoint timing > (AFAICS that's the thing removing the file). On most systems the tests > complete befor

Re: Feature request: binary NOTIFY

2019-09-18 Thread Mitar
Hi! On Wed, Sep 18, 2019 at 9:22 PM Tom Lane wrote: > [ shrug... ] We can put that on the list of things we might want > to do if the wire protocol ever gets changed. I urgently recommend > not holding your breath. What is the process to add it to the list? And yes, I will not expect it soon.

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2019-09-18 Thread Michael Paquier
On Wed, Sep 18, 2019 at 03:46:20PM +0300, Alexey Kondratov wrote: > Currently in Postgres SET TABLESPACE always comes with [ NOWAIT ] option, so > I hope it worth adding this option here for convenience. Added in the new > version. It seems to me that it would be good to keep the patch as simple a

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

2019-09-18 Thread Smith, Peter
-Original Message- From: Michael Paquier Sent: Thursday, 19 September 2019 11:08 AM >On Wed, Sep 18, 2019 at 04:46:30PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Postgres doesn't seem to have it, but it would be possible to define a >> StaticAssertDecl macro that can be used at the file

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Fabien COELHO
Hello Amit, Yes, on -i it will fail because the syntax will not be recognized. Maybe we should be checking the server version, which would allow to produce more useful error messages when these options are used against older servers, like if (sversion < 1) fprintf(stderr, "cannot use

Re: Zedstore - compressed in-core columnar storage

2019-09-18 Thread Ashutosh Sharma
On Thu, Sep 19, 2019 at 8:10 AM Alexandra Wang wrote: > > On Tue, Sep 17, 2019 at 4:15 AM Ashutosh Sharma wrote: >> >> create table t1(a int, b int) using zedstore; >> insert into t1 select i, i+10 from generate_series(1, 100) i; >> postgres=# update t1 set b = 200; >> server closed the conne

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Amit Kapila
On Wed, Sep 18, 2019 at 10:33 PM Fabien COELHO wrote: > > > Hello Amit, > > >> - use search_path to find at most one pgbench_accounts > >> It still uses left join because I still think that it is appropriate. > >> I added a lateral to avoid repeating the array_position call > >> to m

Re: pgbench - allow to create partitioned tables

2019-09-18 Thread Amit Kapila
On Thu, Sep 19, 2019 at 10:25 AM Fabien COELHO wrote: > Hello Amit, > > >> Yes, on -i it will fail because the syntax will not be recognized. > > > > Maybe we should be checking the server version, which would allow to > > produce more useful error messages when these options are used against > >

Re: Option to dump foreign data in pg_dump

2019-09-18 Thread Surafel Temesgen
Hi Luis, Here is a few comment for me *I suggest the option to be just –foreign-data because if we make it –include-foreign-data its expected to have –exclude-foreign-data option too. *please add test case * + if (tdinfo->filtercond || tbinfo->relkind == RELKIND_FOREIGN_TABLE) filter condition