PG_COLOR not mentioned in docs of vacuumlo, oid2name and pgbench

2020-03-03 Thread Michael Paquier
Hi all, All the tools mentioned in $subject have been switched recently to use the central logging infrastructure, which means that they have gained coloring output. However we (mostly I) forgot to update the docs. Attached is a patch to fix this issue. Please let me know if there are comments

Re: [Proposal] Global temporary tables

2020-03-03 Thread Prabhat Sahu
On Tue, Mar 3, 2020 at 2:11 PM 曾文旌(义从) wrote: > > > > I fixed in global_temporary_table_v16-pg13.patch. > Thank you Wenjing for the patch. Now we are getting corruption with GTT with below scenario. postgres=# CREATE GLOBAL TEMPORARY TABLE gtt1(c1 bigint, c2 bigserial) on commit delete rows; CR

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-03 Thread Michael Paquier
On Mon, Mar 02, 2020 at 08:59:49PM +0300, Alexey Kondratov wrote: > OK, sounds reasonable, but just to be clear. I will remove only a > possibility to bypass this sanity check (with 0), but leave expectedSize > argument intact. We still need it, since pg_rewind takes WalSegSz from > ControlFile and

Re: [HACKERS] WAL logging problem in 9.4.3?

2020-03-03 Thread Kyotaro Horiguchi
Some fixes.. At Wed, 04 Mar 2020 16:29:19 +0900 (JST), Kyotaro Horiguchi wrote in > At first I fixed several ssues in 018_wal_optimize.pl: > > - TRUNCATE INSERT, TRUNCATE INSERT PREPARE > > It wrongly passes if finally we see the value only from the first > INSERT. I changed it so that it c

Re: Identifying user-created objects

2020-03-03 Thread Fujii Masao
On 2020/02/05 20:26, Masahiko Sawada wrote: Hi, User can create database objects such as functions into pg_catalog. But if I'm not missing something, currently there is no straightforward way to identify if the object is a user created object or a system object which is created during initdb.

Re: error context for vacuum to include block number

