Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Antonin Houska
Moon, Insung wrote: > Hello. > > On Tue, Oct 8, 2019 at 8:52 PM Antonin Houska wrote: > > > > Robert Haas wrote: > > > > > On Mon, Oct 7, 2019 at 3:01 PM Antonin Houska wrote: > > > > However the design doesn't seem to be stable enough at the > > > > moment for coding to make sense. > > > >

Re: WIP: raise error when submitting invalid ALTER SYSTEM command

2019-10-08 Thread Tom Lane
"Jordan Deitch" writes: > ALTER SYSTEM currently does not raise error upon invalid entry. You mean on invalid combinations of entries. Take for example: > alter system set superuser_reserved_connections = 10; > ALTER SYSTEM > alter system set max_connections = 5; > ALTER SYSTEM > The database

Re: maintenance_work_mem used by Vacuum

2019-10-08 Thread Masahiko Sawada
On Tue, Oct 8, 2019 at 2:45 PM Amit Kapila wrote: > > On Tue, Oct 8, 2019 at 1:48 AM Peter Geoghegan wrote: > > > > On Mon, Oct 7, 2019 at 12:28 PM Robert Haas wrote: > > > I would say that sucks, because it makes it harder to set > > > maintenance_work_mem correctly. Not sure how hard it

WIP: raise error when submitting invalid ALTER SYSTEM command

2019-10-08 Thread Jordan Deitch
Hi all, ALTER SYSTEM currently does not raise error upon invalid entry. Take for example: alter system set superuser_reserved_connections = 10; > ALTER SYSTEM alter system set max_connections = 5; > ALTER SYSTEM The database will now fail to restart without manual intervention by way of

Re: format of pg_upgrade loadable_libraries warning

2019-10-08 Thread Bruce Momjian
On Mon, Oct 7, 2019 at 01:47:57PM -0400, Bruce Momjian wrote: > On Fri, Oct 4, 2019 at 11:55:21PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > On Fri, Oct 4, 2019 at 05:40:08PM -0500, Justin Pryzby wrote: > > >> I would argue to include in 12.1, since 12 is what most everyone will >

Re: [HACKERS] Block level parallel vacuum

2019-10-08 Thread Masahiko Sawada
On Fri, Oct 4, 2019 at 8:55 PM vignesh C wrote: > > On Fri, Oct 4, 2019 at 4:18 PM Amit Kapila wrote: > > > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada > > wrote: > >> > >> On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila > >> wrote: > >> > > One comment: Thank you for reviewing this patch.

Re: [HACKERS] Block level parallel vacuum

