Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Fujii Masao
On Fri, Aug 30, 2013 at 1:43 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Aug 30, 2013 at 8:25 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, Attached patch adds new GUC parameter 'compress_backup_block'. When this parameter is enabled, the server just compresses FPW

Re: [HACKERS] Behaviour of take over the synchronous replication

2013-08-30 Thread Sawada Masahiko
On Wed, Aug 28, 2013 at 10:59 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Aug 27, 2013 at 4:51 PM, Sawada Masahiko sawada.m...@gmail.com wrote: On Sun, Aug 25, 2013 at 3:21 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Sat, Aug 24, 2013 at 2:46 PM, Sawada Masahiko

Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Fujii Masao
On Fri, Aug 30, 2013 at 2:32 PM, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: (2013/08/30 11:55), Fujii Masao wrote: * Benchmark pgbench -c 32 -j 4 -T 900 -M prepared scaling factor: 100 checkpoint_segments = 1024 checkpoint_timeout = 5min (every checkpoint during

Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Peter Geoghegan
On Thu, Aug 29, 2013 at 10:55 PM, Fujii Masao masao.fu...@gmail.com wrote: I suppose that the cost of the random I/O involved would probably dominate just as with compress_backup_block = off. That said, you've used an SSD here, so perhaps not. Oh, maybe my description was confusing.

Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Fujii Masao
On Fri, Aug 30, 2013 at 2:37 PM, Nikhil Sontakke nikkh...@gmail.com wrote: Hi Fujii-san, I must be missing something really trivial, but why not try to compress all types of WAL blocks and not just FPW? The size of non-FPW WAL is small, compared to that of FPW. I thought that compression of

Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Heikki Linnakangas
On 30.08.2013 05:55, Fujii Masao wrote: * Result [tps] 1386.8 (compress_backup_block = off) 1627.7 (compress_backup_block = on) It would be good to check how much of this effect comes from reducing the amount of data that needs to be CRC'd, because there has been some talk of

[HACKERS] Add pgbench option: CHECKPOINT before starting benchmark

2013-08-30 Thread KONDO Mitsumasa
Hi, I add checkpoint option to pgbench. pgbench is simple and useful benchmark for every user. However, result of benchmark greatly changes by some situations which are in executing checkpoint, number of dirty buffers in share_buffers, and so on. For such a problem, it is custom to carry out a

Re: [HACKERS] Add pgbench option: CHECKPOINT before starting benchmark

2013-08-30 Thread Mark Kirkwood
On 30/08/13 19:54, KONDO Mitsumasa wrote: Hi, I add checkpoint option to pgbench. pgbench is simple and useful benchmark for every user. However, result of benchmark greatly changes by some situations which are in executing checkpoint, number of dirty buffers in share_buffers, and so

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Cédric Villemain
Le jeudi 29 août 2013 18:42:13 Stephen Frost a écrit : On Thursday, August 29, 2013, Andres Freund wrote: If you don't want your installation to use it, tell you ops people not to do so. They are superusers, they need to have the ability to follow some rules you make up internally. The

Re: [HACKERS] Add pgbench option: CHECKPOINT before starting benchmark

2013-08-30 Thread Fabien COELHO
My patches option difinition is here. [mitsu-ko@localhost pgbench]$ ./pgbench --help ~ -N, --no-checkpoint do not run CHECKPOINT after initialization ~ In latest commited pgbench, -N is --skip-some-updates skip updates of pgbench_tellers and pgbench_branches. But I cannot understand why

Re: [HACKERS] [9.3 doc fix] clarification of Solaris versions

2013-08-30 Thread Bjorn Munch
On 29/08 21.17, MauMau wrote: Thanks. I belive PostgreSQL runs successfully on Solaris 10 and later, because the binaries are published on the community site: http://ftp.postgresql.org/pub/binary/v9.3beta2/solaris/ Sorry, I didn't notice this thread earlier. Yes, I am building those

Re: [HACKERS] Statement timeout logging

2013-08-30 Thread Thom Brown
On 6 June 2013 17:28, Pavel Stehule pavel.steh...@gmail.com wrote: 2013/6/6 Thom Brown t...@linux.com: Hi, When a statement is cancelled due to it running for long enough for statement_timeout to take effect, it logs a message: ERROR: canceling statement due to statement timeout

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Kohei KaiGai
2013/8/29 Josh Berkus j...@agliodbs.com: Kaigai, Although I didn't touch this task by myself, my senior colleague said that we calculated some possible bandwidth of leakage as an evident when we ship supercomputer system with MAC feature for customer who worry about security. I'm not sure

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Kohei KaiGai
2013/8/29 David Fetter da...@fetter.org: On Thu, Aug 29, 2013 at 10:05:14AM -0400, Tom Lane wrote: Alexander Korotkov aekorot...@gmail.com writes: On Wed, Aug 28, 2013 at 4:17 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: It is out of scope for this feature. We usually calls this type of

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Kohei KaiGai
2013/8/29 Tom Lane t...@sss.pgh.pa.us: Josh Berkus j...@agliodbs.com writes: That would close only one covert channel. Others were already pointed out upthread, and I'll bet there are more ... Mind you, fundamentally this is no different from allowing INSERT permission on a table but

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Dimitri Fontaine
Stephen Frost sfr...@snowman.net writes: The OPs people are the ones that will be upset with this because the DBAs will be modifying configs which OPs rightfully claim as theirs. If that's the problem you want to solve, there's no technical solution that will put you at ease. That's a people

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Andres Freund
Hi, On 2013-08-30 10:20:48 +0200, Cédric Villemain wrote: The energy wasted in a good part of this massive 550+ messages thread is truly saddening. We all (c|sh)ould have spent that time making PG more awesome instead. Perhaps not understood by all, but keeping PG awesome involves

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Stephen Frost sfr...@snowman.net writes: The OPs people are the ones that will be upset with this because the DBAs will be modifying configs which OPs rightfully claim as theirs. If that's the problem you want to solve, there's no

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Cédric Villemain (ced...@2ndquadrant.com) wrote: ALTER ROLE ALL may be good enougth to handle every GUC that we can also remove from postgresql.conf (I suppose all GUC needing only a reload, not a restart). It may needs some improvement to handle changing default for ALL and adding

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-30 10:20:48 +0200, Cédric Villemain wrote: Grammar can be added later when the feature is stable. Could you explain the advantages of this? It will require users to get used to different interfaces and we will end up maintaining

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Andres Freund
On 2013-08-30 08:48:21 -0400, Stephen Frost wrote: * Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Stephen Frost sfr...@snowman.net writes: The OPs people are the ones that will be upset with this because the DBAs will be modifying configs which OPs rightfully claim as theirs. If

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Andres Freund
On 2013-08-29 21:26:48 -0400, Stephen Frost wrote: Sure, you can construct a scenario where this matters. The ops guys have sudo postgres pg_ctl access but adminpack isn't installed and they have no other way to modify the configuration file. But that's just bizarre. And if that's

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I was one who sent a bug report - this error is not too dangerous, but it is hidden, and difficult to find, if you don't know what can be happen. Same as bug with plpgsql and SQL identifier collisions. If you understand, then you can protect self

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Robert Haas
On Thu, Aug 29, 2013 at 9:12 PM, Stephen Frost sfr...@snowman.net wrote: You will not find me argueing to allow that in normal operation, or most direct-catalog hacking. I'd be much happier if we had all the ALTER, etc, options necessary to prevent any need to ever touch the catalogs.

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-30 08:48:21 -0400, Stephen Frost wrote: I really just don't buy that- I've already put forward suggestions for how to deal with it, but no one here seems to understand the distinction. Modifying listen_addresses through ALTER

Re: [HACKERS] WAL CPU overhead/optimization (was Master-slave visibility order)

2013-08-30 Thread k...@rice.edu
On Fri, Aug 30, 2013 at 03:22:37AM +0300, Ants Aasma wrote: On Fri, Aug 30, 2013 at 3:02 AM, Andres Freund and...@2ndquadrant.com wrote: I am not sure hot cache large buffer performance is really the interesting case. Most of the XLogInsert()s are pretty small in the common workloads. I

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-29 21:26:48 -0400, Stephen Frost wrote: It's not the OPs guy that I'm worried about using ALTER SYSTEM- I don't expect them to have any clue about it or care about it, except where it can be used to modify things under /etc which

Re: [HACKERS] ENABLE/DISABLE CONSTRAINT NAME

2013-08-30 Thread Tom Lane
wangs...@highgo.com.cn writes: In order to achieve enable/disable constraint name,I made ​​a few modifications to the code. First, someone used to build the constraints while building table. Then inserting data must follow a certain order. And people usually

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Andres Freund
On 2013-08-30 09:19:42 -0400, Stephen Frost wrote: * Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-30 08:48:21 -0400, Stephen Frost wrote: I really just don't buy that- I've already put forward suggestions for how to deal with it, but no one here seems to understand the

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Robert Haas
On Thu, Aug 29, 2013 at 9:26 PM, Stephen Frost sfr...@snowman.net wrote: In the first place, modifying postgresql.conf and not immediately restarting the server to test your changes is probably the single most basic DBA error imaginable. You're not modifying postgresql.conf with ALTER SYSTEM,

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread David Johnston
Tom Lane-2 wrote Pavel Stehule lt; pavel.stehule@ gt; writes: I was one who sent a bug report - this error is not too dangerous, but it is hidden, and difficult to find, if you don't know what can be happen. Same as bug with plpgsql and SQL identifier collisions. If you understand, then

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Robert Haas
On Fri, Aug 30, 2013 at 8:53 AM, Stephen Frost sfr...@snowman.net wrote: Yes, one of the issues with the existing system is that you can't specify a default to be applied to new roles. Also, there are parameters which are not per-role yet which it probably makes sense to be in the database

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-30 09:19:42 -0400, Stephen Frost wrote: wal_level and shared_buffers I can buy, but listen_addresses? The most typical change there is going from localhost - '*', but you've got to be on the box to do that. Anything else and

Re: [HACKERS] Add pgbench option: CHECKPOINT before starting benchmark

2013-08-30 Thread Tom Lane
KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp writes: My patches option difinition is here. [mitsu-ko@localhost pgbench]$ ./pgbench --help ~ -N, --no-checkpoint do not run CHECKPOINT after initialization ~ In latest commited pgbench, -N is --skip-some-updates skip updates of

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Andres Freund
On 2013-08-30 09:43:01 -0400, Stephen Frost wrote: * Andres Freund (and...@2ndquadrant.com) wrote: On 2013-08-30 09:19:42 -0400, Stephen Frost wrote: wal_level and shared_buffers I can buy, but listen_addresses? The most typical change there is going from localhost - '*', but you've got

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: there's a fairly generous but fixed-at-startup-time limit on how many segments you can have. In practice I don't think this matters much, but it was a sobering reminder that the main shared memory segment, with all of its inflexibility, has

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Robert Haas
On Fri, Aug 30, 2013 at 9:19 AM, Stephen Frost sfr...@snowman.net wrote: You and Robert both seem to be of the opinion that this hack which brings postgresql.conf into the database via ALTER SYSTEM is a-ok because it's moving us forward in someone's mind, but it really is developing a system

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Andres Freund
On 2013-08-30 06:34:47 -0700, David Johnston wrote: Tom Lane-2 wrote I was one who sent a bug report - this error is not too dangerous, but it is hidden, and difficult to find, if you don't know what can be happen. Same as bug with plpgsql and SQL identifier collisions. If you understand,

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: Technically trivial in the sense that it should be queryable from SQL without having to write code in an untrusted PL ;). hah. I guess storing the file modification date along the file/location a GUC is originating from would be good enough.

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Robert Haas
On Fri, Aug 30, 2013 at 9:49 AM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: there's a fairly generous but fixed-at-startup-time limit on how many segments you can have. In practice I don't think this matters much, but it was a sobering reminder that

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Fri, Aug 30, 2013 at 8:53 AM, Stephen Frost sfr...@snowman.net wrote: Yes, one of the issues with the existing system is that you can't specify a default to be applied to new roles. Also, there are parameters which are not per-role yet which

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Tom Lane
David Johnston pol...@yahoo.com writes: If we alter syntax for mitigation purposes I'd want to consider requiring parentheses around the columns that belong to the ORDER BY instead of using the full extended syntax of WITHIN GROUP. Unfortunately, that ORDER BY syntax is specified by the SQL

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread David Johnston
Andres Freund-3 wrote On 2013-08-30 06:34:47 -0700, David Johnston wrote: Tom Lane-2 wrote I was one who sent a bug report - this error is not too dangerous, but it is hidden, and difficult to find, if you don't know what can be happen. Same as bug with plpgsql and SQL identifier

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
Tom, all, I'm not one to give up a fight (I hope that's something ya'll like about me ;), but in this case I'm gonna have to concede. Clearly, I'm in the minority about this, at least on the lists and among the active hackers. Let me just say that I hope all the happy users of this will

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: I think you're getting way too hung up on the fact that the proposed auto.conf will be stored as a flat file. From your comments upthread, I gather that you'd be rejoicing if it were a table. I'd be happy if it was a table which managed an

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Pavel Stehule
2013/8/30 David Johnston pol...@yahoo.com Andres Freund-3 wrote On 2013-08-30 06:34:47 -0700, David Johnston wrote: Tom Lane-2 wrote I was one who sent a bug report - this error is not too dangerous, but it is hidden, and difficult to find, if you don't know what can be happen.

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-30 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Robert Haas (robertmh...@gmail.com) wrote: I think you're getting way too hung up on the fact that the proposed auto.conf will be stored as a flat file. From your comments upthread, I gather that you'd be rejoicing if it were a table. I'd be

