Re: Key management with tests

2020-12-31 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 11:50:47PM -0500, Bruce Momjian wrote: > I have completed the key management patch with tests created by Stephen > Frost. Original patch by Masahiko Sawada. It requires the hex > reorganization patch first. The key patch is now 2.1MB because of the > tests, so attaching

Safety/validity of resetting permissions by updating system tables

2020-12-31 Thread Isaac Morland
I have long maintained permissions in my databases by having a script which assigns all the permissions. I have tended to start with invocations something like this: REVOKE ALL ON ALL TABLES IN SCHEMA ... FROM ...; ... where the appropriate schemas and roles are listed. This is intended to

Key management with tests

2020-12-31 Thread Bruce Momjian
I have completed the key management patch with tests created by Stephen Frost. Original patch by Masahiko Sawada. It requires the hex reorganization patch first. The key patch is now 2.1MB because of the tests, so attaching it here seems unwise:

RE: Disable WAL logging to speed up data loading

2020-12-31 Thread tsunakawa.ta...@fujitsu.com
From: Simon Riggs > Agreed, it is a footgun. -1 to commit the patch as-is. > > The patch to avoid WAL is simple but it is dangerous for both the user > and the PostgreSQL project. > > In my experience, people will use this option and when it crashes and > they lose their data, they will claim

RE: Disable WAL logging to speed up data loading

2020-12-31 Thread tsunakawa.ta...@fujitsu.com
From: Michael Paquier > Something that has not been mentioned on this thread is that if you could also > put pg_wal/ on a RAM disk. That's similarly unsafe, of course, but it does > not > require any extra upstream patching, and that should be really fast for the > case > of this thread. If

RE: Global snapshots

2020-12-31 Thread tsunakawa.ta...@fujitsu.com
Hello, Fujii-san and I discussed how to move the scale-out development forward. We are both worried that Clock-SI is (highly?) likely to infringe the said Microsoft's patent. So we agreed we are going to investigate the Clock-SI and the patent, and if we have to conclude that we cannot

Re: Tid scan improvements

2020-12-31 Thread David Fetter
On Sun, Dec 01, 2019 at 11:34:16AM +0900, Michael Paquier wrote: > On Thu, Sep 05, 2019 at 01:06:56PM +1200, Edmund Horner wrote: > > So, I think we need to either get some help from someone familiar with > > heapam.c, or maybe shelve the patch. It has been work in progress for > > over a year

[PATCH] Simple progress reporting for COPY command

2020-12-31 Thread Josef Šimánek
Hello, finally I had some time to revisit patch and all comments from https://www.postgresql.org/message-id/CAFp7QwqMGEi4OyyaLEK9DR0%2BE%2BoK3UtA4bEjDVCa4bNkwUY2PQ%40mail.gmail.com and I have prepared simple version of COPY command progress reporting. To keep the patch small as possible, I have

Re: Table AM modifications to accept column projection lists