2019-10-08 Thread Masahiko Sawada
On Sat, Oct 5, 2019 at 4:36 PM Dilip Kumar wrote: > > Few more comments > > > 1. > +static int > +compute_parallel_workers(Relation onerel, int nrequested, int nindexes) > +{ > + int parallel_workers; > + bool leaderparticipates = true; > > Seems like this function is

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Moon, Insung
Hello. On Tue, Oct 8, 2019 at 8:52 PM Antonin Houska wrote: > > Robert Haas wrote: > > > On Mon, Oct 7, 2019 at 3:01 PM Antonin Houska wrote: > > > However the design doesn't seem to be stable enough at the > > > moment for coding to make sense. > > > > Well, I think the question is whether

Re: pgsql: Remove pqsignal() from libpq's official exports list.

2019-10-08 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane 2018-09-28 >> Remove pqsignal() from libpq's official exports list. > This is starting to hurt in several places: > 04 11:41 mha@xindi:~$ psql > 04 11:41 /usr/lib/postgresql/9.2/bin/psql: symbol lookup error: >

Re: Non-null values of recovery functions after promote or crash of primary

2019-10-08 Thread Martín Marqués
Hi, > IMV, and not unlike other similar cases I've talked about on another > thread, these should be cleared when the system is promoted as they're > otherwise confusing and nonsensical. Keep in mind that this also happens when the server crashes and has to perform crash recovery. In that case

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Robert Haas
On Tue, Oct 8, 2019 at 7:52 AM Antonin Houska wrote: > * Temporary files (buffile.c): we derive the IV from PID of the process that > created the file + segment number + block within the segment. This > information does not change if you need to write the same block again. If > new IV

Re: abort-time portal cleanup

2019-10-08 Thread Andres Freund
Hi, On 2019-10-07 12:14:52 -0400, Robert Haas wrote: > > - if (portal->status == PORTAL_READY) > > - MarkPortalFailed(portal); > > > > Why it is safe to remove this check? It has been explained in commit > > 7981c342 why we need that check. I don't see any explanation in email > > or patch

Re: v12 and pg_restore -f-

2019-10-08 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Andrew Gierth writes: > > "Tom" == Tom Lane writes: > > Tom> Perhaps we could change the back branches so that they interpret > > Tom> "-f -" as "write to stdout", but without enforcing that you use > > Tom> that syntax. > > > We should

Re: PATCH: Add uri percent-encoding for binary data

2019-10-08 Thread Anders Åstrand
On Mon, Oct 7, 2019 at 11:38 PM Isaac Morland wrote: > > On Mon, 7 Oct 2019 at 03:15, Anders Åstrand wrote: >> >> Hello >> >> Attached is a patch for adding uri as an encoding option for >> encode/decode. It uses what's called "percent-encoding" in rfc3986 >>

Re: Non-null values of recovery functions after promote or crash of primary

2019-10-08 Thread Stephen Frost
Greetings, * Martín Marqués (mar...@2ndquadrant.com) wrote: > pg_last_wal_receive_lsn() > pg_last_wal_replay_lsn() > pg_last_xact_replay_timestamp() > > Under normal circumstances we would expect to receive NULLs from all > three functions on a primary node, and code comments back up my

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > Unless we are *absolutely* certain, I bet someone will be able to find a > side-channel that somehow leaks some data or data-about-data, if we don't > encrypt everything. If nothing else, you can get use patterns out of it, > and you can

Re: PATCH: Add uri percent-encoding for binary data

2019-10-08 Thread Anders Åstrand
On Mon, Oct 7, 2019 at 9:52 PM Bruce Momjian wrote: > > On Mon, Oct 7, 2019 at 09:14:38AM +0200, Anders Åstrand wrote: > > Hello > > > > Attached is a patch for adding uri as an encoding option for > > encode/decode. It uses what's called "percent-encoding" in rfc3986 > >

Re: pg_init

2019-10-08 Thread Antonin Houska
Tomas Vondra wrote: > On Tue, Oct 08, 2019 at 10:03:03PM +0530, Natarajan R wrote: > >I want to read pg_database from pg_init... > > > >Is using heap_open() is possible? or else any other way is there ? > > This is way too vague question - I have no idea what you mean by > pg_init, for example.

Re: pg_init

2019-10-08 Thread Tomas Vondra
On Tue, Oct 08, 2019 at 10:03:03PM +0530, Natarajan R wrote: I want to read pg_database from pg_init... Is using heap_open() is possible? or else any other way is there ? This is way too vague question - I have no idea what you mean by pg_init, for example. And it's probably a good idea to

pg_init

2019-10-08 Thread Natarajan R
I want to read pg_database from pg_init... Is using heap_open() is possible? or else any other way is there ?

Re: Standby accepts recovery_target_timeline setting?

2019-10-08 Thread Stephen Frost
Greetings, * Fujii Masao (masao.fu...@gmail.com) wrote: > On Tue, Oct 8, 2019 at 10:58 PM Stephen Frost wrote: > > Having these options end up set but then hacking all of the other code > > that looks at them to check if we're actually in recovery or not would > > end up being both confusing to

Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)