[HACKERS] Add database to PGXACT / per database vacuuming

2013-08-30 Thread Andres Freund
Hi, For the logical decoding patch I added support for pegging RecentGlobalXmin (and GetOldestXmin) to a lower value. To avoid causing undue bloat cpu overhead (hot pruning is friggin expensive) I split RecentGlobalXmin into RecentGlobalXmin and RecentGlobalDataXmin where the latter is the the

Re: [HACKERS] logical changeset generation v5

2013-08-30 Thread Andres Freund
Hi, I've attached a couple of the preliminary patches to $subject which I've recently cleaned up in the hope that we can continue improving on those in a piecemal fashion. I am preparing submission of a newer version of the major patch but unfortunately progress on that is slower than I'd like...

Re: [HACKERS] dynamic shared memory

2013-08-30 Thread Andres Freund
Hi, On 2013-08-28 15:20:57 -0400, Robert Haas wrote: That way any corruption in that area will prevent restarts without reboot unless you use ipcrm, or such, right? The way I've designed it, no. If what we expect to be the control segment doesn't exist or doesn't conform to our

Re: [HACKERS] Add database to PGXACT / per database vacuuming

2013-08-30 Thread Heikki Linnakangas
On 30.08.2013 19:01, Andres Freund wrote: For the logical decoding patch I added support for pegging RecentGlobalXmin (and GetOldestXmin) to a lower value. To avoid causing undue bloat cpu overhead (hot pruning is friggin expensive) I split RecentGlobalXmin into RecentGlobalXmin and

