Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)

2020-11-02 Thread Thomas Munro
On Tue, Nov 3, 2020 at 12:50 AM Kyotaro Horiguchi wrote: > With the fix patch, it changes to: > > [16632] LOG: FALSE LATCH: Nice repo. But is it OK to not reset the Win32 event in this case? Does it still work correctly if you wait on the latch after that happened, and perhaps

Re: Log message for GSS connection is missing once connection authorization is successful.

2020-11-02 Thread vignesh C
On Sun, Nov 1, 2020 at 3:34 AM Euler Taveira wrote: > > On Sat, 31 Oct 2020 at 00:34, Bharath Rupireddy > wrote: >> >> On Fri, Oct 30, 2020 at 6:35 PM Euler Taveira >> wrote: >> > >> > + appendStringInfo(&logmsg, "replication "); >> > + >> > + appendStringInfo(&logmsg, "connection authorized: u

Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path

2020-11-02 Thread Peter Eisentraut
On 2020-09-29 11:26, David Rowley wrote: On Wed, 23 Sep 2020 at 08:42, David Rowley wrote: On Tue, 22 Sep 2020 at 19:08, David Rowley wrote: I ran another scale=5 TPCH benchmark on v4 against f859c2ffa using gcc 9.3. I'm unable to see any gains with this, however, the results were pretty noi

Re: public schema default ACL

2020-11-02 Thread Noah Misch
On Mon, Nov 02, 2020 at 12:42:26PM -0500, Tom Lane wrote: > Robert Haas writes: > > On Mon, Nov 2, 2020 at 5:51 AM Peter Eisentraut > > wrote: > >> I'm not convinced, however, that this would would really move the needle > >> in terms of the general security-uneasiness about the public schema and

Re: Parallel INSERT (INTO ... SELECT ...)

2020-11-02 Thread vignesh C
> > See attached patches. > Thanks for providing the patches. I had reviewed v6-0001-Enable-parallel-SELECT-for-INSERT-INTO-.-SELECT.patch, please find my comments: -> commandType is not used, we can remove it. + * Prepare for entering parallel mode by assigning a FullTransactionId, to be + * incl

Re: [HACKERS] logical decoding of two-phase transactions

2020-11-02 Thread Amit Kapila
On Mon, Nov 2, 2020 at 4:11 PM Amit Kapila wrote: > Few Comments on v15-0003-Support-2PC-txn-pgoutput === 1. This patch needs to be rebased after commit 644f0d7cc9 and requires some adjustments accordingly. 2. if (flags != 0) elog(ERROR, "unrecognize

Re: Fix typo in xlogreader.h and procarray.c

2020-11-02 Thread Amit Kapila
On Tue, Nov 3, 2020 at 8:27 AM Amit Kapila wrote: > > On Tue, Nov 3, 2020 at 7:09 AM Hou, Zhijie wrote: > > > > Hi > > > > I found some possible typo in procarray.c and xlogreader.h > > > > - * For VACUUM separate horizons (used to to decide which deleted tuples > > must > > + * For VACUUM separ

Re: Collation versioning

2020-11-02 Thread Thomas Munro
On Tue, Nov 3, 2020 at 1:51 PM David Rowley wrote: > On Tue, 3 Nov 2020 at 12:29, David Rowley wrote: > > Running low on ideas for now, so thought I'd post this in case it > > someone thinks of something else. > > FWIW, the attached does fix the issue for me. It basically just calls > the functi

Re: Fix typo in xlogreader.h and procarray.c

2020-11-02 Thread Amit Kapila
On Tue, Nov 3, 2020 at 7:09 AM Hou, Zhijie wrote: > > Hi > > I found some possible typo in procarray.c and xlogreader.h > > - * For VACUUM separate horizons (used to to decide which deleted tuples must > + * For VACUUM separate horizons (used to decide which deleted tuples must > > - *

Re: Use of "long" in incremental sort code

2020-11-02 Thread Tomas Vondra
Hi, I took another look at this, and 99% of the patch (the fixes to sort debug messages) seems fine to me. Attached is the part I plan to get committed, including commit message etc. The one change I decided to remove is this change in tuplesort_free: - longspaceUsed; +

Re: enable_incremental_sort changes query behavior

2020-11-02 Thread Tomas Vondra
On Fri, Oct 30, 2020 at 07:37:33PM -0400, James Coleman wrote: ... I was looking at this some more, and I'm still convinced that this is correct, but I don't think a comment about it being an optimization (though I suspect that that its major benefit), since it came from, and must parallel, fin

Re: Split copy.c

2020-11-02 Thread David Rowley
On Tue, 3 Nov 2020 at 07:35, Andres Freund wrote: > > On 2020-11-02 19:43:38 +0200, Heikki Linnakangas wrote: > > On 02/11/2020 19:23, Andres Freund wrote: > > > On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: > > > > There isn't much common code between COPY FROM and COPY TO, so I propose

Fix typo in xlogreader.h and procarray.c

2020-11-02 Thread Hou, Zhijie
Hi I found some possible typo in procarray.c and xlogreader.h - * For VACUUM separate horizons (used to to decide which deleted tuples must + * For VACUUM separate horizons (used to decide which deleted tuples must - * Callers supply a page_read callback if they want to to call + *

Re: Collation versioning

2020-11-02 Thread David Rowley
On Tue, 3 Nov 2020 at 12:29, David Rowley wrote: > Running low on ideas for now, so thought I'd post this in case it > someone thinks of something else. FWIW, the attached does fix the issue for me. It basically just calls the function that converts the windows-type "English_New Zealand.1252" lo

Re: Collation versioning

2020-11-02 Thread David Rowley
On Tue, 3 Nov 2020 at 09:43, Thomas Munro wrote: > Fortunately David Rowley is able to repro this on his Windows box (it > fails even with strings that are succeeding on the other BF machines), > so we have something to work with. The name mangling that is done in > get_iso_localename() looks pre

Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch

2020-11-02 Thread Tom Lane
I wrote: > Attached is a draft patch that does this. I'm fairly pleased with it, > but there are some loose ends as described below. As the patch stands, > it reverse-lists all our special-format function call syntaxes > *except* EXTRACT. I left that out since I think we want to apply the > reve

Re: RE: Delaying/avoiding BTreeTupleGetNAtts() call within _bt_compare()

2020-11-02 Thread Peter Geoghegan
On Mon, Nov 2, 2020 at 9:46 AM Anastasia Lubennikova wrote: > This thread was inactive for a while. The latest review suggests that it is > Ready For Committer. > I also took a quick look at the patch and agree that it looks sensible. Maybe > add a comment before the _bt_compare_inl() to explain

Re: Delaying/avoiding BTreeTupleGetNAtts() call within _bt_compare()

2020-11-02 Thread Peter Geoghegan
On Thu, May 28, 2020 at 12:35 PM Mark Dilger wrote: > Reading this thread, I think the lack of a performance impact on laptop > hardware was expected, but perhaps confirmation that it does not make things > worse is useful? > > Since this patch doesn't seem to do any harm, I would mark it as "re

Re: Reduce the number of special cases to build contrib modules on windows

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 20:34:28 +1300, David Rowley wrote: > It might be nice if we could reduce some of those special cases so > that: > > a) We reduce the amount of work specific to windows when we add new > contrib modules, and; > b) We can work towards a better way for people to build their own >

Re: how to replicate test results in cf-bot on travis

2020-11-02 Thread Dave Cramer
On Mon, 2 Nov 2020 at 14:47, Andres Freund wrote: > Hi, > > On 2020-11-02 11:18:03 -0500, Dave Cramer wrote: > > On Sun, 1 Nov 2020 at 18:15, Tom Lane wrote: > > > > > Dave Cramer writes: > > > > OK, checked and I definitely have the changes. I don't think the > > > isolation > > > > test is ru

Re: Collation versioning

2020-11-02 Thread Thomas Munro
On Tue, Nov 3, 2020 at 6:51 AM Tom Lane wrote: > Thomas Munro writes: > > Hmm, a failure from dory (WIndows) during pg_upgrade: > > > performing post-bootstrap initialization ... 2020-11-02 08:08:22.213 > > EST [5392] FATAL: could not get collation version for locale > > "English_United States.1

Re: vacuum -vs reltuples on insert only index

2020-11-02 Thread Peter Geoghegan
Just one more postscript... On Mon, Nov 2, 2020 at 12:06 PM Peter Geoghegan wrote: > Just to be clear: I am not proposing that we set > 'IndexBulkDeleteResult.estimated_count = false' here I meant 'IndexBulkDeleteResult.estimated_count = true'. So my patch doesn't touch that field at all. > In

Re: vacuum -vs reltuples on insert only index

2020-11-02 Thread Peter Geoghegan
On Mon, Nov 2, 2020 at 10:03 AM Peter Geoghegan wrote: > Attached is my proposed fix, which takes this approach. I will commit > this on Wednesday or Thursday, barring any objections. Just to be clear: I am not proposing that we set 'IndexBulkDeleteResult.estimated_count = false' here, even thoug

Re: libpq compression

2020-11-02 Thread Andres Freund
Hi, On 2020-10-31 22:25:36 +0500, Andrey Borodin wrote: > But the price of compression is 1 cpu for 500MB/s (zstd). With a > 20Gbps network adapters cost of recompressing all traffic is at most > ~4 cores. It's not quite that simple, because presumably each connection is going to be handled by on

Re: Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)

2020-11-02 Thread Tom Lane
Ranier Vilela writes: > Em seg., 2 de nov. de 2020 às 01:36, Kyotaro Horiguchi < > horikyota@gmail.com> escreveu: >> Doesn't seem that ev_qual and ev_action can be NULL. The same >> function in the current converts action list to string using >> nodeToSTring so NIL is converted into '<>', whi

Re: how to replicate test results in cf-bot on travis

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 11:18:03 -0500, Dave Cramer wrote: > On Sun, 1 Nov 2020 at 18:15, Tom Lane wrote: > > > Dave Cramer writes: > > > OK, checked and I definitely have the changes. I don't think the > > isolation > > > test is running. Is there some configuration that enables it? > > > > No, top-

Re: Online checksums verification in the backend

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 12:35:30 -0500, Robert Haas wrote: > On Thu, Oct 29, 2020 at 2:17 PM Andres Freund wrote: > > I think this needs to be quickly reworked or reverted. I think it's fairly clear by now that revert is appropriate for now. > I don't like this patch, either. In addition to what And

Re: libpq compression

2020-11-02 Thread Konstantin Knizhnik
On 02.11.2020 19:53, Matthias van de Meent wrote: This is the result of network traffic of two backends one with enabled compression and another with disable compression after execution of "select * from pg_class" command: select * from pg_stat_network_traffic; pid | rx_raw_bytes | tx_r

Re: [proposal] de-TOAST'ing using a iterator

2020-11-02 Thread John Naylor
On Mon, Nov 2, 2020 at 1:30 PM Alvaro Herrera wrote: > On 2020-Nov-02, Anastasia Lubennikova wrote: > > > Status update for a commitfest entry. > > > > This entry was inactive for a very long time. > > John, are you going to continue working on this? > Not in the near future. For background, thi

RE: pgbench: option delaying queries till connections establishment?

2020-11-02 Thread Fabien COELHO
Hello, Please complete fixes for the documentation. At least the following sentence should be fixed: ``` The last two lines report the number of transactions per second, figured with and without counting the time to start database sessions. ``` Indeed. I scanned the file but did not find o

Re: should INSERT SELECT use a BulkInsertState?

2020-11-02 Thread Justin Pryzby
On Mon, Nov 02, 2020 at 07:53:45AM +0100, Luc Vlaming wrote: > On 30.10.20 05:51, Justin Pryzby wrote: > > On Thu, Oct 22, 2020 at 01:29:53PM +0100, Simon Riggs wrote: > > > On Fri, 16 Oct 2020 at 22:05, Justin Pryzby wrote: > > > > > > > > > I made this conditional on BEGIN BULK/SET bulk, so I'l

Re: Strange behavior with polygon and NaN

2020-11-02 Thread Georgios Kokolatos
Hi, apologies for the very, very late reply to your fixes. You have answered/addressed all my questions concerns. The added documentation reads well, at least to a non native English speaker. The patch still applies and as far as I can see the tests are passing. It gets my :+1: and I am changin

Re: public schema default ACL

2020-11-02 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Mon, Nov 2, 2020 at 5:51 AM Peter Eisentraut > > wrote: > >> I'm not convinced, however, that this would would really move the needle > >> in terms of the general security-uneasiness about the public schema and > >> s

Re: upcoming API changes for LLVM 12

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 10:28:33 -0800, Jesse Zhang wrote: > On Thu, Oct 15, 2020 at 6:12 PM Andres Freund wrote: > > There will be a breaking API change for JIT related API in LLVM > > 12. Mostly about making control over various aspects easier, and then > > building on top of that providing new featu

Re: Split copy.c

2020-11-02 Thread Andres Freund
On 2020-11-02 19:43:38 +0200, Heikki Linnakangas wrote: > On 02/11/2020 19:23, Andres Freund wrote: > > On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: > > > There isn't much common code between COPY FROM and COPY TO, so I propose > > > that we split copy.c into two: copyfrom.c and copyto.c

Re: upcoming API changes for LLVM 12

2020-11-02 Thread Jesse Zhang
Hi Andres, On Thu, Oct 15, 2020 at 6:12 PM Andres Freund wrote: > > Hi, > > There will be a breaking API change for JIT related API in LLVM > 12. Mostly about making control over various aspects easier, and then > building on top of that providing new features (like JIT compiling in > the backgro

Re: [PATCH] remove pg_archivecleanup and pg_standby

2020-11-02 Thread Justin Pryzby
On Thu, Oct 29, 2020 at 08:40:31PM +0100, Michael Banck wrote: > Am Mittwoch, den 28.10.2020, 21:44 -0500 schrieb Justin Pryzby: > > Forking this thread: > > https://www.postgresql.org/message-id/fd93f1c5-7818-a02c-01e5-1075ac0d4...@iki.fi > > I think these are old-fashioned since 9.6 (?), so remo

Re: WIP: BRIN multi-range indexes

2020-11-02 Thread Anastasia Lubennikova
Status update for a commitfest entry. According to cfbot the patch no longer compiles. Tomas, can you send an update, please? I also see that a few last messages mention a data corruption bug. Sounds pretty serious. Alvaro, have you had a chance to look at it? I don't see anything committed yet

Re: vacuum -vs reltuples on insert only index

2020-11-02 Thread Peter Geoghegan
On Fri, Oct 23, 2020 at 11:10 AM Peter Geoghegan wrote: > I suspect that we need to move in this direction within nbtree. I'm a > bit concerned about the partial index problem, though. I suppose maybe > we could do it the old way (which won't account for posting list > tuples) during cleanup as yo

Re: Disable WAL logging to speed up data loading

2020-11-02 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > On Mon, Nov 2, 2020 at 4:28 PM Robert Haas wrote: > > > > On Thu, Oct 29, 2020 at 4:00 PM Fujii Masao > > wrote: > > > Yes. What I meant was such a safe guard needs to be implemented. > > > > > > This may mean that if we want to recove

Re: -O switch

2020-11-02 Thread Tom Lane
Magnus Hagander writes: > PFA a patch to do this. One thing you missed is that the getopt() calls in both postmaster.c and postgres.c have 'o:' entries that should be removed. Also IIRC there is a "case 'o'" in postgres.c to go along with that. > Initially I kept the dynamic argv/argc in even t

Re: Collation versioning

2020-11-02 Thread Tom Lane
Thomas Munro writes: > Hmm, a failure from dory (WIndows) during pg_upgrade: > performing post-bootstrap initialization ... 2020-11-02 08:08:22.213 > EST [5392] FATAL: could not get collation version for locale > "English_United States.1252": error code 87 > 87 means invalid parameter. I'm sur

Re: RE: Delaying/avoiding BTreeTupleGetNAtts() call within _bt_compare()

2020-11-02 Thread Anastasia Lubennikova
Status update for a commitfest entry. This thread was inactive for a while. The latest review suggests that it is Ready For Committer. I also took a quick look at the patch and agree that it looks sensible. Maybe add a comment before the _bt_compare_inl() to explain the need for this code chang

Re: Split copy.c

2020-11-02 Thread Heikki Linnakangas
On 02/11/2020 19:23, Andres Freund wrote: On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: There isn't much common code between COPY FROM and COPY TO, so I propose that we split copy.c into two: copyfrom.c and copyto.c. See attached. I thin that's much nicer. Not quite convinced that's

Re: public schema default ACL

2020-11-02 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 2, 2020 at 5:51 AM Peter Eisentraut > wrote: >> I'm not convinced, however, that this would would really move the needle >> in terms of the general security-uneasiness about the public schema and >> search paths. AFAICT, in any of your proposals, the default wou

Re: Online checksums verification in the backend

2020-11-02 Thread Robert Haas
On Thu, Oct 29, 2020 at 2:17 PM Andres Freund wrote: > I think this needs to be quickly reworked or reverted. I don't like this patch, either. In addition to what Andres mentioned, CheckBuffer() is a completely-special case mechanism which can't be reused by anything else. In particular, the amch

Re: [proposal] de-TOAST'ing using a iterator

2020-11-02 Thread Alvaro Herrera
On 2020-Nov-02, Anastasia Lubennikova wrote: > Status update for a commitfest entry. > > This entry was inactive for a very long time. > John, are you going to continue working on this? > > The last message mentions some open issues, namely backend crashes, so I move > it to "Waiting on author

Re: [proposal] de-TOAST'ing using a iterator

2020-11-02 Thread Anastasia Lubennikova
Status update for a commitfest entry. This entry was inactive for a very long time. John, are you going to continue working on this? The last message mentions some open issues, namely backend crashes, so I move it to "Waiting on author". The new status of this patch is: Waiting on Author

Re: Split copy.c

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: > While looking at the parallel copy patches, it started to annoy me how large > copy.c is. Agreed. > There isn't much common code between COPY FROM and COPY TO, so I propose > that we split copy.c into two: copyfrom.c and copyto.c. Se

Re: Add table AM 'tid_visible'

2020-11-02 Thread Andres Freund
Hi, On 2020-11-02 09:16:26 +, Jinbao Chen wrote: > We directly call the heap function VM_ALL_VISIBLE in the > IndexOnlyNext function. This is not in line with the design idea of > table am. If the new storage type needs to implement index only > scan, he must hack the IndexOnlyNext function.

Re: public schema default ACL

2020-11-02 Thread Robert Haas
On Mon, Nov 2, 2020 at 5:51 AM Peter Eisentraut wrote: > I'm not convinced, however, that this would would really move the needle > in terms of the general security-uneasiness about the public schema and > search paths. AFAICT, in any of your proposals, the default would still > be to have the pu

Re: libpq compression

2020-11-02 Thread Daniil Zakhlystov
Hi, Currently, zpq_stream contains a check only for the tx buffered data - zpq_buffered(). I think that there should be the same functionality for rx buffered data. For example, the zpq_buffered_rx(). zpq_buffered_rx() returns a value greater than zero if there is any data that was fetched by rx_fu

Re: libpq compression

2020-11-02 Thread Matthias van de Meent
On Mon, 2 Nov 2020 at 15:03, Konstantin Knizhnik wrote: > > It seems to be very important to be able to measure network traffic > between client and server, especially in case of using compression. > Althought there are a lot of toll for monitoring network traffix for > Linux and other OSes, I di

Re: libpq compression

2020-11-02 Thread Konstantin Knizhnik
On 02.11.2020 19:32, Daniil Zakhlystov wrote: Hi, Currently, zpq_stream contains a check only for the tx buffered data - zpq_buffered(). I think that there should be the same functionality for rx buffered data. For example, the zpq_buffered_rx(). zpq_buffered_rx() returns a value greater than

Re: how to replicate test results in cf-bot on travis

2020-11-02 Thread Dave Cramer
On Sun, 1 Nov 2020 at 18:15, Tom Lane wrote: > Dave Cramer writes: > > OK, checked and I definitely have the changes. I don't think the > isolation > > test is running. Is there some configuration that enables it? > > No, top-level "check-world" should invoke that ... but if you're unsure, > you

Re: [patch] [doc] Clarify that signal functions have no feedback

2020-11-02 Thread David G. Johnston
On Tue, Oct 27, 2020 at 1:19 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2020-10-13 00:43, David G. Johnston wrote: > > Over in Bug# 16652 [1] Christoph failed to recognize the fact that > > signal sending functions are inherently one-way just as signals are. It > > seems

Re: Improper use about DatumGetInt32

2020-11-02 Thread Peter Eisentraut
I have committed 0003. For 0001, normal_rand(), I think you should reject negative arguments with an error. For 0002, I think you should change the block number arguments to int8, same as other contrib modules do.

Re: PATCH: Batch/pipelining support for libpq

2020-11-02 Thread Alvaro Herrera
On 2020-Nov-02, Alvaro Herrera wrote: > In v23 I've gone over docs; discovered that PQgetResults docs were > missing the new values. Added those. No significant other changes yet. >From 3f305d05000981445fe4dbbb96c2e88ace89f439 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 26 Oct 20

Re: Feedback on table expansion hook (including patch)

2020-11-02 Thread Anastasia Lubennikova
Status update for a commitfest entry. This patch implements useful improvement and the reviewer approved the code. It lacks a test, but looking at previously committed hooks, I think it is not mandatory. So, I move it to RFC. The new status of this patch is: Ready for Committer

Re: PATCH: Batch/pipelining support for libpq

2020-11-02 Thread Alvaro Herrera
In v23 I've gone over docs; discovered that PQgetResults docs were missing the new values. Added those. No significant other changes yet.

Re: public schema default ACL

2020-11-02 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2020-10-31 17:35, Noah Misch wrote: > >Overall, that's 3.2 votes for (b)(3)(X) and 0.0 to 1.0 votes for changing > >nothing. That suffices to proceed with (b)(3)(X). However, given the few > >votes and the conspicuous n

Re: Getting rid of aggregate_dummy()

2020-11-02 Thread Isaac Morland
On Mon, 2 Nov 2020 at 09:21, Tom Lane wrote: > Isaac Morland writes: > > > Speaking as somebody who sometimes does really dumb things, I don’t like > > this change in error message. The current message clearly identifies the > > problem; the new message makes it look like there is a bug in Pos

Re: Disable WAL logging to speed up data loading

2020-11-02 Thread Magnus Hagander
On Mon, Nov 2, 2020 at 4:28 PM Robert Haas wrote: > > On Thu, Oct 29, 2020 at 4:00 PM Fujii Masao > wrote: > > Yes. What I meant was such a safe guard needs to be implemented. > > > > This may mean that if we want to recover the database from that backup, > > we need to specify the recovery targ

Re: Disable WAL logging to speed up data loading

2020-11-02 Thread Robert Haas
On Thu, Oct 29, 2020 at 4:00 PM Fujii Masao wrote: > Yes. What I meant was such a safe guard needs to be implemented. > > This may mean that if we want to recover the database from that backup, > we need to specify the recovery target so that the archive recovery stops > just before the WAL record

Proposition for autoname columns

2020-11-02 Thread Eugen Konkov
Hello Pgsql-hackers, When selecting data from json column it named as '?column?' tucha=# select info->>'suma', docn from document order by id desc limit 5; ?column? | docn --+-- 665.97 | 695 513.51 | 632 665.97 | 4804 492.12 | 4315 332.98 | 1302 (5 rows) It would be u

Re: Improving psql slash usage help message

2020-11-02 Thread Anastasia Lubennikova
Status update for a commitfest entry. This thread was inactive for a while. Is anyone going to continue working on it? My two cents on the topic: I don’t see it as a big problem in the first place. In the source code, \dE refers to foreign tables and \de refers to forign servers. So, it seems mo

Re: hash_array_extended() needs to pass down collation

2020-11-02 Thread Tom Lane
Peter Eisentraut writes: > I noticed that hash_array_extended() does not pass down the collation to > the element's collation function, unlike hash_array(). As a > consequence, hash partitioning using text arrays as partition key fails. > The attached patch fixes this. I propose to backpatch

Re: Fix a typo in verify_heapam.c

2020-11-02 Thread Masahiko Sawada
On Mon, Nov 2, 2020 at 5:10 PM Heikki Linnakangas wrote: > > On 02/11/2020 10:05, Masahiko Sawada wrote: > > Hi all, > > > > I've attached a patch that fixes a typo in verify_heapam.c recently added. > > > > s/wheter/whether/ > > This was just fixed in commit 8a15e735b. Oh, I had missed it. Thank

Re: Yet another fast GiST build

2020-11-02 Thread Heikki Linnakangas
On 30/10/2020 20:20, Andrey Borodin wrote: 27 окт. 2020 г., в 16:43, Heikki Linnakangas написал(а): static bool gbt_inet_abbrev_abort(int memtupcount, SortSupport ssup) { #if SIZEOF_DATUM == 8 return false; #else return true; #endif } Better to not set the 'abbrev_converter' f

Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits

2020-11-02 Thread Tomas Vondra
On Mon, Nov 02, 2020 at 04:44:22PM +0300, Anastasia Lubennikova wrote: On 30.10.2020 03:42, Tomas Vondra wrote: Hi, I might be somewhat late to the party, but I've done a bit of benchmarking too ;-) I used TPC-H data from a 100GB test, and tried different combinations of COPY [FREEZE] and VACUU

Re: Getting rid of aggregate_dummy()

2020-11-02 Thread Tom Lane
Heikki Linnakangas writes: > On 01/11/2020 22:47, Tom Lane wrote: >> With that, we don't actually need aggregate_dummy() to exist at >> all, because it's never referenced. Having "aggregate_dummy" >> as the prosrc value for an aggregate function is now just a >> random convention; any other strin

Re: Getting rid of aggregate_dummy()

2020-11-02 Thread Tom Lane
Isaac Morland writes: > On Sun, 1 Nov 2020 at 15:47, Tom Lane wrote: >> Anyway, this saves about 3KB in fmgrtab.o, without any downside >> that I can see. If someone accidentally called an aggregate as >> a normal function, they'd now get a different error message, >> namely "internal function "

Re: contrib/sslinfo cleanup and OpenSSL errorhandling

2020-11-02 Thread Magnus Hagander
On Fri, Oct 30, 2020 at 11:20 PM Daniel Gustafsson wrote: > > > On 30 Oct 2020, at 00:40, Andres Freund wrote: > > > There's quite a few copies of this code that look exactly the same, > > except for the be_tls_get_* call. Do you see a way to have fewer copies > > of the same code? > > There's re

Re: Support for NSS as a libpq TLS backend

2020-11-02 Thread Andrew Dunstan
On 11/1/20 5:04 PM, Daniel Gustafsson wrote: >> On 1 Nov 2020, at 14:13, Andrew Dunstan wrote: >> I've been looking through the new patch set, in particular the testing >> setup. > Thanks! > >> The way it seems to proceed is to use the existing openssl generated >> certificates and imports them

Re: libpq compression

2020-11-02 Thread Konstantin Knizhnik
It seems to be very important to be able to measure network traffic between client and server, especially in case of using compression. Althought there are a lot of toll for monitoring network traffix for Linux and other OSes,  I didn't find one which can easily calculate traffix for particular

Re: [patch] [doc] Clarify temporary table name shadowing in CREATE TABLE

2020-11-02 Thread Magnus Hagander
On Wed, Oct 21, 2020 at 5:29 PM David G. Johnston wrote: > > Hackers, > > Moving this over from -general [1] Applied, thanks! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: ModifyTable overheads in generic plans

2020-11-02 Thread Amit Langote
On Mon, Nov 2, 2020 at 10:19 PM Heikki Linnakangas wrote: > On 30/10/2020 08:13, Amit Langote wrote: > > /* > > * Perform WITH CHECK OPTIONS check, if any. > > */ > > static void > > ExecProcessWithCheckOptions(ModifyTableState *mtstate, ResultRelInfo > > *resultRelInfo, > >

Re: -O switch

2020-11-02 Thread Magnus Hagander
On Thu, Oct 29, 2020 at 5:25 PM Tom Lane wrote: > > Magnus Hagander writes: > > On Thu, Oct 29, 2020 at 4:45 PM Tom Lane wrote: > >> I don't think it's really obsolete ... don't we use that to pass > >> PGOPTIONS through from the client? > > > That said, I don't think we do, or I'm misunderstand

Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits

2020-11-02 Thread Anastasia Lubennikova
On 30.10.2020 03:42, Tomas Vondra wrote: Hi, I might be somewhat late to the party, but I've done a bit of benchmarking too ;-) I used TPC-H data from a 100GB test, and tried different combinations of COPY [FREEZE] and VACUUM [FREEZE], both on current master and with the patch. So I don't reall

Re: Collation versioning

2020-11-02 Thread Thomas Munro
On Tue, Nov 3, 2020 at 2:08 AM Julien Rouhaud wrote: > On Mon, Nov 2, 2020 at 9:04 PM Thomas Munro wrote: > > Ok, moved and renamed, and finally pushed. Thanks for all the help! > > \o/ Thanks a lot Thomas! Hmm, a failure from dory (WIndows) during pg_upgrade: performing post-bootstrap initia

Re: Getting rid of aggregate_dummy()

2020-11-02 Thread Isaac Morland
On Sun, 1 Nov 2020 at 15:47, Tom Lane wrote: > Anyway, this saves about 3KB in fmgrtab.o, without any downside > that I can see. If someone accidentally called an aggregate as > a normal function, they'd now get a different error message, > namely "internal function "aggregate_dummy" is not in

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-02 Thread Magnus Hagander
On Tue, Oct 27, 2020 at 12:40 PM Bruce Momjian wrote: > > On Tue, Oct 27, 2020 at 12:35:56PM +0100, Peter Eisentraut wrote: > > On 2020-10-27 11:53, Bruce Momjian wrote: > > > On Tue, Oct 27, 2020 at 11:35:25AM +0100, Peter Eisentraut wrote: > > > > On 2020-10-06 12:26, Magnus Hagander wrote: > >

Re: ModifyTable overheads in generic plans

2020-11-02 Thread Heikki Linnakangas
On 30/10/2020 08:13, Amit Langote wrote: /* * Perform WITH CHECK OPTIONS check, if any. */ static void ExecProcessWithCheckOptions(ModifyTableState *mtstate, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, WCOKind wco_kind) {

Re: pg_upgrade analyze script

2020-11-02 Thread Magnus Hagander
On Fri, Oct 30, 2020 at 5:10 PM Georgios Kokolatos wrote: > > Hi, > > thank you for you contribution. > > I did notice that the cfbot [1] is failing for this patch. > Please try to address the issues for the upcoming Commitfest. Thanks for the notice -- PFA a rebased version! -- Magnus Hagande

Re: Collation versioning

2020-11-02 Thread Julien Rouhaud
On Mon, Nov 2, 2020 at 9:04 PM Thomas Munro wrote: > > On Mon, Nov 2, 2020 at 10:28 PM Julien Rouhaud wrote: > > + /* Remember not to complain about this collation again. */ > > + context->checked_colls = lappend_oid(context->checked_colls, > > +otherOb

Re: Collation versioning

2020-11-02 Thread Thomas Munro
On Mon, Nov 2, 2020 at 10:28 PM Julien Rouhaud wrote: > + /* Remember not to complain about this collation again. */ > + context->checked_colls = lappend_oid(context->checked_colls, > +otherObject->objectId); > > It's maybe not immediately obvious that i

Re: MultiXact\SLRU buffers configuration

2020-11-02 Thread Andrey Borodin
> 29 окт. 2020 г., в 18:49, Tomas Vondra > написал(а): > > On Thu, Oct 29, 2020 at 12:08:21PM +0500, Andrey Borodin wrote: >> >> >>> 29 окт. 2020 г., в 04:32, Tomas Vondra >>> написал(а): >>> >>> It's not my intention to be mean or anything like that, but to me this >>> means we don't re

Re: Split copy.c

2020-11-02 Thread vignesh C
On Mon, Nov 2, 2020 at 2:33 PM Heikki Linnakangas wrote: > > While looking at the parallel copy patches, it started to annoy me how > large copy.c is. It confuses my little head. (Ok, it's annoyed me many > times in the past, but I haven't done anything about it.) > +1 for having copy from & copy

Re: Split copy.c

2020-11-02 Thread Erik Rijkers
On 2020-11-02 12:19, Heikki Linnakangas wrote: On 02/11/2020 11:36, Erik Rijkers wrote: On 2020-11-02 10:03, Heikki Linnakangas wrote: While looking at the parallel copy patches, it started to annoy me how large copy.c is. It confuses my little head. (Ok, it's annoyed me many times in the pas

patch: reduce overhead of execution of CALL statement in no atomic mode from PL/pgSQL

2020-11-02 Thread Pavel Stehule
Hi, here is another patch related to using CALL statement inside PL/pgSQL code. A repeated using of CALL statement is expensive. How much? I wrote synthetic test: CREATE TABLE foo(a int, b int, c int); CREATE OR REPLACE PROCEDURE public.simple_proc3(a integer, b integer, c integer, cnt int, OU

Re: hash_array_extended() needs to pass down collation

2020-11-02 Thread Heikki Linnakangas
On 02/11/2020 09:40, Peter Eisentraut wrote: I noticed that hash_array_extended() does not pass down the collation to the element's collation function, unlike hash_array(). As a consequence, hash partitioning using text arrays as partition key fails. The attached patch fixes this. I propose to

Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)

2020-11-02 Thread Kyotaro Horiguchi
At Mon, 02 Nov 2020 17:25:04 +0900 (JST), Kyotaro Horiguchi wrote in > I called SetLatch() during WaitLatch(NULL, ) but that doesn't fire > WL_LATCH_SET event for me on Windows. (I got it fired on Linux..) On > Windows, the latch is detected after exiting the WaitLatch() > call. Seems like MyLa

Re: Getting rid of aggregate_dummy()

2020-11-02 Thread Heikki Linnakangas
On 01/11/2020 22:47, Tom Lane wrote: With that, we don't actually need aggregate_dummy() to exist at all, because it's never referenced. Having "aggregate_dummy" as the prosrc value for an aggregate function is now just a random convention; any other string would do as well. (We could save a fe

Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)

2020-11-02 Thread Ranier Vilela
Em seg., 2 de nov. de 2020 às 05:25, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > At Mon, 02 Nov 2020 14:33:40 +0900 (JST), Kyotaro Horiguchi < > horikyota@gmail.com> wrote in > > At Mon, 2 Nov 2020 16:22:09 +1300, Thomas Munro > wrote in > > > On Mon, Nov 2, 2020 at 1:49 PM Kyota

Re: Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)

2020-11-02 Thread Ranier Vilela
Em seg., 2 de nov. de 2020 às 01:36, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > At Sun, 01 Nov 2020 21:05:29 -0500, Tom Lane wrote in > > Kyotaro Horiguchi writes: > > > We cannot reach there with ev_action == NULL since it comes from a > > > non-nullable column. Since most of the

Add table AM 'tid_visible'

2020-11-02 Thread Jinbao Chen
We directly call the heap function VM_ALL_VISIBLE in the IndexOnlyNext function. This is not in line with the design idea of table am. If the new storage type needs to implement index only scan, he must hack the IndexOnlyNext function. So this patch add a new table am 'tid_visible' to test visibil

Re: enable pg_stat_statements to track rows processed by REFRESH MATERIALIZED VIEW

2020-11-02 Thread Fujii Masao
On 2020/11/02 14:02, Yuki Seino wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed +1. I checked the

Re: [patch] [doc] Add SELECT clause literals to queries section headers

2020-11-02 Thread Heikki Linnakangas
On 21/10/2020 18:04, David G. Johnston wrote: Hackers, Re-sending from -docs [1] with attachment in order to add to commitfest. David J. [1] https://www.postgresql.org/message-id/flat/159981394174.31338.7014519396749859167%40wrigleys.postgresql.org edit: attaching the patch Seems like a go

Re: public schema default ACL

2020-11-02 Thread Peter Eisentraut
On 2020-10-31 17:35, Noah Misch wrote: Overall, that's 3.2 votes for (b)(3)(X) and 0.0 to 1.0 votes for changing nothing. That suffices to proceed with (b)(3)(X). However, given the few votes and the conspicuous non-responses, work in this area has a high risk of failure. Hence, I will place i

Re: [HACKERS] logical decoding of two-phase transactions

2020-11-02 Thread Amit Kapila
On Wed, Oct 28, 2020 at 10:50 AM Peter Smith wrote: > > Hi Ajin. > > I have re-checked the v13 patches for how my remaining review comments > have been addressed. > > On Tue, Oct 27, 2020 at 8:55 PM Ajin Cherian wrote: > > > > > > > > v12-0002. File: src/backend/replication/l

  1   2   >