2019-10-08 Thread Craig Ringer
On Thu, 11 Jul 2019 at 04:34, Tom Lane wrote: > Robert Haas writes: > > On Wed, Jul 10, 2019 at 9:59 AM Dave Cramer wrote: > >> I'm still a bit conflicted about what to do with search_path as I do > believe this is potentially a security issue. > >> It may be that we always want to report that

Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)

2019-10-08 Thread Craig Ringer
On Fri, 12 Jul 2019 at 01:27, Robert Haas wrote: > > We have steadfastly refused to provide protocol-level tools for things > like "please change my user ID, and don't let anyone change it again > via SQL," and that's a huge problem for things like connection poolers > which can't parse all the

Re: Created feature for to_date() conversion using patterns 'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D'

2019-10-08 Thread Mark Lorenz
Hi, I apologize for the mistake. For the mailing list correspondence I created this mail account. But I forgot to change the sender name. So, the "postgres" name appeared as sender name in the mailing list. I changed it. Kind regards, Mark/S-Man42 Hi, some days ago I ran into a problem

Re: Standby accepts recovery_target_timeline setting?

2019-10-08 Thread Fujii Masao
On Tue, Oct 8, 2019 at 10:58 PM Stephen Frost wrote: > > Greetings, > > * Robert Haas (robertmh...@gmail.com) wrote: > > On Mon, Oct 7, 2019 at 9:14 AM Fujii Masao wrote: > > > Agreed, too. Do you have any idea to implement that? I've not found out > > > "smart" way to do that yet. > > > > > >

Re: Ordering of header file inclusion

2019-10-08 Thread Tom Lane
Amit Kapila writes: > On Wed, Oct 2, 2019 at 2:57 PM vignesh C wrote: >> I noticed that some of the header files inclusion is not ordered as >> per the usual standard that is followed. >> The attached patch contains the fix for the order in which the header >> files are included. >> Let me know

Re: pg_upgrade fails with non-standard ACL

2019-10-08 Thread Stephen Frost
Greetings, * Anastasia Lubennikova (a.lubennik...@postgrespro.ru) wrote: > Cool. It seems that everyone agrees on this patch. Thanks for working on this, I took a quick look over it and I do have some concerns. > I attached the updated version. Now it prints a better error message > and

Re: Standby accepts recovery_target_timeline setting?

2019-10-08 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Oct 7, 2019 at 9:14 AM Fujii Masao wrote: > > Agreed, too. Do you have any idea to implement that? I've not found out > > "smart" way to do that yet. > > > > One idea is, as Michael suggested, to use SetConfigOption() for all the

Created feature for to_date() conversion using patterns 'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D'

2019-10-08 Thread postgres
Hi, some days ago I ran into a problem with the to_date() function. I originally described it on StackExchange: https://dba.stackexchange.com/questions/250111/unexpected-behaviour-for-to-date-with-week-number-and-week-day The problem: If you want to parse a date string with year, week and

Re: dropping column prevented due to inherited index

2019-10-08 Thread Ashutosh Sharma
On Tue, Oct 8, 2019 at 2:12 PM Amit Langote wrote: > > Hi Ashutosh, > > On Mon, Oct 7, 2019 at 1:39 PM Ashutosh Sharma wrote: > > I think we could have first deleted all the dependency of child object > > on parent and then deleted the child itself using performDeletion(). > > So, there are two

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Antonin Houska
Robert Haas wrote: > On Mon, Oct 7, 2019 at 3:01 PM Antonin Houska wrote: > > However the design doesn't seem to be stable enough at the > > moment for coding to make sense. > > Well, I think the question is whether working further on your patch > could produce some things that everyone would

Re: ICU for global collation

2019-10-08 Thread Marius Timmer
Hi everyone, like the others before me we (the university of Münster) are happy to see this feature as well. Thank you this. When I applied the patch two weeks ago I run into the issue that initdb did not recognize the new parameters (collation-provider and icu-locale) but I guess it was caused