Re: [HACKERS] Add database to PGXACT / per database vacuuming

2013-08-30 Thread Heikki Linnakangas
On 30.08.2013 21:07, Heikki Linnakangas wrote: On 30.08.2013 19:01, Andres Freund wrote: For the logical decoding patch I added support for pegging RecentGlobalXmin (and GetOldestXmin) to a lower value. To avoid causing undue bloat cpu overhead (hot pruning is friggin expensive) I split

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Josh Berkus
On 08/30/2013 03:05 AM, Kohei KaiGai wrote: Surely someone in the security community has discussed this? Security community considers covert channel is a hard to solve problem; nearly impossible to eliminate. Let's see the summary in wikipedia: http://en.wikipedia.org/wiki/Covert_channel

Re: [HACKERS] Add database to PGXACT / per database vacuuming

2013-08-30 Thread Andres Freund
On 2013-08-30 21:07:04 +0300, Heikki Linnakangas wrote: On 30.08.2013 19:01, Andres Freund wrote: For the logical decoding patch I added support for pegging RecentGlobalXmin (and GetOldestXmin) to a lower value. To avoid causing undue bloat cpu overhead (hot pruning is friggin expensive) I

Re: [HACKERS] Freezing without write I/O

2013-08-30 Thread Andres Freund
Hi Heikki, On 2013-08-27 18:56:15 +0300, Heikki Linnakangas wrote: Here's an updated patch. The race conditions I mentioned above have been fixed. Thanks for posting the new version! I have a quick question: The reason I'd asked about the status of the patch was that I was thinking about the