2020-03-03 Thread Masahiko Sawada
On Wed, 4 Mar 2020 at 04:32, Justin Pryzby wrote: > > On Thu, Feb 27, 2020 at 09:09:42PM -0300, Alvaro Herrera wrote: > > > + case PROGRESS_VACUUM_PHASE_VACUUM_HEAP: > > > + if (BlockNumberIsValid(cbarg->blkno)) > > > + errcontext("while vacuum

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-03 Thread Dilip Kumar
On Wed, Mar 4, 2020 at 11:45 AM Mahendra Singh Thalor wrote: > > On Mon, 24 Feb 2020 at 15:39, Amit Kapila wrote: > > > > On Thu, Feb 20, 2020 at 8:06 AM Andres Freund wrote: > > > > > > Hi, > > > > > > On 2020-02-19 11:12:18 +0530, Amit Kapila wrote: > > > > I think till we know the real need f

Re: Identifying user-created objects

2020-03-03 Thread vignesh C
On Wed, Mar 4, 2020 at 9:02 AM Masahiko Sawada wrote: > > On Tue, 3 Mar 2020 at 23:33, vignesh C wrote: > > > > Should we add some check if object exists or not here: > > +Datum > > +pg_is_user_object(PG_FUNCTION_ARGS) > > +{ > > +Oid oid = PG_GETARG_OID(0); > > + > > +PG_RETURN_BOOL(Obje

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Fujii Masao
On 2020/03/04 14:31, Masahiko Sawada wrote: On Wed, 4 Mar 2020 at 13:48, Fujii Masao wrote: On 2020/03/04 13:27, Michael Paquier wrote: On Wed, Mar 04, 2020 at 01:13:19PM +0900, Masahiko Sawada wrote: Yeah, so 0001 patch sets existing wait events to recovery conflict resolution. For ins

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-03 Thread Mahendra Singh Thalor
On Mon, 24 Feb 2020 at 15:39, Amit Kapila wrote: > > On Thu, Feb 20, 2020 at 8:06 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-02-19 11:12:18 +0530, Amit Kapila wrote: > > > I think till we know the real need for changing group locking, going > > > in the direction of what Tom suggested to

Re: Cast to uint16 in pg_checksum_page()

2020-03-03 Thread Tom Lane
Michael Paquier writes: > On Tue, Mar 03, 2020 at 06:37:36PM -0500, David Steele wrote: >> It seems like an explicit cast to uint16 would be better? > Attempting to compile the backend code with -Wconversion leads to many > warnings, still there has been at least one fix in the past to ease > the

Re: logical replication empty transactions

2020-03-03 Thread Dilip Kumar
On Wed, Mar 4, 2020 at 10:50 AM Amit Kapila wrote: > > On Wed, Mar 4, 2020 at 9:52 AM Dilip Kumar wrote: > > > > On Wed, Mar 4, 2020 at 9:12 AM Amit Kapila wrote: > > > > > > On Wed, Mar 4, 2020 at 7:17 AM Euler Taveira > > > wrote: > > > > > > > > On Tue, 3 Mar 2020 at 05:24, Amit Kapila > >

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Masahiko Sawada
On Wed, 4 Mar 2020 at 13:48, Fujii Masao wrote: > > > > On 2020/03/04 13:27, Michael Paquier wrote: > > On Wed, Mar 04, 2020 at 01:13:19PM +0900, Masahiko Sawada wrote: > >> Yeah, so 0001 patch sets existing wait events to recovery conflict > >> resolution. For instance, it sets (PG_WAIT_LOCK | LO

Re: Unicode escapes with any backend encoding

2020-03-03 Thread John Naylor
On Tue, Feb 25, 2020 at 1:49 AM Tom Lane wrote: > > I wrote: > > [ unicode-escapes-with-other-server-encodings-2.patch ] > > I see this patch got sideswiped by the recent refactoring of JSON > lexing. Here's an attempt at fixing it up. Since the frontend > code isn't going to have access to enco

Re: PG14 target version?

2020-03-03 Thread Michael Paquier
On Tue, Mar 03, 2020 at 01:10:26PM -0500, David Steele wrote: > Anybody know how to add 14 to the "Target version" dropdown in the CF app? The only person knowing that stuff is I think Magnus. I don't have an access to that. > I haven't needed it yet but I'd like it to be there when I do. That

Re: Symbolic names for the values of typalign and typstorage

2020-03-03 Thread Michael Paquier
On Tue, Mar 03, 2020 at 04:45:51PM -0500, Tom Lane wrote: > Yeah, that works out very nicely: there's now only one place besides > tupmacs.h that needs a new #include. > > I did a little more polishing, and consider the attached committable, > unless anyone has objections. Nice. I have looked at

Re: [PATCH] Add schema and table names to partition error

2020-03-03 Thread Amit Kapila
On Wed, Mar 4, 2020 at 10:48 AM Chris Bandy wrote: > > On 3/3/20 10:08 AM, Alvaro Herrera wrote: > >> +\set VERBOSITY verbose > >> +-- no partitions > >> +CREATE TABLE pterr1 (x int, y int, PRIMARY KEY (x, y)) PARTITION BY RANGE > >> (y); > >> +INSERT INTO pterr1 VALUES (10, 10); > >> +ERROR: 23

Re: logical replication empty transactions

2020-03-03 Thread Amit Kapila
On Wed, Mar 4, 2020 at 9:52 AM Dilip Kumar wrote: > > On Wed, Mar 4, 2020 at 9:12 AM Amit Kapila wrote: > > > > On Wed, Mar 4, 2020 at 7:17 AM Euler Taveira > > wrote: > > > > > > On Tue, 3 Mar 2020 at 05:24, Amit Kapila wrote: > > >> > > >> > > >> Another idea could be that we stream the trans

Re: [PATCH] Add schema and table names to partition error

2020-03-03 Thread Chris Bandy
On 3/3/20 10:08 AM, Alvaro Herrera wrote: +\set VERBOSITY verbose +-- no partitions +CREATE TABLE pterr1 (x int, y int, PRIMARY KEY (x, y)) PARTITION BY RANGE (y); +INSERT INTO pterr1 VALUES (10, 10); +ERROR: 23514: no partition of relation "pterr1" found for row +DETAIL: Partition key of the f

Re: reindex concurrently and two toast indexes

2020-03-03 Thread Michael Paquier
On Tue, Mar 03, 2020 at 06:25:51PM +0900, Michael Paquier wrote: > Or actually, a more simple solution is to abuse of the two existing > routines so as the dependency switch is done the other way around, > from the new index to the old one. That would visibly work because > there is no CCI between

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-03-03 Thread Amit Kapila
On Wed, Mar 4, 2020 at 3:16 AM Tomas Vondra wrote: > > Hi, > > I started looking at this patch series again, hoping to get it moving > for PG13. > It is good to keep moving this forward, but there are quite a few problems with the design which need a broader discussion. Some of what I recall are

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Fujii Masao
On 2020/03/04 13:27, Michael Paquier wrote: On Wed, Mar 04, 2020 at 01:13:19PM +0900, Masahiko Sawada wrote: Yeah, so 0001 patch sets existing wait events to recovery conflict resolution. For instance, it sets (PG_WAIT_LOCK | LOCKTAG_TRANSACTION) to the recovery conflict on a snapshot. 0003 p

Re: Cast to uint16 in pg_checksum_page()

2020-03-03 Thread Michael Paquier
On Tue, Mar 03, 2020 at 06:37:36PM -0500, David Steele wrote: > Hackers, > > The current code in checksum_impl.h does not play nice with -Wconversion on > gcc: > > warning: conversion to 'uint16 {aka short unsigned int}' from 'uint32 {aka > unsigned int}' may alter its value [-Wconversion] >

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Michael Paquier
On Wed, Mar 04, 2020 at 01:13:19PM +0900, Masahiko Sawada wrote: > Yeah, so 0001 patch sets existing wait events to recovery conflict > resolution. For instance, it sets (PG_WAIT_LOCK | LOCKTAG_TRANSACTION) > to the recovery conflict on a snapshot. 0003 patch improves these wait > events by adding

Re: logical replication empty transactions

2020-03-03 Thread Dilip Kumar
On Wed, Mar 4, 2020 at 9:12 AM Amit Kapila wrote: > > On Wed, Mar 4, 2020 at 7:17 AM Euler Taveira > wrote: > > > > On Tue, 3 Mar 2020 at 05:24, Amit Kapila wrote: > >> > >> > >> Another idea could be that we stream the transaction after some > >> threshold number (say 100 or anything we think i

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Masahiko Sawada
On Wed, 4 Mar 2020 at 11:04, Fujii Masao wrote: > > > > On 2020/02/29 12:36, Masahiko Sawada wrote: > > On Wed, 26 Feb 2020 at 16:19, Masahiko Sawada > > wrote: > >> > >> On Tue, 18 Feb 2020 at 17:58, Masahiko Sawada > >> wrote: > >>> > >>> Hi all, > >>> > >>> When recovery conflicts happen on t

Re: Add LogicalTapeSetExtend() to logtape.c

2020-03-03 Thread Adam Lee
On Tue, Mar 03, 2020 at 08:46:24AM -0800, Jeff Davis wrote: > On Tue, 2020-03-03 at 09:49 +0800, Adam Lee wrote: > > Master: 12729ms 12970ms 12999ms > > With my patch(a pointer): 12965ms 13273ms 13116ms > > With your patch(flexible array): 12906ms 12991ms 13043ms > > Hmm.. looks like you didn't re

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-03-03 Thread Dilip Kumar
On Wed, Mar 4, 2020 at 3:16 AM Tomas Vondra wrote: > > Hi, > > I started looking at this patch series again, hoping to get it moving > for PG13. Nice. There's been a tremendous amount of work done since I last > worked on it, and a lot was discussed on this thread, so it'll take a > while to ge

Re: logical replication empty transactions

2020-03-03 Thread Amit Kapila
On Wed, Mar 4, 2020 at 7:17 AM Euler Taveira wrote: > > On Tue, 3 Mar 2020 at 05:24, Amit Kapila wrote: >> >> >> Another idea could be that we stream the transaction after some >> threshold number (say 100 or anything we think is reasonable) of empty >> xacts. This will reduce the traffic withou

Re: Identifying user-created objects

2020-03-03 Thread Masahiko Sawada
On Tue, 3 Mar 2020 at 23:33, vignesh C wrote: > > Should we add some check if object exists or not here: > +Datum > +pg_is_user_object(PG_FUNCTION_ARGS) > +{ > +Oid oid = PG_GETARG_OID(0); > + > +PG_RETURN_BOOL(ObjectIsUserObject(oid)); > +} > > I was trying some scenarios where we pass an

Re: Fastpath while arranging the changes in LSN order in logical decoding

2020-03-03 Thread Dilip Kumar
On Wed, Mar 4, 2020 at 3:02 AM David Zhang wrote: > > Hi Dilip, > > I repeated the same test cases again and can't reproduce the > disconnection issue after applied your new patch. Thanks for the confirmation. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com

Re: Psql patch to show access methods info

2020-03-03 Thread Alvaro Herrera
On 2020-Mar-04, Alexander Korotkov wrote: > On Wed, Jan 22, 2020 at 1:33 AM Alvaro Herrera > wrote: > > I think I would like this feature to be in, but I'm not sure that the > > shape is final yet. My points: > > > > a) I don't see any use for \dA as presented; I think the \dA+ output is > >

Re: New SQL counter statistics view (pg_stat_sql)

2020-03-03 Thread Alvaro Herrera
On 2019-Nov-13, Smith, Peter wrote: > From: Thomas Munro Sent: Monday, 4 November 2019 > 1:43 PM > > > No comment on the patch but I noticed that the documentation changes don't > > build. Please make sure you can "make docs" successfully, having installed > > the documentation tools[1]. >

Re: Some problems of recovery conflict wait events

2020-03-03 Thread Fujii Masao
On 2020/02/29 12:36, Masahiko Sawada wrote: On Wed, 26 Feb 2020 at 16:19, Masahiko Sawada wrote: On Tue, 18 Feb 2020 at 17:58, Masahiko Sawada wrote: Hi all, When recovery conflicts happen on the streaming replication standby, the wait event of startup process is null when max_standby_s

Re: [PATCH] kNN for btree

2020-03-03 Thread Peter Geoghegan
On Mon, Mar 2, 2020 at 1:27 PM Alexander Korotkov wrote: > I've rebased the patchset to the current master and made some > refactoring. I hope it would be possible to bring it to committable > shape during this CF. This need more refactoring though. This patch doesn't change anything about the

Re: logical replication empty transactions

2020-03-03 Thread Euler Taveira
On Tue, 3 Mar 2020 at 05:24, Amit Kapila wrote: > > Another idea could be that we stream the transaction after some > threshold number (say 100 or anything we think is reasonable) of empty > xacts. This will reduce the traffic without tinkering with the core > design too much. > > > Amit, I sugg

Re: Back-patching -Wno-format-truncation.

2020-03-03 Thread Kyotaro Horiguchi
At Tue, 03 Mar 2020 18:44:16 -0500, Tom Lane wrote in > Uh ... it sure looks to me like they were back-patched as advertised. > Do you not have these back-branch commits? > > Author: Tom Lane > Branch: master Release: REL_11_BR [e71658523] 2018-06-16 15:34:07 -0400 > Branch: REL_10_STABLE Relea

Re: Back-patching -Wno-format-truncation.

2020-03-03 Thread Tom Lane
Kyotaro Horiguchi writes: > If I build the past versions from 9.4 to 9.6 with GCC8, I find it > really annoying to see the build screen filled with massive number of > warnings of format-truncation, stringop-truncation and > format-overflow. > Just applying the commit 416e3e318c as-is silences th

Re: Is it time to retire type "opaque"?

2020-03-03 Thread Tom Lane
I wrote: > In short, I propose ripping out OPAQUE entirely. Like so... I separated out the changes in CREATE TYPE because that's a bit more complicated than the rest. The behavior around shell types gets somewhat simpler, and I moved the I/O function result type checks into the lookup functions

Cast to uint16 in pg_checksum_page()

2020-03-03 Thread David Steele
Hackers, The current code in checksum_impl.h does not play nice with -Wconversion on gcc: warning: conversion to 'uint16 {aka short unsigned int}' from 'uint32 {aka unsigned int}' may alter its value [-Wconversion] return (checksum % 65535) + 1;

Re: Psql patch to show access methods info

2020-03-03 Thread Alexander Korotkov
Hi! Thank you for the review. Revised patch is attached. On Wed, Jan 22, 2020 at 1:33 AM Alvaro Herrera wrote: > I think I would like this feature to be in, but I'm not sure that the > shape is final yet. My points: > > a) I don't see any use for \dA as presented; I think the \dA+ output is >

Back-patching -Wno-format-truncation.

2020-03-03 Thread Kyotaro Horiguchi
Hello. (added Tom in Cc:) If I build the past versions from 9.4 to 9.6 with GCC8, I find it really annoying to see the build screen filled with massive number of warnings of format-truncation, stringop-truncation and format-overflow. Just applying the commit 416e3e318c as-is silences the first t

Re: Index Skip Scan

2020-03-03 Thread David Rowley
On Tue, 18 Feb 2020 at 05:24, Dmitry Dolgov <9erthali...@gmail.com> wrote: > Here is something similar to what I had in mind. (changing to this email address for future emails) Hi, I've been looking over v32 of the patch and have a few comments regarding the planner changes. I think the changes

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-03-03 Thread Tomas Vondra
D'oh! As usual I forgot to actually attach the patch I mentioned. So here it is ... regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/x

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-03-03 Thread Tomas Vondra
Hi, I started looking at this patch series again, hoping to get it moving for PG13. There's been a tremendous amount of work done since I last worked on it, and a lot was discussed on this thread, so it'll take a while to get familiar with the new code ... The first thing I realized that WAL-log

Re: Symbolic names for the values of typalign and typstorage

2020-03-03 Thread Tom Lane
I wrote: > Alvaro Herrera writes: >> On 2020-Mar-03, Tom Lane wrote: >>> I realized that a possible compromise position is to have tupmacs.h >>> include pg_type_d.h, not the whole pg_type.h header, thus dodging the >>> indirect inclusions. That still brings in the type-OID macros, but >>> it's a

Re: Fastpath while arranging the changes in LSN order in logical decoding

2020-03-03 Thread David Zhang
Hi Dilip, I repeated the same test cases again and can't reproduce the disconnection issue after applied your new patch. Best regards, David On 2020-03-02 9:11 p.m., Dilip Kumar wrote: On Wed, Feb 19, 2020 at 6:00 AM David Zhang wrote: After manually applied the patch, a diff regenerated

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-03-03 Thread Bossart, Nathan
On 3/3/20, 12:24 PM, "Alvaro Herrera" wrote: > IMO: is_dir should be there (and subdirs should be listed), but > parent_dir should not appear. Also, the "path" should show the complete > pathname, including containing dirs, starting from whatever the "root" > is for the operation. > > So for the

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-03-03 Thread Alvaro Herrera
On 2020-Mar-03, Justin Pryzby wrote: > But I don't think it makes sense to go through more implementation/review > cycles without some agreement from a larger group regarding the > desired/intended interface. Should there be a column for "parent dir" ? Or a > column for "is_dir" ? Should dirs b

Re: WIP: expression evaluation improvements

2020-03-03 Thread Soumyadeep Chakraborty
Hello Andres, Attached is a patch on top of v2-0026-WIP-expression-eval-relative-pointer-suppport.patch that eliminates the const pointer references to fmgrInfo in the generated code. FmgrInfos are now allocated like the FunctionCallInfos are (ExprBuilderAllocFunctionMgrInfo()) and are initialize

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-03-03 Thread Justin Pryzby
On Tue, Mar 03, 2020 at 02:51:54PM -0500, David Steele wrote: > Hi Fabien, > > On 1/16/20 9:38 AM, Justin Pryzby wrote: > >On Thu, Jan 16, 2020 at 09:34:32AM +0100, Fabien COELHO wrote: > >>Also, I'm not fully sure why ".*" files should be skipped, maybe it should > >>be an option? Or the user can

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-03-03 Thread David Steele
Hi Fabien, On 1/16/20 9:38 AM, Justin Pryzby wrote: On Thu, Jan 16, 2020 at 09:34:32AM +0100, Fabien COELHO wrote: Also, I'm not fully sure why ".*" files should be skipped, maybe it should be an option? Or the user can filter it with SQL if it does not want them? I think if someone wants the

Re: error context for vacuum to include block number

2020-03-03 Thread Alvaro Herrera
On 2020-Mar-03, Justin Pryzby wrote: > On Thu, Feb 27, 2020 at 09:09:42PM -0300, Alvaro Herrera wrote: > > > + case PROGRESS_VACUUM_PHASE_VACUUM_HEAP: > > > + if (BlockNumberIsValid(cbarg->blkno)) > > > + errcontext("while vacuuming block %u of > >

Re: [PATCH] Documentation bug related to client authentication using TLS certificate

2020-03-03 Thread Cary Huang
Hi Chris Thank you for your feedback. You are right, libpq verify if the server is trustworthy by checking server certificate and check hostname matches with server common name when sslmode is verify-full, and it is already explained in another documentation page  https://www.postgresql.org/d

Re: error context for vacuum to include block number

2020-03-03 Thread Justin Pryzby
On Thu, Feb 27, 2020 at 09:09:42PM -0300, Alvaro Herrera wrote: > > + case PROGRESS_VACUUM_PHASE_VACUUM_HEAP: > > + if (BlockNumberIsValid(cbarg->blkno)) > > + errcontext("while vacuuming block %u of > > relation \"%s.%s\"", > > +

Re: Option to dump foreign data in pg_dump

2020-03-03 Thread David Steele
Hi Luis, On 1/29/20 11:05 AM, Peter Eisentraut wrote: On 2020-01-21 10:36, Luis Carril wrote: Yes we can support --include-foreign-data without parallel option and later add support for parallel option as a different patch. Hi, I've attached a new version of the patch in which an error

Re: WIP: System Versioned Temporal Table

2020-03-03 Thread Vik Fearing
On 03/03/2020 19:33, David Steele wrote: > Hi Surafel, > > On 1/3/20 5:57 AM, Surafel Temesgen wrote: >> Rebased and conflict resolved i hope it build clean this time > > This patch no longer applies according to cfbot and there are a number > of review comments that don't seem to have been addre

Re: [PATCH] Incremental sort

2020-03-03 Thread Tomas Vondra
On Tue, Mar 03, 2020 at 12:17:22PM -0500, David Steele wrote: James and Tomas, On 1/21/20 10:03 AM, James Coleman wrote: On Tue, Jan 21, 2020 at 9:58 AM Tomas Vondra wrote: On Tue, Jan 21, 2020 at 09:37:01AM -0500, James Coleman wrote: On Tue, Jan 21, 2020 at 9:25 AM Tomas Vondra wrote:

Re: Symbolic names for the values of typalign and typstorage

2020-03-03 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Mar-03, Tom Lane wrote: >> I realized that a possible compromise position is to have tupmacs.h >> include pg_type_d.h, not the whole pg_type.h header, thus dodging the >> indirect inclusions. That still brings in the type-OID macros, but >> it's a lot less header

Re: WIP: System Versioned Temporal Table

2020-03-03 Thread David Steele
Hi Surafel, On 1/3/20 5:57 AM, Surafel Temesgen wrote: Rebased and conflict resolved i hope it build clean this time This patch no longer applies according to cfbot and there are a number of review comments that don't seem to have been addressed yet. The patch is not exactly new for this CF

Re: Symbolic names for the values of typalign and typstorage

2020-03-03 Thread Alvaro Herrera
On 2020-Mar-03, Tom Lane wrote: > I realized that a possible compromise position is to have tupmacs.h > include pg_type_d.h, not the whole pg_type.h header, thus dodging the > indirect inclusions. That still brings in the type-OID macros, but > it's a lot less header scope creep than I was first

Re: Setting ACL

2020-03-03 Thread Tom Lane
Vik Fearing writes: > Ok, so not safe. Should we remove makeaclitem() then? Well, I wouldn't recommend poking values into an ACL with it, but it seems like it has potential use in queries too, say select * from pg_class where makeaclitem('joe'::regrole, 'bob'::regrole, 'select', false) = any(r

Re: Setting ACL

2020-03-03 Thread Vik Fearing
On 03/03/2020 19:02, Tom Lane wrote: > Vik Fearing writes: >> I have a few questions about setting acl on SQL level. >> Is it safe to do something like >> UPDATE pg_class SET relacl = $1 WHERE oid = $2; >> ? > >> I don't think it is because ExecGrant_* call updateAclDependencies after >> they

PG14 target version?

2020-03-03 Thread David Steele
Anybody know how to add 14 to the "Target version" dropdown in the CF app? I haven't needed it yet but I'd like it to be there when I do. Thanks! -- -David da...@pgmasters.net

Re: Setting ACL

2020-03-03 Thread Tom Lane
Vik Fearing writes: > I have a few questions about setting acl on SQL level. > Is it safe to do something like > UPDATE pg_class SET relacl = $1 WHERE oid = $2; > ? > I don't think it is because ExecGrant_* call updateAclDependencies after > they do the update and my own update would not do t

Re: [HACKERS] [PATCH] Generic type subscripting

2020-03-03 Thread David Steele
Hi Dmitry, On 2/13/20 8:12 AM, Dmitry Dolgov wrote: Yep, I wasn't paying much attention recently to this patch, will post rebased and fixed version soon. The last CF for PG13 has begun. Do you know when you'll have a rebased and updated patch available? The current patch no longer applies

Setting ACL

2020-03-03 Thread Vik Fearing
I have a few questions about setting acl on SQL level. Is it safe to do something like UPDATE pg_class SET relacl = $1 WHERE oid = $2; ? I don't think it is because ExecGrant_* call updateAclDependencies after they do the update and my own update would not do that. But is it safe to do my up

Re: row filtering for logical replication

2020-03-03 Thread David Steele
Hi Euler, On 1/21/20 2:32 AM, Craig Ringer wrote: On Fri, 17 Jan 2020 at 07:58, Euler Taveira wrote: Em qui., 16 de jan. de 2020 às 18:57, Tomas Vondra escreveu: Euler, this patch is still in "waiting on author" since 11/25. Do you plan to review changes made by Amit in the patches he subm

Re: [PATCH] Incremental sort

2020-03-03 Thread David Steele
James and Tomas, On 1/21/20 10:03 AM, James Coleman wrote: On Tue, Jan 21, 2020 at 9:58 AM Tomas Vondra wrote: On Tue, Jan 21, 2020 at 09:37:01AM -0500, James Coleman wrote: On Tue, Jan 21, 2020 at 9:25 AM Tomas Vondra wrote: Hi, This patch has been marked as WoA since end of November, a

Is it time to retire type "opaque"?

2020-03-03 Thread Tom Lane
While looking at the proposed ALTER TYPE patch, I got annoyed about the amount of cruft that exists in typecmds.c to deal with ancient, non-type-safe ways of declaring type I/O functions. The CREATE TYPE reference pages explains this well enough: Before PostgreSQL version 8.2, the shell-type c

Re: [GSoC 2020] Questions About Performance Farm Benchmarks and Website

2020-03-03 Thread Mark Wong
Hi Kalvin, On Tue, Mar 03, 2020 at 03:07:13AM -0700, Kalvin Eng wrote: > Hi there, > > I am potentially interested in the performance farm project listed here: > https://wiki.postgresql.org/wiki/GSoC_2020#Develop_Performance_Farm_Benchmarks_and_Website_.282020.29 > > I've applied to the pgperffa

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-03-03 Thread Ashutosh Bapat
Hi Fujita-san, I reviewed the patch. Except for the logic of matching the pairs of partitions from already merged partitions, I think the code changes are good. But there are several places where it needs further changes to comments. The attached patch has those. I have described some of them below

Re: Add LogicalTapeSetExtend() to logtape.c

2020-03-03 Thread Jeff Davis
On Tue, 2020-03-03 at 09:49 +0800, Adam Lee wrote: > Master: 12729ms 12970ms 12999ms > With my patch(a pointer): 12965ms 13273ms 13116ms > With your patch(flexible array): 12906ms 12991ms 13043ms Hmm.. looks like you didn't reproduce the difference I saw. What compiler/version? Regards, J

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

2020-03-03 Thread Tom Lane
=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= writes: > On Sun, Mar 1, 2020 at 11:25 PM Tom Lane wrote: >> Going once, going twice ... > You have moved this to better place, so none from me, and thank you. Pushed then. While looking over the patch one more time, I noticed some pretty poor

Re: [PATCH] Add schema and table names to partition error

2020-03-03 Thread Alvaro Herrera
> +\set VERBOSITY verbose > +-- no partitions > +CREATE TABLE pterr1 (x int, y int, PRIMARY KEY (x, y)) PARTITION BY RANGE > (y); > +INSERT INTO pterr1 VALUES (10, 10); > +ERROR: 23514: no partition of relation "pterr1" found for row > +DETAIL: Partition key of the failing row contains (y) = (10

Re: Minor issues in .pgpass

2020-03-03 Thread Fujii Masao
On 2020/03/03 21:38, Hamid Akhtar wrote: On Mon, Mar 2, 2020 at 6:07 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: On 2020/02/29 0:46, Hamid Akhtar wrote: > The following review has been posted through the commitfest application: > make installcheck-world:  not

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-03 Thread Laurenz Albe
On Mon, 2020-03-02 at 14:57 +0100, I wrote: > But I think it would be good to have *something* that addresses the immediate > problem (INSERT-only tables are autovacuumed too late), as long as > that does not have negative side-effects or blocks further improvements. > > I don't feel totally well

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-03-03 Thread Julien Rouhaud
On Fri, Feb 7, 2020 at 11:12 AM Julien Rouhaud wrote: > > On Thu, Feb 06, 2020 at 02:59:09PM -0500, Robert Haas wrote: > > On Wed, Feb 5, 2020 at 9:32 AM Julien Rouhaud > > wrote: > > > There's also the possibility to reserve 1 bit of the hash to know if > > > this is a utility command or not, a

Re: Symbolic names for the values of typalign and typstorage

2020-03-03 Thread Tom Lane
I wrote: > Alvaro Herrera writes: >> On 2020-Mar-02, Tom Lane wrote: >>> One thing that I'm not totally happy about, as this stands, is that >>> we have to #include "catalog/pg_type.h" in various places we did >>> not need to before (although only a fraction of the files I touched >>> need that).

Re: backup manifests

2020-03-03 Thread tushar
On 3/3/20 4:04 PM, tushar wrote: Thanks Robert.  After applying all the 5 patches (v8-00*) against PG v13 (commit id -afb5465e0cfce7637066eaaaeecab30b0f23fbe3) , There is a scenario where pg_validatebackup is not throwing an error if some file deleted from pg_wal/ folder and  but later at the

Re: Identifying user-created objects

2020-03-03 Thread vignesh C
On Wed, Feb 26, 2020 at 1:18 PM Masahiko Sawada wrote: > > On Thu, 13 Feb 2020 at 17:13, Julien Rouhaud wrote: > > > > On Thu, Feb 13, 2020 at 8:32 AM Amit Langote > > wrote: > > > > > > On Thu, Feb 13, 2020 at 10:30 AM Kyotaro Horiguchi > > > wrote: > > > > At Mon, 10 Feb 2020 14:32:44 +0900,

Re: Some improvements to numeric sqrt() and ln()

2020-03-03 Thread Dean Rasheed
On Tue, 3 Mar 2020 at 00:17, Tels wrote: > > Thank you for these patches, these sound like really nice improvements. Thanks for looking! > One thing can to my mind while reading the patch: > > +* If r < 0 Then > +* Let r = r + 2*s - 1 > +

Re: Minor issues in .pgpass

2020-03-03 Thread Hamid Akhtar
On Tue, Mar 3, 2020 at 5:38 PM Hamid Akhtar wrote: > > > On Mon, Mar 2, 2020 at 6:07 PM Fujii Masao > wrote: > >> >> >> On 2020/02/29 0:46, Hamid Akhtar wrote: >> > The following review has been posted through the commitfest application: >> > make installcheck-world: not tested >> > Implements

Re: error context for vacuum to include block number

2020-03-03 Thread Masahiko Sawada
On Fri, 21 Feb 2020 at 02:02, Alvaro Herrera wrote: > > This is, by far, the most complex error context callback we've tried to > write ... Easy stuff first: > > In the error context function itself, you don't need the _() around the > strings: errcontext() is marked as a gettext trigger and it do

Re: [PATCH] Replica sends an incorrect epoch in its hot standby feedback to the Master

2020-03-03 Thread David Steele
On 3/2/20 10:33 AM, Juan José Santamaría Flecha wrote: On Fri, Feb 21, 2020 at 8:15 PM Palamadai, Eka > wrote: Please, do not top post on this list. Thanks a lot for the feedback. Please let me know if you have any further comments. Meanwhile, I have also add

Re: Minor issues in .pgpass

2020-03-03 Thread Hamid Akhtar
On Mon, Mar 2, 2020 at 6:07 PM Fujii Masao wrote: > > > On 2020/02/29 0:46, Hamid Akhtar wrote: > > The following review has been posted through the commitfest application: > > make installcheck-world: not tested > > Implements feature: not tested > > Spec compliant: not tested >

Re: backup manifests

2020-03-03 Thread tushar
On 2/27/20 9:22 PM, Robert Haas wrote: Here's a new patch set for this feature. Thanks Robert.  After applying all the 5 patches (v8-00*) against PG v13 (commit id -afb5465e0cfce7637066eaaaeecab30b0f23fbe3) , There are few issues/observations 1)Getting segmentation fault error if  we try pg

[GSoC 2020] Questions About Performance Farm Benchmarks and Website

2020-03-03 Thread Kalvin Eng
Hi there, I am potentially interested in the performance farm project listed here: https://wiki.postgresql.org/wiki/GSoC_2020#Develop_Performance_Farm_Benchmarks_and_Website_.282020.29 I've applied to the pgperffarm mailing list as well, but am waiting for moderator approval so I thought this lis

Re: logical replication empty transactions

2020-03-03 Thread Amit Kapila
On Tue, Mar 3, 2020 at 2:17 PM Dilip Kumar wrote: > > On Tue, Mar 3, 2020 at 1:54 PM Amit Kapila wrote: > > > > On Tue, Mar 3, 2020 at 9:35 AM Dilip Kumar wrote: > > > > > > On Mon, Mar 2, 2020 at 4:56 PM Amit Kapila > > > wrote: > > > > > > > > > > > > One thing that is not clear to me is how

Re: reindex concurrently and two toast indexes

2020-03-03 Thread Michael Paquier
On Tue, Mar 03, 2020 at 05:06:42PM +0900, Michael Paquier wrote: > Attached is a draft patch to take care of that problem for HEAD. It > still needs a lot of polishing (variable names are not actually old > or new anymore, etc.) but that's enough to show the idea. If a version > reaches PG12, we

Re: Internal key management system

2020-03-03 Thread Masahiko Sawada
On Tue, 3 Mar 2020 at 08:49, Cary Huang wrote: > > Hi Masahiko > Please see below my comments regarding kms_v4.patch that you have shared > earlier. Thank you for reviewing this patch! > > (1) > There is a discrepancy between the documentation and the actual function > definition. For example

Re: logical replication empty transactions

2020-03-03 Thread Dilip Kumar
On Tue, Mar 3, 2020 at 1:54 PM Amit Kapila wrote: > > On Tue, Mar 3, 2020 at 9:35 AM Dilip Kumar wrote: > > > > On Mon, Mar 2, 2020 at 4:56 PM Amit Kapila wrote: > > > > > > > > > One thing that is not clear to me is how will we advance restart_lsn > > > if we don't send any empty xact in a syst

Re: logical replication empty transactions

2020-03-03 Thread Amit Kapila
On Tue, Mar 3, 2020 at 9:35 AM Dilip Kumar wrote: > > On Mon, Mar 2, 2020 at 4:56 PM Amit Kapila wrote: > > > > > > One thing that is not clear to me is how will we advance restart_lsn > > if we don't send any empty xact in a system where there are many such > > xacts? IIRC, the restart_lsn is a

Re: reindex concurrently and two toast indexes

2020-03-03 Thread Michael Paquier
On Thu, Feb 27, 2020 at 09:07:35AM +0100, Julien Rouhaud wrote: > While looking at it, I see that invalid indexes seem to leaked when the table > is dropped, with no way to get rid of them: > > Shouldn't DROP TABLE be fixed to also drop invalid indexes? Hmm. The problem here is that I think that