Re: Is it worth accepting multiple CRLs?

2021-01-19 Thread Peter Eisentraut
On 2021-01-19 01:17, Kyotaro Horiguchi wrote: Thank you for the information. The only reason for sharing the same variable for both file and directory is to avoid additional variable only for this reason. I'll post a new version where new GUC ssl_crl_path is added. Okay, I look forward to that

Re: popcount

2021-01-19 Thread Peter Eisentraut
On 2021-01-18 16:34, Tom Lane wrote: Peter Eisentraut writes: [ assorted nits ] At the level of bikeshedding ... I quite dislike using the name "popcount" for these functions. I'm aware that some C compilers provide primitives of that name, but I wouldn't expect a SQL programmer to know that

Re: Change default of checkpoint_completion_target

2021-01-19 Thread Peter Eisentraut
On 2021-01-13 23:10, Stephen Frost wrote: Yes, I agree, and am involved in that thread as well- currently waiting feedback from others about the proposed approach. I've tried to push that forward. I'm happy to update this patch once we've got agreement to move forward on that, to wit, adding to

Re: Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h

2021-01-19 Thread Julien Rouhaud
On Tue, Jan 19, 2021 at 9:53 AM Michael Paquier wrote: > > Hi all, > > The following functions in ilist.h and bufpage.h use some arguments > only in assertions: > - dlist_next_node > - dlist_prev_node > - slist_has_next > - slist_next_node > - PageValidateSpecialPointer > > Without PG_USED_FOR_ASS

Re: Is it worth accepting multiple CRLs?

2021-01-19 Thread Kyotaro Horiguchi
At Tue, 19 Jan 2021 09:17:34 +0900 (JST), Kyotaro Horiguchi wrote in > By the way we can do the same thing on CA file/dir, but I personally > think that the benefit from the specify-by-directory for CA files is > far less than CRL files. So I'm not going to do this for CA files for > now. This

Re: pg_stat_statements oddity with track = all

2021-01-19 Thread Masahiro Ikeda
Hi, Thanks for making the patch to add "toplevel" column in pg_stat_statements. This is a review comment. There hasn't been any discussion, at least that I've been able to find. So, +1 to change the status to "Ready for Committer". 1. submission/feature review =

Re: Single transaction in the tablesync worker?

2021-01-19 Thread Peter Smith
Hi Amit. PSA the v17 patch for the Tablesync Solution1. Main differences from v16: + Small refactor for DropSubscription to correct the "make check" deadlock + Added test case + Some comment wording Features: * The tablesync slot is now permanent instead of temporary. * The tablesync slo

Re: ResourceOwner refactoring

2021-01-19 Thread Heikki Linnakangas
On 18/01/2021 18:11, Robert Haas wrote: On Mon, Jan 18, 2021 at 11:11 AM Robert Haas wrote: On Mon, Jan 18, 2021 at 10:19 AM Heikki Linnakangas wrote: On 18/01/2021 16:34, Alvaro Herrera wrote: So according to your performance benchmark, we're willing to accept a 30% performance loss on an a

Make gaps array static

2021-01-19 Thread Mark G
Looking over the recently committed work for btree tuple deletion (d168b66) should this variable not be declared static as in the attached patch? Thanks, Mark. diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index faffbb1..bbdc1ce 100644 --- a/src/backend/access/he

Re: Wrong usage of RelationNeedsWAL

2021-01-19 Thread Noah Misch
On Tue, Jan 19, 2021 at 01:48:31PM +0900, Kyotaro Horiguchi wrote: > At Mon, 18 Jan 2021 17:30:22 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Sun, 17 Jan 2021 23:02:18 -0800, Noah Misch wrote in > > > On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > > > > I wrote the above ba

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

2021-01-19 Thread Greg Nancarrow
On Fri, Jan 8, 2021 at 8:25 PM vignesh C wrote: > > > Few includes are not required: > #include "executor/nodeGather.h" > +#include "executor/nodeModifyTable.h" > #include "executor/nodeSubplan.h" > #include "executor/tqueue.h" > #include "miscadmin.h" > @@ -60,6 +61,7 @@ ExecInitGather(Gather

Re: Improper use about DatumGetInt32

2021-01-19 Thread Peter Eisentraut
On 2021-01-14 09:00, Michael Paquier wrote: I don't have more comments by reading the code and my tests have passed after applying the patch on top of df10ac62. I would have also added some tests that check after blkno < 0 and > MaxBlockNumber in all the functions where it can be triggered as th

Re: configurable the threshold for warning due to run out of transaction ID