Re: [HACKERS] ENABLE/DISABLE CONSTRAINT NAME

2013-08-30 Thread Fabien COELHO
Uh ... why not just drop the constraint, and re-add it later if you want it again? My 0.02€ : maybe because you must keep track of the constraint details to do so, this it is significantly more error prone than disable / enable when the bookkeeping is done by the system and if everything is

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Stephen Frost
Josh, * Josh Berkus (j...@agliodbs.com) wrote: On 08/30/2013 03:05 AM, Kohei KaiGai wrote: Security community considers covert channel is a hard to solve problem; nearly impossible to eliminate. While impossible to eliminate, we should certainly consider cases like this where we can do

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: We have issues with covert channels even without RLS though and holding up RLS because it doesn't fix all the covert channels isn't sensible. I think it's entirely sensible to question whether we should reject (not hold up) RLS if it has major

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Josh Berkus
On 08/30/2013 12:43 PM, Tom Lane wrote: In short, we can check some check-box is a really, really bad reason to accept a security-related feature. If we're going to put up with all the downsides of RLS, I want the end result to be something that's actually secure, not something that gives the

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 08/30/2013 12:43 PM, Tom Lane wrote: In short, we can check some check-box is a really, really bad reason to accept a security-related feature. If we're going to put up with all the downsides of RLS, I want the end result to be something that's