2020-12-31 Thread Zhihong Yu
Hi, Soumyadeep: Happy New Year. +typedef struct neededColumnContext +{ + Bitmapset **mask; + int n; + * n specifies the number of allowed entries in mask: we use + * it for bounds-checking in the walker above. I think the code would be easier to read if the above comment is moved or copied

Re: Deleting older versions in unique indexes to avoid page splits

2020-12-31 Thread Peter Geoghegan
On Thu, Dec 31, 2020 at 11:01 AM Zhihong Yu wrote: > Happy New Year. Happy New Year. > For v12-0001-Pass-down-logically-unchanged-index-hint.patch > > + if (hasexpression) > + return false; > + > + return true; > > The above can be written as return !hasexpression; > The negation is

Re: crash recovery vs partially written WAL

2020-12-31 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 02:27:44PM -0500, Stephen Frost wrote: > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > > > A question from a colleague made me wonder if there are scenarios where > > > two subsequent crashes

Re: Table AM modifications to accept column projection lists

2020-12-31 Thread Soumyadeep Chakraborty
Hey Masahiko, I added it to the Jan CF (https://commitfest.postgresql.org/31/2922/). PFA a rebased version against latest head. Regards, Soumyadeep From d033a0e3bceaf6e3f861e08363d4f170bc2a9fea Mon Sep 17 00:00:00 2001 From: Jacob Champion Date: Mon, 9 Nov 2020 16:36:10 -0800 Subject: [PATCH

Re: new heapcheck contrib module

2020-12-31 Thread Thomas Munro
On Tue, Oct 27, 2020 at 5:12 AM Mark Dilger wrote: > The v20 patches 0002, 0003, and 0005 still apply cleanly, but 0004 required a > rebase. (0001 was already committed last week.) > > Here is a rebased set of 4 patches, numbered 0002..0005 to be consistent with > the previous naming. There

Re: crash recovery vs partially written WAL

2020-12-31 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > > A question from a colleague made me wonder if there are scenarios where > > two subsequent crashes could lead to wrong WAL to be applied. > > > > Imagine the following

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-31 Thread Pavel Stehule
čt 31. 12. 2020 v 15:27 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Wed, Dec 30, 2020 at 09:01:37PM +0100, Dmitry Dolgov wrote: > > > make check fails > > > > Yeah, apparently I forgot to enable asserts back after the last > > benchmarking discussion, and missed some of those.

Re: Deleting older versions in unique indexes to avoid page splits

2020-12-31 Thread Victor Yegorov
чт, 31 дек. 2020 г. в 20:01, Zhihong Yu : > For v12-0001-Pass-down-logically-unchanged-index-hint.patch > > + if (hasexpression) > + return false; > + > + return true; > > The above can be written as return !hasexpression; > To be honest, I prefer the way Peter has it in his patch.

Re: crash recovery vs partially written WAL

2020-12-31 Thread Bruce Momjian
On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > Hi, > > A question from a colleague made me wonder if there are scenarios where > two subsequent crashes could lead to wrong WAL to be applied. > > Imagine the following scenario > [ xlog page 1 ][ xlog page 2 ][ xlog page 3 ][

Re: pgbench: option delaying queries till connections establishment?

2020-12-31 Thread Thomas Munro
On Sun, Nov 15, 2020 at 4:53 AM Fabien COELHO wrote: > In the attached version, I just comment out the call and add an > explanation about why it is commented out. If pg overall version > requirements are changed on windows, then it could be reinstated. It looks like macOS doesn't have pthread

Re: Deleting older versions in unique indexes to avoid page splits

2020-12-31 Thread Zhihong Yu
Hi, Peter: Happy New Year. For v12-0001-Pass-down-logically-unchanged-index-hint.patch + if (hasexpression) + return false; + + return true; The above can be written as return !hasexpression; The negation is due to the return value from index_unchanged_by_update_var_walker() is

Re: Proposed patch for key management

2020-12-31 Thread Joshua Drake
> > > > >I will say that if the community feels external-only should be the only > > >option, I will stop working on this feature because I feel the result > > >would be too fragile to be reliable, > > > > I'm do not see why it would be the case. I'm just arguing to have key > > management in a

Re: Proposed patch for key management

2020-12-31 Thread Joshua Drake
On Wed, Dec 30, 2020 at 3:47 PM Bruce Momjian wrote: > > I will say that if the community feels external-only should be the only > option, I will stop working on this feature because I feel the result > would be too fragile to be reliable, and I would not want to be > associated with it. > > I

Re: Buildfarm's cross-version-upgrade tests

2020-12-31 Thread Andrew Dunstan
On 12/30/20 4:28 PM, Andrew Dunstan wrote: > > I'll try to fix the test for the latest breakage shortly. See I'm going to get a new release out before next Thursday come hell or high water. cheers

Re: Proposed patch for key management

2020-12-31 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 12:05:53PM -0500, Stephen Frost wrote: > > Let's unpack this logic, since I know others, like Alastair Turner (CC > > added), had similar concerns. Frankly, I feel this feature has limited > > security usefulness, so if we don't feel it has sufficient value, let's > > mark

Re: Proposed patch for key management

2020-12-31 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Thu, Dec 31, 2020 at 11:11:11AM +0100, Fabien COELHO wrote: > > > I am not sure what else I can add to this discussion. Having something > > > that is completely external might be a nice option, but I don't think it > > > is the common

Re: Proposed patch for key management

2020-12-31 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 11:11:11AM +0100, Fabien COELHO wrote: > > I am not sure what else I can add to this discussion. Having something > > that is completely external might be a nice option, but I don't think it > > is the common use-case, and will make the most common use cases more > >

Re: [Doc Patch] Clarify that CREATEROLE roles can GRANT default roles

2020-12-31 Thread Michael Banck
Hi, Am Montag, den 28.12.2020, 20:41 +0900 schrieb Masahiko Sawada: > On Sat, Nov 28, 2020 at 7:50 AM Michael Banck > wrote: > > https://www.postgresql.org/docs/current/default-roles.html mentions the > > "Administrator" several times, but does not specify it further. I > > understand that it

Re: Proposed patch for key managment

2020-12-31 Thread Stephen Frost
Greetings, * Fabien COELHO (coe...@cri.ensmp.fr) wrote: > >>The implementations should not have to be in any particular language: Shell, > >>Perl, Python, C should be possible. > > > >I disagree that it makes any sense to pass actual encryption out to a > >shell script. > > Yes, sure. I'm

Re: Proposed patch for key management

2020-12-31 Thread Stephen Frost
Greetings, * Fabien COELHO (coe...@cri.ensmp.fr) wrote: > >>The API should NOT make assumptions about the cryptographic design, what > >>depends about what, where things are stored… ISTM that Pg should only care > >>about naming keys, holding them when created/retrieved (but not create > >>them),

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-31 Thread Dmitry Dolgov
> On Wed, Dec 30, 2020 at 09:01:37PM +0100, Dmitry Dolgov wrote: > > make check fails > > Yeah, apparently I forgot to enable asserts back after the last > benchmarking discussion, and missed some of those. Will fix. > > > 2. The index position was ignored. > > > > postgres=# update foo set

Re: Zedstore - compressed in-core columnar storage

2020-12-31 Thread Simon Riggs
On Wed, 18 Nov 2020 at 00:31, Jacob Champion wrote: > > So that's in need of resolution. I'd expect gin and gist to be pretty > flaky until we fix that. Jacob and Soumyadeep, Thanks for submitting this. I think a fix is still outstanding? and the patch fails to apply on HEAD in two places.

Re: Proposed patch for key managment

2020-12-31 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Dec 30, 2020 at 06:49:34PM -0500, Stephen Frost wrote: > > The API to fetch the KEK doesn't care at all about where it's stored or > > how it's derived or anything like that. There's a relatively small > > change which could be made

Re: Deleting older versions in unique indexes to avoid page splits

2020-12-31 Thread Victor Yegorov
чт, 31 дек. 2020 г. в 03:55, Peter Geoghegan : > Attached is v12, which fixed bitrot against the master branch. This > version has significant comment and documentation revisions. It is > functionally equivalent to v11, though. > > I intend to commit the patch in the next couple of weeks. While

[PATCH] New default role allowing to change per-role/database settings

2020-12-31 Thread Michael Banck
Hi, in today's world, some DBAs have no superuser rights, but we can delegate them additional powers like CREATEDB or the pg_monitor default role etc. Usually, the DBA can also view the database logs, either via shell access or some web interface. One thing that I personally find lacking is that

Re: Dependency isn't created between extension and schema

2020-12-31 Thread Masahiko Sawada
On Tue, Dec 22, 2020 at 1:03 AM Tom Lane wrote: > > James Coleman writes: > > On Mon, Dec 21, 2020 at 2:59 AM Michael Paquier wrote: > >> On Mon, Dec 21, 2020 at 04:02:29PM +0900, Masahiko Sawada wrote: > >>> Is it a bug? Since the created schema obviously depends on the > >>> extension when we

Re: Proposed patch for key managment

2020-12-31 Thread Fabien COELHO
Hello, The API to fetch the KEK doesn't care at all about where it's stored or how it's derived or anything like that. There's a relatively small change which could be made to have PG request all of the keys that it'll need on startup, if we want to go there as has been suggested elsewhere,

Re: Proposed patch for key managment

2020-12-31 Thread Fabien COELHO
Hello Stephen, The implementations should not have to be in any particular language: Shell, Perl, Python, C should be possible. I disagree that it makes any sense to pass actual encryption out to a shell script. Yes, sure. I'm talking about key management. For actual crypto functions,

Re: Asynchronous Append on postgres_fdw nodes.

2020-12-31 Thread Etsuro Fujita
On Sat, Dec 19, 2020 at 5:55 PM Etsuro Fujita wrote: > On Mon, Dec 14, 2020 at 4:01 PM Kyotaro Horiguchi > wrote: > > At Sat, 12 Dec 2020 18:25:57 +0900, Etsuro Fujita > > wrote in > > > On Fri, Nov 20, 2020 at 3:51 PM Kyotaro Horiguchi > > > wrote: > > > > The reason for > > > > the early

Re: Proposed patch for key management

2020-12-31 Thread Fabien COELHO
Hello Bruce, The API should NOT make assumptions about the cryptographic design, what depends about what, where things are stored… ISTM that Pg should only care about naming keys, holding them when created/retrieved (but not create them), basically interacting with the key manager, passing the