Re: [PATCH] use separate PartitionedRelOptions structure to store partitioned table options

2019-10-08 Thread Nikolay Shaplov
В письме от вторник, 8 октября 2019 г. 16:00:49 MSK пользователь Amit Langote написал: > > > > The idea of this patch is following: If you read the code, partitioned > > > > tables do not have any options (you will not find > > > > RELOPT_KIND_PARTITIONED > > > > in boolRelOpts, intRelOpts,

Re: [PATCH] Add some useful asserts into View Options macroses

2019-10-08 Thread Nikolay Shaplov
В письме от понедельник, 7 октября 2019 г. 12:59:27 MSK пользователь Robert Haas написал: > > This thread is a follow up to the thread > > https://www.postgresql.org/message-id/2620882.s52SJui4ql@x200m where I've > > been trying to remove StdRdOptions structure and replace it with unique > >

Re: [PATCH] Do not use StdRdOptions in Access Methods

2019-10-08 Thread Nikolay Shaplov
В письме от понедельник, 7 октября 2019 г. 18:55:20 MSK пользователь Dent John написал: > I like the new approach. And I agree with the ambition — to split out the > representation from StdRdOptions. Thanks. > However, with that change, in the AM’s *options() function, it looks as if > you

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Antonin Houska
Ants Aasma wrote: > On Mon, 7 Oct 2019 at 18:02, Bruce Momjian wrote: > >> Well, do to encryption properly, there is the requirement of the nonce. >> If you ever rewrite a bit, you technically have to have a new nonce. >> For WAL, since it is append-only, you can use the WAL file name.

Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays

2019-10-08 Thread Amit Kapila
On Sat, Oct 5, 2019 at 3:10 AM Andres Freund wrote: > > On 2019-10-04 17:08:29 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2019-10-04 16:31:29 -0400, Bruce Momjian wrote: > > >> Yeah, it is certainly weird that you have to assign the first array > > >> element to get the rest to be

Re: Change atoi to strtol in same place

2019-10-08 Thread David Rowley
On Tue, 8 Oct 2019 at 19:46, Joe Nelson wrote: > > David Rowley wrote: > > The translation string here must be consistent over all platforms. I > > think this will cause issues if the translation string uses %ld and > > the platform requires %lld? > > A very good and subtle point. I'll change it

Re: Transparent Data Encryption (TDE) and encrypted files

2019-10-08 Thread Ants Aasma
On Mon, 7 Oct 2019 at 18:02, Bruce Momjian wrote: > Well, do to encryption properly, there is the requirement of the nonce. > If you ever rewrite a bit, you technically have to have a new nonce. > For WAL, since it is append-only, you can use the WAL file name. For > heap/index files, we change

Re: dropping column prevented due to inherited index

2019-10-08 Thread Amit Langote
On Tue, Oct 8, 2019 at 6:15 PM Alvaro Herrera wrote: > Apologies for not helping much here; I'm on vacation for a couple of > weeks. No worries, please take your time. > On 2019-Oct-08, Amit Langote wrote: > > > I couldn't imagine how that trick could be implemented for this case. :( > > Can't

Re: dropping column prevented due to inherited index

2019-10-08 Thread Alvaro Herrera
Apologies for not helping much here; I'm on vacation for a couple of weeks. On 2019-Oct-08, Amit Langote wrote: > I couldn't imagine how that trick could be implemented for this case. :( Can't we pass around an ObjectAddresses pointer to which each recursion level adds the object(s) it wants to

RE: Wrong value in metapage of GIN INDEX.

2019-10-08 Thread imai.yoshik...@fujitsu.com
Moon-san, kuroda.keisuke-san On Thu, Aug 29, 2019 at 8:20 AM, Moon, Insung wrote: > =# CREATE INDEX foo_idx ON foo USING gin (i jsonb_ops); > =# SELECT * FROM gin_metapage_info(get_raw_page('foo_idx', 0)) WITH > (fastupdate=off); This is not important thing but some mistakes are here. =#

RE: Global shared meta cache

2019-10-08 Thread ideriha.take...@fujitsu.com
Hi, Alvaro > >The last patch we got here (a prototype) was almost a year ago. There was >substantial discussion about it, but no new version of the patch has been >posted. Are >we getting a proper patch soon, or did we give up on the approach entirely? I'm sorry for the late response. I

Re: Remove some code for old unsupported versions of MSVC

2019-10-08 Thread Peter Eisentraut
On 2019-10-07 08:52, Michael Paquier wrote: > On Fri, Oct 04, 2019 at 04:35:59PM +0200, Peter Eisentraut wrote: >> As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013, >> which means _MSC_VER >= 1800. This means that conditionals about >> older versions of _MSC_VER can be removed

Re: dropping column prevented due to inherited index

2019-10-08 Thread Amit Langote
Hi Ashutosh, On Mon, Oct 7, 2019 at 1:39 PM Ashutosh Sharma wrote: > I think we could have first deleted all the dependency of child object > on parent and then deleted the child itself using performDeletion(). So, there are two objects to consider in this case -- column and an index that

RE: Global shared meta cache

2019-10-08 Thread ideriha.take...@fujitsu.com
Hi, Konstantin I'm very sorry for the late response and thank you for your feedback. (I re-sent this email because my email address changed and couldn't deliver to hackers.) >From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] > >Takeshi-san, > >I am sorry for late response - I just

Re: Regarding extension

2019-10-08 Thread Craig Ringer
On Fri, 4 Oct 2019 at 13:18, Tom Lane wrote: > Natarajan R writes: > > Me: Thanks Tomas, But this is for that particular database only, I want > > to get the *list of database Id's* on which my extension is installed > > during *PG_INIT* itself... > > You can't. In the first place, that

Re: [PATCH] use separate PartitionedRelOptions structure to store partitioned table options

2019-10-08 Thread Amit Langote
Hello, On Mon, Oct 7, 2019 at 6:43 PM Nikolay Shaplov wrote: > В письме от понедельник, 7 октября 2019 г. 14:57:14 MSK пользователь Michael > Paquier написал: > > On Sun, Oct 06, 2019 at 03:47:46PM +0300, Nikolay Shaplov wrote: > > > The idea of this patch is following: If you read the code,

Re: Change atoi to strtol in same place

2019-10-08 Thread Joe Nelson
David Rowley wrote: > It's not for this patch to decide what ports clients can connect to > PostgreSQL on. As far as I'm aware Windows has no restrictions on what > ports unprivileged users can listen on. I think we're likely going to > upset a handful of people if we block the client tools from

Re: Ordering of header file inclusion

2019-10-08 Thread Amit Kapila
On Wed, Oct 2, 2019 at 2:57 PM vignesh C wrote: > > Hi, > > I noticed that some of the header files inclusion is not ordered as > per the usual standard that is followed. > The attached patch contains the fix for the order in which the header > files are included. > Let me know your thoughts on

Re: Updated some links which are not working with new links

2019-10-08 Thread vignesh C
On Tue, Oct 8, 2019 at 11:06 AM Michael Paquier wrote: > > On Mon, Oct 07, 2019 at 02:14:05PM +0530, vignesh C wrote: > > Sorry Michael for the miscommunication, the patch was present in the > > first mail of this mail thread. > > I'm re-attaching the patch in this mail. > > Let me know if

Re: maintenance_work_mem used by Vacuum

2019-10-08 Thread Amit Kapila
On Tue, Oct 8, 2019 at 12:57 AM Robert Haas wrote: > > On Sun, Oct 6, 2019 at 6:55 AM Amit Kapila wrote: > > We wanted to decide how a parallel vacuum should use memory? Can each > > worker consume maintenance_work_mem to clean up the gin Index or all > > workers should use no more than