Re: [HACKERS] What happens at BIND time? (pg_upgrade issue)

2013-08-30 Thread Josh Berkus
On 08/28/2013 11:44 AM, Josh Berkus wrote: Tom, Does the backend's memory usage climb, or hold steady? If the former, I'd bet on client failure to release resources, eg not closing the portals when done with them. A memory map from MemoryContextStats would help determine exactly what's

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: We have issues with covert channels even without RLS though and holding up RLS because it doesn't fix all the covert channels isn't sensible. I think it's entirely sensible to question whether we should reject

[HACKERS] Window functions can be created with defaults, but they don't work

2013-08-30 Thread Tom Lane
I noticed this while poking at the variadic-aggregates issue: regression=# create function nth_value_def(anyelement, integer = 1) returns anyelement language internal window immutable strict as 'window_nth_value'; CREATE FUNCTION regression=# SELECT nth_value_def(ten) OVER (PARTITION BY four),

[HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-08-30 Thread Peter Geoghegan
For many years now, MySQL has a feature called INSERT IGNORE [1]; SQLite has INSERT ON CONFLICT IGNORE [2]; SQL Server has an option called IGNORE_DUP_KEY and Oracle has a hint called IGNORE_ROW_ON_DUPKEY_INDEX (they acknowledge that it's a bit odd that a hint changes the semantics of a DML

Re: [HACKERS] Window functions can be created with defaults, but they don't work

2013-08-30 Thread Robert Haas
On Fri, Aug 30, 2013 at 6:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: I noticed this while poking at the variadic-aggregates issue: regression=# create function nth_value_def(anyelement, integer = 1) returns anyelement language internal window immutable strict as 'window_nth_value'; CREATE

Re: [HACKERS] Compression of full-page-writes

2013-08-30 Thread Robert Haas
On Thu, Aug 29, 2013 at 10:55 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch adds new GUC parameter 'compress_backup_block'. I think this is a great idea. (This is not to disagree with any of the suggestions made on this thread for further investigation, all of which I think I

[HACKERS] operator precedence issues

2013-08-30 Thread Merlin Moncure
Hackers, The operator precedence rules seem hard wired to not be able to be worked around, not matter what. The pain point for me has always been the division operator -- once in a while I end up in a situation where I want to override it so that it wraps the divisor with NULLIF. There is no

Re: [HACKERS] Window functions can be created with defaults, but they don't work

2013-08-30 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Aug 30, 2013 at 6:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: The reason this crashes is that the planner doesn't apply default-insertion to WindowFunc nodes, only to FuncExprs. I'm not sure I agree. Under that approach, any functions that have

Re: [HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-08-30 Thread Josh Berkus
On 08/30/2013 03:09 PM, Peter Geoghegan wrote: The attached WIP patch implements this for Postgres, with a few notable differences: Thank you for addressing this. If nobody is going to hack out MERGE, we could really use at least this feature. 3) RETURNING is expanded - RETURNING REJECTS *

Re: [HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-08-30 Thread Peter Geoghegan
On Fri, Aug 30, 2013 at 3:40 PM, Josh Berkus j...@agliodbs.com wrote: Does this work with multiple VALUES rows? Yes. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] operator precedence issues

2013-08-30 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: The operator precedence rules seem hard wired to not be able to be worked around, not matter what. That's right. In the first place, bison is incapable of doing anything other than hard-wired operator precedence. In the second, if we did try to allow

Re: [HACKERS] operator precedence issues

2013-08-30 Thread Andres Freund
Hi, On 2013-08-30 17:35:04 -0500, Merlin Moncure wrote: When a schema-qualified operator name is used in the OPERATOR syntax, as for example in: SELECT 3 OPERATOR(pg_catalog.+) 4; the OPERATOR construct is taken to have the default precedence shown in Table 4-2 for any other operator. This

Re: [HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-08-30 Thread Andres Freund
Hi, This is awesome. On 2013-08-30 15:09:59 -0700, Peter Geoghegan wrote: 1) The patch is only interested in unique index violations (specifically, violations of amcanunique access method unique indexes); it will not do anything with NULL constraint violations, as the MySQL feature does, for

Re: [HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-08-30 Thread Peter Geoghegan
On Fri, Aug 30, 2013 at 5:47 PM, Andres Freund and...@2ndquadrant.com wrote: This is awesome. Thanks. All that seems sane to me. I very, very much do not want it to deal with NOT NULL violations. Sure. But there's nothing stopping us from doing that as a totally orthogonal thing. Not that I

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Alvaro Herrera
Uh, the pg_dump part checks for version 80400, shouldn't it be 90400? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Variadic aggregates vs. project policy

2013-08-30 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Uh, the pg_dump part checks for version 80400, shouldn't it be 90400? The reasoning there is that 8.4 is where we added pg_get_function_arguments(), so this dumping code should work against that server version or later. (Oh, memo to self: test

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Kohei KaiGai
2013/8/30 Josh Berkus j...@agliodbs.com: On 08/30/2013 03:05 AM, Kohei KaiGai wrote: Surely someone in the security community has discussed this? Security community considers covert channel is a hard to solve problem; nearly impossible to eliminate. Let's see the summary in wikipedia:

Re: [HACKERS] dynamic shared memory

2013-08-30 Thread Amit Kapila
On Fri, Aug 30, 2013 at 9:15 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2013-08-28 15:20:57 -0400, Robert Haas wrote: That way any corruption in that area will prevent restarts without reboot unless you use ipcrm, or such, right? The way I've designed it, no. If what we

Re: [HACKERS] [v9.4] row level security

2013-08-30 Thread Kohei KaiGai
2013/8/30 Tom Lane t...@sss.pgh.pa.us: Josh Berkus j...@agliodbs.com writes: On 08/30/2013 12:43 PM, Tom Lane wrote: In short, we can check some check-box is a really, really bad reason to accept a security-related feature. If we're going to put up with all the downsides of RLS, I want the