2021-01-19 Thread Laurenz Albe
On Tue, 2021-01-19 at 11:44 +0900, Masahiro Ikeda wrote: > PostgreSQL has the feature to warn about running out of transaction ID. > The following message is an example. > > 2021-01-19 10:59:27 JST [client backend] WARNING: database "postgres" must > be vacuumed within xxx transactions > 2021-01

Re: TOAST condition for column size

2021-01-19 Thread Amit Kapila
On Mon, Jan 18, 2021 at 7:53 PM torikoshia wrote: > > Hi, > I confirmed these sizes in my environment but AFAIU they would be > the same size in any environment. > > So, as a result of adjusting the alignment, 20~23 bytes seems to > fail. > > I wonder if it might be better not to adjust the align

Re: Add primary keys to system catalogs

2021-01-19 Thread Laurenz Albe
On Sun, 2021-01-17 at 17:07 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > [ v2-0001-Add-primary-keys-and-unique-constraints-to-system.patch ] > > [...] do we really want to prefer > using the OID indexes as the primary keys? In most cases there's some > other index that seems to me to be

Re: [patch] Help information for pg_dump

2021-01-19 Thread Dilip Kumar
On Tue, Jan 19, 2021 at 11:24 AM Bharath Rupireddy wrote: > > On Tue, Jan 19, 2021 at 9:07 AM Zhang, Jie wrote: > > > > Hi all > > > > After executing command [pg_dump -?], some help information is as follows. > > > > pg_dump -? > >

[PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
Fixes: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../../src/include -isysroot /Applications/Xcode.app/Contents/De

Re: Added schema level support for publication.

2021-01-19 Thread vignesh C
On Sat, Jan 9, 2021 at 8:08 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > > > As Amit pointed out earlier, the behaviour when schema dropped, I > think we should also consider when schema is altered, say altered to a > different name, maybe we should change that in the pub

Re: Printing backtrace of postgres processes

2021-01-19 Thread vignesh C
On Sun, Jan 17, 2021 at 10:26 PM vignesh C wrote: > > On Sat, Jan 16, 2021 at 11:10 PM Andres Freund wrote: > > > > Hi, > > > > On Sat, Jan 16, 2021, at 09:34, vignesh C wrote: > > > On Sat, Jan 16, 2021 at 1:40 AM Andres Freund wrote: > > > > > > > > On 2021-01-15 09:53:05 +0100, Peter Eisentra

Re: TOAST condition for column size

2021-01-19 Thread Dilip Kumar
On Mon, Jan 18, 2021 at 7:53 PM torikoshia wrote: > > Hi, > > When I created a table consisting of 400 VARCHAR columns and tried > to INSERT a record which rows were all the same size, there were > cases where I got an error due to exceeding the size limit per > row. > >=# -- create a table co

Re: [PATCH 1/1] Initial mach based shared memory support.

2021-01-19 Thread James Hilliard
On Mon, Jan 18, 2021 at 11:12 PM Tom Lane wrote: > > James Hilliard writes: > > from my understanding due to mach semantics a number of the sanity checks > > we are doing for sysv shmem are probably unnecessary when using mach > > API's due to the mach port task bindings(mach_task_self()) effecti

Re: pg_preadv() and pg_pwritev()

2021-01-19 Thread James Hilliard
On Thu, Jan 14, 2021 at 6:45 PM Tom Lane wrote: > > Sergey Shinderuk writes: > > On 15.01.2021 01:13, Tom Lane wrote: > >> Also, after re-reading [1] I am not at all excited about trying to > >> remove the -isysroot switches from our *FLAGS. What I propose to do > >> is keep that, but improve ou

Re: Add primary keys to system catalogs

2021-01-19 Thread Joel Jacobson
On Mon, Jan 18, 2021, at 18:23, Tom Lane wrote: > I realized that there's a stronger roadblock for > treating catalog interrelationships as SQL foreign keys. Namely, > that we always represent no-reference situations with a zero OID, > whereas it'd have to be NULL to look like a valid foreign-key

Some coverage for DROP OWNED BY with pg_default_acl

2021-01-19 Thread Michael Paquier
Hi all, I was looking again at the thread that reported a problem when using ALTER DEFAULT PRIVILEGES with duplicated object names: https://www.postgresql.org/message-id/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f...@hot.ee And while reviewing the thing, I have spotted that there is a specific path for pg_

Re: Add primary keys to system catalogs

2021-01-19 Thread Vik Fearing
On 1/19/21 11:46 AM, Laurenz Albe wrote: > On Sun, 2021-01-17 at 17:07 -0500, Tom Lane wrote: >> Peter Eisentraut writes: >>> [ v2-0001-Add-primary-keys-and-unique-constraints-to-system.patch ] >> >> [...] do we really want to prefer >> using the OID indexes as the primary keys? In most cases the

Re: Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h

2021-01-19 Thread Michael Paquier
On Tue, Jan 19, 2021 at 04:27:43PM +0800, Julien Rouhaud wrote: > Yeah I don't see any explicit mention on that on gcc manual. For the > record it also work as expected using clang, and the attached patch > remove all warnings when compiling plpgsql_check. FWIW, the part of the GCC docs that I lo

Re: popcount

2021-01-19 Thread Robert Haas
On Tue, Jan 19, 2021 at 3:06 AM Peter Eisentraut wrote: > On 2021-01-18 16:34, Tom Lane wrote: > > Peter Eisentraut writes: > >> [ assorted nits ] > > > > At the level of bikeshedding ... I quite dislike using the name "popcount" > > for these functions. I'm aware that some C compilers provide p

Re: TOAST condition for column size

2021-01-19 Thread Amit Kapila
On Tue, Jan 19, 2021 at 5:18 PM Dilip Kumar wrote: > > On Mon, Jan 18, 2021 at 7:53 PM torikoshia wrote: > > > > Hi, > > > > When I created a table consisting of 400 VARCHAR columns and tried > > to INSERT a record which rows were all the same size, there were > > cases where I got an error due t

Re: TOAST condition for column size

2021-01-19 Thread Dilip Kumar
On Tue, 19 Jan 2021 at 6:28 PM, Amit Kapila wrote: > On Tue, Jan 19, 2021 at 5:18 PM Dilip Kumar wrote: > > > > On Mon, Jan 18, 2021 at 7:53 PM torikoshia > wrote: > > > > > > Hi, > > > > > > When I created a table consisting of 400 VARCHAR columns and tried > > > to INSERT a record which rows

Use boolean array for nulls parameters

2021-01-19 Thread japin
Hi, When I review the [1], I find that the tuple's nulls array use char type. However there are many places use boolean array to repsent the nulls array, so I think we can replace the char type nulls array to boolean type. This change will break the SPI_xxx API, I'm not sure whether this chagnge

Re: [HACKERS] [PATCH] Generic type subscripting

2021-01-19 Thread Dmitry Dolgov
> On Thu, Jan 14, 2021 at 12:02:42PM -0500, Dian M Fay wrote: > > Other than that, since I've already posted the patch for returning an > > error option, it seems that the only thing left is to decide with which > > version to go. > > The trigger issue (which I did verify) makes the "no update" opt

Re: [PATCH] More docs on what to do and not do in extension code

2021-01-19 Thread Bharath Rupireddy
On Mon, Jan 18, 2021 at 1:27 PM Craig Ringer wrote: > Hi folks > > The attached patch expands the xfunc docs and bgworker docs a little, > providing a starting point for developers to learn how to do some common > tasks the Postgres Way. > > It mentions in brief these topics: > > * longjmp() bas

Re: ResourceOwner refactoring

2021-01-19 Thread Heikki Linnakangas
On 18/01/2021 16:34, Alvaro Herrera wrote: On 2021-Jan-18, Heikki Linnakangas wrote: +static ResourceOwnerFuncs jit_funcs = +{ + /* relcache references */ + .name = "LLVM JIT context", + .phase = RESOURCE_RELEASE_BEFORE_LOCKS, + .ReleaseResource = ResOwnerReleaseJitConte

Re: Use boolean array for nulls parameters

2021-01-19 Thread Hamid Akhtar
I personally don't see any benefit in this change. The focus shouldn't be on fixing things that aren't broken. Perhaps, there is more value in using bitmap data type to keep track of NULL values, which is typical storage vs performance debate, and IMHO, it's better to err on using slightly more sto

Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault

2021-01-19 Thread Tom Lane
David Geier writes: > On 18.01.21 23:42, Tom Lane wrote: >> OK, cool. I was afraid you'd argue that you really needed your CustomScan >> node to be transparent in such cases. We could imagine inventing an >> additional custom-scan-provider callback to embed the necessary knowledge, >> but I'd ra

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > Fixes: > gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 > -I../../../../src/include -isysroot >

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 8:27 AM Tom Lane wrote: > > James Hilliard writes: > > Fixes: > > gcc -Wall -Wmissing-prototypes -Wpointer-arith > > -Wdeclaration-after-statement -Werror=vla -Wendif-labels > > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv > > -Wno-unused-co

Re: TOAST condition for column size

2021-01-19 Thread Tom Lane
Dilip Kumar writes: > On Tue, 19 Jan 2021 at 6:28 PM, Amit Kapila wrote: >> Won't it be safe because we don't align individual attrs of type >> varchar where length is less than equal to 127? > Yeah right, I just missed that point. Yeah, the minimum on biggest_size has nothing to do with align

Re: Use boolean array for nulls parameters

2021-01-19 Thread Tom Lane
japin writes: > When I review the [1], I find that the tuple's nulls array use char type. > However there are many places use boolean array to repsent the nulls array, > so I think we can replace the char type nulls array to boolean type. This > change will break the SPI_xxx API, I'm not sure whe

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > On Tue, Jan 19, 2021 at 8:27 AM Tom Lane wrote: >> We already dealt with that by not selecting an SDK newer than the >> underlying OS (see 4823621db). > Tried that, doesn't work, not even sure how it could possibly fix this > issue at all, It worked for me and for Serge

Re: POC: postgres_fdw insert batching

2021-01-19 Thread Tomas Vondra
On 1/19/21 7:23 AM, Amit Langote wrote: On Tue, Jan 19, 2021 at 2:06 PM tsunakawa.ta...@fujitsu.com wrote: From: Amit Langote I apologize in advance for being maybe overly pedantic, but I noticed that, in ExecInitModifyTable(), you decided to place the call outside the loop that goes over

Re: Is Recovery actually paused?

2021-01-19 Thread Dilip Kumar
On Tue, Jan 19, 2021 at 8:34 AM Dilip Kumar wrote: > > On Tue, 19 Jan 2021 at 8:12 AM, Yugo NAGATA wrote: >> >> On Sun, 17 Jan 2021 11:33:52 +0530 >> Dilip Kumar wrote: >> >> > On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA wrote: >> > > >> > > On Wed, 13 Jan 2021 17:49:43 +0530 >> > > Dilip Kumar

Re: Stronger safeguard for archive recovery not to miss data

2021-01-19 Thread Laurenz Albe
On Mon, 2021-01-18 at 07:34 +, osumi.takami...@fujitsu.com wrote: > I noticed that this message should cover both archive recovery modes, > which means in recovery mode and standby mode. Then, I combined your > suggestion above with this point of view. Have a look at the updated patch. > I also

pg_class.reltype -> pg_type.oid missing for pg_toast table

2021-01-19 Thread Joel Jacobson
I have a memory of the catalog not being MVCC, so maybe this is normal and expected, but I wanted to report it in case it's not. When copying all tables in pg_catalog, to a separate schema with the purpose of testing if foreign keys could be added for all oid columns, I got an error for a toast t

Re: popcount

2021-01-19 Thread David Fetter
On Tue, Jan 19, 2021 at 07:58:12AM -0500, Robert Haas wrote: > On Tue, Jan 19, 2021 at 3:06 AM Peter Eisentraut > wrote: > > On 2021-01-18 16:34, Tom Lane wrote: > > > Peter Eisentraut writes: > > >> [ assorted nits ] > > > > > > At the level of bikeshedding ... I quite dislike using the name "po

Re: popcount

2021-01-19 Thread Isaac Morland
On Tue, 19 Jan 2021 at 11:38, David Fetter wrote: > You bring up an excellent point, which is that our builtin functions > could use a lot more documentation directly to hand than they now > have. For example, there's a lot of needless ambiguity created by > function comments which leave it up i

Re: pg_class.reltype -> pg_type.oid missing for pg_toast table

2021-01-19 Thread Tom Lane
"Joel Jacobson" writes: > When copying all tables in pg_catalog, to a separate schema with the purpose > of testing if foreign keys could be added for all oid columns, I got an error > for a toast table: > ERROR: insert or update on table "pg_class" violates foreign key constraint > "pg_class_r

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

2021-01-19 Thread Julien Rouhaud
On Fri, Jan 8, 2021 at 1:07 AM Julien Rouhaud wrote: > > v15 that fixes recent conflicts. Rebase only, thanks to the cfbot! V16 attached. From a0388c53d9755cfd706513f7f02a08b31a48aacb Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 18 Mar 2019 18:55:50 +0100 Subject: [PATCH v16 2/3] Ex

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 8:57 AM Tom Lane wrote: > > James Hilliard writes: > > On Tue, Jan 19, 2021 at 8:27 AM Tom Lane wrote: > >> We already dealt with that by not selecting an SDK newer than the > >> underlying OS (see 4823621db). > > > Tried that, doesn't work, not even sure how it could pos

Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault

2021-01-19 Thread Tom Lane
I wrote: > Now that I look at this, I strongly wonder whether whoever added > MergeAppend support here understood what they were doing. That > looks broken, because child nodes will typically be positioned on > tuples, whether or not the current top-level output came from them. > So I fear we coul

[PATCH v2 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
Fixes: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../../src/include -isysroot /Applications/Xcode.app/Contents/De

Re: psql \df choose functions by their arguments

2021-01-19 Thread Greg Sabino Mullane
Ha ha ha, my bad, I am not sure why I left those out. Here is a new patch with int2, int4, and int8. Thanks for the email. Cheers, Greg v6-psql-df-pick-function-by-type.patch Description: Binary data

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > On Tue, Jan 19, 2021 at 8:57 AM Tom Lane wrote: >> It worked for me and for Sergey, so we need to figure out what's different >> about your setup. What do you get from "xcrun --show-sdk-path" and >> "xcrun --sdk macosx --show-sdk-path"? What have you got under >> /Libra

Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > Fixes: > fd.c:3661:10: warning: 'pwritev' is only available on macOS 11.0 or newer > [-Wunguarded-availability-new] It's still missing preadv, and it still has nonzero chance of breaking successful detection of pwritev on platforms other than yours, and it's still really

Re: Printing backtrace of postgres processes

2021-01-19 Thread Robert Haas
On Sat, Jan 16, 2021 at 3:21 PM Tom Lane wrote: > I'd argue that backtraces for those processes aren't really essential, > and indeed that trying to make the syslogger report its own backtrace > is damn dangerous. I agree. Ideally I'd like to be able to use the same mechanism everywhere and inclu

Re: New Table Access Methods for Multi and Single Inserts

2021-01-19 Thread Jeff Davis
On Mon, 2021-01-18 at 08:58 +0100, Luc Vlaming wrote: > You mean how it could because of that the table modification API > uses > the table_tuple_insert_speculative ? Just wondering if you think if > it > generally cannot work or would like to see that path / more paths > integrated in to the pa

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 10:17 AM Tom Lane wrote: > > James Hilliard writes: > > On Tue, Jan 19, 2021 at 8:57 AM Tom Lane wrote: > >> It worked for me and for Sergey, so we need to figure out what's different > >> about your setup. What do you get from "xcrun --show-sdk-path" and > >> "xcrun --s

Re: Printing backtrace of postgres processes

2021-01-19 Thread Tom Lane
Robert Haas writes: > On Sat, Jan 16, 2021 at 3:21 PM Tom Lane wrote: >> (Personally, I think this whole patch fails the safety-vs-usefulness >> tradeoff, but I expect I'll get shouted down.) > What do you see as the main safety risks here? The thing that is scaring me the most is the "broadcas

Re: simplifying foreign key/RI checks

2021-01-19 Thread Corey Huinker
> > I decided not to deviate from pk_ terminology so that the new code > doesn't look too different from the other code in the file. Although, > I guess we can at least call the main function > ri_ReferencedKeyExists() instead of ri_PrimaryKeyExists(), so I've > changed that. > I agree with leavi

Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 10:29 AM Tom Lane wrote: > > James Hilliard writes: > > Fixes: > > fd.c:3661:10: warning: 'pwritev' is only available on macOS 11.0 or newer > > [-Wunguarded-availability-new] > > It's still missing preadv, and it still has nonzero chance of breaking > successful detectio

Re: Add primary keys to system catalogs

2021-01-19 Thread Mark Rofail
Dear Joel, I would love to start working on this again, I tried to revive the patch again in 2019, however, I faced the same problems as last time (detailed in the thread) and I didn't get the support I needed to continue with this patch. Are you willing to help rebase and finally publish this pa

Re: Rethinking plpgsql's assignment implementation

2021-01-19 Thread Pavel Stehule
Hi Now, I am testing subscribing on the jsonb feature, and I found one issue, that is not supported by parser. When the target is scalar, then all is ok. But we can have a plpgsql array of jsonb values. postgres=# do $$ declare j jsonb[]; begin j[1] = '{"b":"Ahoj"}'; raise notice '%', j; r

Re: [HACKERS] [PATCH] Generic type subscripting

2021-01-19 Thread Pavel Stehule
Hi I found minor issues. Doc - missing tag and three whitespaces issues see attached patch Following sentence is hard to read due long nested example If the + path contradicts structure of modified jsonb for any individual + value (e.g. path val['a']['b']['c'] assumes keys + 'a' and 'b'

Re: Add docs stub for recovery.conf

2021-01-19 Thread Stephen Frost
Greetings, * Craig Ringer (craig.rin...@enterprisedb.com) wrote: > On Thu, 14 Jan 2021 at 03:44, Stephen Frost wrote: > > Alright, how does this look? The new entries are all under the > > 'obsolete' section to keep it out of the main line, but should work to > > 'fix' the links that currently 4

Re: Add docs stub for recovery.conf

2021-01-19 Thread Stephen Frost
Greetings, * Stephen Frost (sfr...@snowman.net) wrote: > * Craig Ringer (craig.rin...@enterprisedb.com) wrote: > > On Thu, 14 Jan 2021 at 03:44, Stephen Frost wrote: > > > Alright, how does this look? The new entries are all under the > > > 'obsolete' section to keep it out of the main line, but

Re: [HACKERS] Custom compression methods

2021-01-19 Thread Justin Pryzby
Thanks for updating the patch. On Mon, Jan 4, 2021 at 6:52 AM Justin Pryzby wrote: > The most recent patch doesn't compile --without-lz4: On Tue, Jan 05, 2021 at 11:19:33AM +0530, Dilip Kumar wrote: > On Mon, Jan 4, 2021 at 10:08 PM Justin Pryzby wrote: > > I think I first saw it on cfbot and I

Re: Change default of checkpoint_completion_target

2021-01-19 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote: > On 2021-01-13 23:10, Stephen Frost wrote: > >>Yes, I agree, and am involved in that thread as well- currently waiting > >>feedback from others about the proposed approach. > >I've tried to push that forward. I'm happy to u

Re: Change default of checkpoint_completion_target

2021-01-19 Thread Tom Lane
Stephen Frost writes: > Any further comments or thoughts on this one? This: +total time between checkpoints. The default is 0.9, which spreads the +checkpoint across the entire checkpoint timeout period of time, is confusing because 0.9 is obviously not 1.0; people will wonder w

Re: Change default of checkpoint_completion_target

2021-01-19 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Any further comments or thoughts on this one? > > This: > > +total time between checkpoints. The default is 0.9, which spreads the > +checkpoint across the entire checkpoint timeout period of time, >

Re: Change default of checkpoint_completion_target

2021-01-19 Thread Tom Lane
Stephen Frost writes: > In passing, I noticed that we have a lot of documentation like: > This parameter can only be set in the postgresql.conf file or on the > server command line. > ... which hasn't been true since the introduction of ALTER SYSTEM. Well, it's still true if you understand "the

Re: Add primary keys to system catalogs

2021-01-19 Thread Tom Lane
Laurenz Albe writes: > On Sun, 2021-01-17 at 17:07 -0500, Tom Lane wrote: >> [...] do we really want to prefer >> using the OID indexes as the primary keys? In most cases there's some >> other index that seems to me to be what a user would think of as the >> pkey, for example pg_class_relname_nsp

Re: Support for NSS as a libpq TLS backend

2021-01-19 Thread Daniel Gustafsson
> On 4 Dec 2020, at 01:57, Jacob Champion wrote: > > On Nov 17, 2020, at 7:00 AM, Daniel Gustafsson wrote: >> >> Nice, thanks for the fix! I've incorporated your patch into the attached v20 >> which also fixes client side error reporting to be more readable. > > I was testing handshake failur

Re: WIP: BRIN multi-range indexes

2021-01-19 Thread John Naylor
On Tue, Jan 12, 2021 at 1:42 PM Tomas Vondra wrote: > I suspect it'd due to minmax having to decide which "ranges" to merge, > which requires repeated sorting, etc. I certainly don't dare to claim > the current algorithm is perfect. I wouldn't have expected such big > difference, though - so defin

Re: [Patch] ALTER SYSTEM READ ONLY

2021-01-19 Thread Robert Haas
On Thu, Jan 14, 2021 at 6:29 AM Amul Sul wrote: > To move development, testing, and the review forward, I have commented out the > code acquiring CheckpointLock from CreateCheckPoint() in the 0003 patch and > added the changes for the checkpointer so that system read-write state change > request c

Re: Some coverage for DROP OWNED BY with pg_default_acl

2021-01-19 Thread Alvaro Herrera
On 2021-Jan-19, Michael Paquier wrote: > And while reviewing the thing, I have spotted that there is a specific > path for pg_default_acl in RemoveRoleFromObjectACL() that has zero > coverage. This can be triggered with DROP OWNED BY, and it is > actually safe to run as long as this is done in a

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > On Tue, Jan 19, 2021 at 10:17 AM Tom Lane wrote: >> Ah, got it. So "xcrun --show-sdk-path" tells us the right thing (that >> is, it *does* give us a symlink to a 10.15 SDK) but by refusing to >> believe we've got the right thing, we end up picking MacOSX11.1.sdk. >> Drat

compression libraries and CF bot

2021-01-19 Thread Justin Pryzby
Do you know if the old travis build environment had liblz4 installed ? I'm asking regarding Dilip's patch, which was getting to "check world" 2 weeks ago but now failing to even compile, not apparently due to any change in the patch. Also, are the historic logs available somewhere ? http://cfbot.

Re: Printing backtrace of postgres processes

2021-01-19 Thread Robert Haas
On Tue, Jan 19, 2021 at 12:50 PM Tom Lane wrote: > The thing that is scaring me the most is the "broadcast" aspect. > For starters, I think that that is going to be useless in the > field because of the likelihood that different backends' stack > traces will get interleaved in whatever log file th

Re: {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2021-01-19 Thread Matthias van de Meent
On Mon, 18 Jan 2021, 21:25 Álvaro Herrera, wrote: > > On 2021-Jan-18, Matthias van de Meent wrote: > > > Example: > > > > 1.) RI starts > > 2.) PHASE 2: filling the index: > > 2.1.) scanning the heap (live tuple is cached) > > < tuple is deleted > > < last transaction other than RI commits, only s

Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread Tom Lane
James Hilliard writes: > I also don't think this is a weak symbol. > From the header file it is not have __attribute__((weak_import)): > ssize_t pwritev(int, const struct iovec *, int, off_t) > __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), > watchos(7.0), tvos(14.0)); See th

Re: Add primary keys to system catalogs

2021-01-19 Thread Joel Jacobson
On Tue, Jan 19, 2021, at 18:25, Mark Rofail wrote: >Dear Joel, > >I would love to start working on this again, I tried to revive the patch again >in 2019, however, I faced the same problems as >last time (detailed in the >thread) and I didn't get the support I needed to continue with this patch.

Re: create table like: ACCESS METHOD

2021-01-19 Thread Justin Pryzby
On Wed, Dec 30, 2020 at 12:33:56PM +, Simon Riggs wrote: > There are no tests for the new functionality, please could you add some? Did you look at the most recent patch? +CREATE ACCESS METHOD heapdup TYPE TABLE HANDLER heap_tableam_handler; +CREATE TABLE likeam() USING heapdup; +CREATE TABLE

cfbot building docs - serving results

2021-01-19 Thread Erik Rijkers
Hi Thomas, I am wondering if the cfbot at the moment is building the docs (html+pdf), for the patches that it tests. I suppose that it does? If so, what happens with the resulting (doc)files? To /dev/null? They are not available as far as I can see. Would it be feasible to make them avai

Re: Printing backtrace of postgres processes

2021-01-19 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 19, 2021 at 12:50 PM Tom Lane wrote: >> I think it's got security hazards as well. If we restricted the >> feature to cause a trace of only one process at a time, and required >> that process to be logged in as the same database user as the >> requestor (or at l

Re: compression libraries and CF bot

2021-01-19 Thread Thomas Munro
On Wed, Jan 20, 2021 at 9:56 AM Justin Pryzby wrote: > Do you know if the old travis build environment had liblz4 installed ? It sounds like it. > I'm asking regarding Dilip's patch, which was getting to "check world" 2 weeks > ago but now failing to even compile, not apparently due to any chang

Re: compression libraries and CF bot

2021-01-19 Thread Tom Lane
Thomas Munro writes: > On Wed, Jan 20, 2021 at 9:56 AM Justin Pryzby wrote: >> Also, what's the process for having new libraries installed in the CI >> environment ? > I have added lz4 to the FreeBSD and Ubuntu build tasks, so we'll see > if that helps at the next periodic build or when a new pa

Re: cfbot building docs - serving results

2021-01-19 Thread Thomas Munro
On Wed, Jan 20, 2021 at 10:22 AM Erik Rijkers wrote: > I am wondering if the cfbot at the moment is building the docs > (html+pdf), for the patches that it tests. I suppose that it does? If > so, what happens with the resulting (doc)files? To /dev/null? They are > not available as far as I can

Re: Odd, intermittent failure in contrib/pageinspect

2021-01-19 Thread Tom Lane
Michael Paquier writes: > On Mon, Jan 18, 2021 at 05:47:40PM -0500, Tom Lane wrote: >> So, do we have any other tests that are invoking a manual vacuum >> and assuming it won't skip any pages? By this theory, they'd >> all be failures waiting to happen. > check_heap.sql and heap_surgery.sql have

Re: Add primary keys to system catalogs

2021-01-19 Thread Mark Rofail
I'll post tomorrow the latest rebased patch with a summary of the issues. Let's continue this in the foreign key array thread, as to not clutter this thread. Regards, Mark Rofail. On Tue, Jan 19, 2021, 11:00 PM Joel Jacobson wrote: > On Tue, Jan 19, 2021, at 18:25, Mark Rofail wrote: > >Dear Jo

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 1:54 PM Tom Lane wrote: > > James Hilliard writes: > > On Tue, Jan 19, 2021 at 10:17 AM Tom Lane wrote: > >> Ah, got it. So "xcrun --show-sdk-path" tells us the right thing (that > >> is, it *does* give us a symlink to a 10.15 SDK) but by refusing to > >> believe we've g

Re: New IndexAM API controlling index vacuum strategies

2021-01-19 Thread Peter Geoghegan
On Sun, Jan 17, 2021 at 9:18 PM Masahiko Sawada wrote: > After more thought, I think that ambulkdelete needs to be able to > refer the answer to amvacuumstrategy. That way, the index can skip > bulk-deletion when lazy vacuum doesn't vacuum heap and it also doesn’t > want to do that. Makes sense.

Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

2021-01-19 Thread James Hilliard
On Tue, Jan 19, 2021 at 3:47 PM James Hilliard wrote: > > On Tue, Jan 19, 2021 at 1:54 PM Tom Lane wrote: > > > > James Hilliard writes: > > > On Tue, Jan 19, 2021 at 10:17 AM Tom Lane wrote: > > >> Ah, got it. So "xcrun --show-sdk-path" tells us the right thing (that > > >> is, it *does* give

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

2021-01-19 Thread Tatsuro Yamada
Hi Julien, Rebase only, thanks to the cfbot! V16 attached. I tested the v16 patch on a0efda88a by using "make installcheck-parallel", and my result is the following. Attached file is regression.diffs. 1 of 202 tests failed. The differences

Re: WIP: BRIN multi-range indexes

2021-01-19 Thread Tomas Vondra
On 1/19/21 9:44 PM, John Naylor wrote: On Tue, Jan 12, 2021 at 1:42 PM Tomas Vondra mailto:tomas.von...@enterprisedb.com>> wrote: > I suspect it'd due to minmax having to decide which "ranges" to merge, > which requires repeated sorting, etc. I certainly don't dare to claim > the current alg

Re: Add table access method as an option to pgbench

2021-01-19 Thread David Zhang
On 2021-01-15 1:22 p.m., Andres Freund wrote: Hi, On 2020-11-25 12:41:25 +0900, Michael Paquier wrote: On Tue, Nov 24, 2020 at 03:32:38PM -0800, David Zhang wrote: But, providing another option for the end user may not be a bad idea, and it might make the tests easier at some points. My firs

Re: Support for NSS as a libpq TLS backend

2021-01-19 Thread Jacob Champion
On Tue, 2021-01-19 at 21:21 +0100, Daniel Gustafsson wrote: > There is something iffy with these certs (the test fails > on mismatching ciphers and/or signature algorithms) that I haven't been able > to > pin down, but to get more eyes on this I'm posting the patch with the test > enabled. Removi

Re: New IndexAM API controlling index vacuum strategies

2021-01-19 Thread Peter Geoghegan
On Tue, Jan 19, 2021 at 2:57 PM Peter Geoghegan wrote: > * Maybe it would be better if you just changed the definition such > that "MAXALIGN(SizeofHeapTupleHeader)" became "MAXIMUM_ALIGNOF", with > no other changes? (Some variant of this suggestion might be better, > not sure.) > > For some reason

Re: New IndexAM API controlling index vacuum strategies

2021-01-19 Thread Peter Geoghegan
On Tue, Jan 19, 2021 at 4:45 PM Peter Geoghegan wrote: > BTW, I think that increasing MaxHeapTuplesPerPage will make it > necessary to consider tidbitmap.c. Comments at the top of that file > say that it is assumed that MaxHeapTuplesPerPage is about 256. So > there is a risk of introducing perform

RE: Add Nullif case for eval_const_expressions_mutator

2021-01-19 Thread Hou, Zhijie
Hi Thanks for the review. > It's a bit unfortunate now that between OpExpr, DistinctExpr, NullIfExpr, > and to a lesser extent ScalarArrayOpExpr we will now have several different > implementations of nearly the same thing, without any explanation why one > approach was chosen here and another th

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

2021-01-19 Thread tsunakawa.ta...@fujitsu.com
From: Tang, Haiying > Execute EXPLAIN on Patched: > Insert on public.test_part (cost=0.00..15.00 rows=0 width=0) (actual > time=44.139..44.140 rows=0 loops=1) >Buffers: shared hit=1005 read=1000 dirtied=3000 written=2000 >-> Seq Scan on public.test_data1 (cost=0.00..15.00 rows=1000 > w

  1   2   >