Re: [HACKERS] pg_prewarm

2012-03-09 Thread Joshua Drake
So I wrote a prewarming utility. Patch is attached. You can prewarm either the OS cache or PostgreSQL's cache, and there are two options for prewarming the OS cache to meet different needs. By passing the correct arguments to the function, you can prewarm an entire relation or just the blocks

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Devrim GÜNDÜZ
Hi, On Thu, 2012-03-08 at 23:13 -0500, Robert Haas wrote: It's been bugging me for a while now that we don't have a prewarming utility, for a couple of reasons, including: 1. Our customers look at me funny when I suggest that they use pg_relation_filepath() and /bin/dd for this purpose.

Re: Scaling XLog insertion (was Re: [HACKERS] Moving more work outside WALInsertLock)

2012-03-09 Thread Heikki Linnakangas
On 07.03.2012 17:28, Tom Lane wrote: Simon Riggssi...@2ndquadrant.com writes: On Wed, Mar 7, 2012 at 3:04 PM, Tom Lanet...@sss.pgh.pa.us wrote: Alvaro Herreraalvhe...@commandprompt.com writes: So they are undoubtely rare. Not sure if as rare as Higgs bosons. Even if they're rare,

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Fujii Masao
On Fri, Mar 9, 2012 at 1:13 PM, Robert Haas robertmh...@gmail.com wrote: It's been bugging me for a while now that we don't have a prewarming utility, for a couple of reasons, including: 1. Our customers look at me funny when I suggest that they use pg_relation_filepath() and /bin/dd for this

Re: Scaling XLog insertion (was Re: [HACKERS] Moving more work outside WALInsertLock)

2012-03-09 Thread Fujii Masao
On Fri, Mar 9, 2012 at 7:04 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Here's an updated patch. It now only loops once per segment that a record crosses. Plus a lot of other small cleanup. Thanks! But you forgot to attach the patch. I've been doing some performance

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Hans-Jürgen Schönig
we had some different idea here in the past: what if we had a procedure / method to allow people to save the list of current buffers / cached blocks to be written to disk (sorted). we could then reload this cache profile on startup in the background or people could load a certain cache content

Re: [HACKERS] Review of patch renaming constraints

2012-03-09 Thread Dimitri Fontaine
Hi, Peter Eisentraut pete...@gmx.net writes: On tor, 2012-01-12 at 22:43 -0600, Joshua Berkus wrote: Most normal uses of alter table ... rename constraint ... worked normally. However, the patch does not deal correctly with constraints which are not inherited, such as primary key

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-03-09 Thread Marco Nenciarini
Il giorno gio, 08/03/2012 alle 08.11 -0500, Robert Haas ha scritto: On Fri, Feb 24, 2012 at 9:01 PM, Noah Misch n...@leadboat.com wrote: I consider these the core changes needed to reach Ready for Committer: - Fix crash in array_replace(arr, null, null). - Don't look through the domain

[HACKERS] Bug: walsender and high CPU usage

2012-03-09 Thread Fujii Masao
Hi, I found the bug which causes walsender to enter into busy loop when replication connection is terminated. Walsender consumes lots of CPU resource (%sys), and this situation lasts until it has detected the termination of replication connection and exited. The cause of this bug is that the

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 00:28, Thom Brown t...@linux.com wrote: On 8 March 2012 22:24, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: We're getting there. :) It was late last night and I forgot to get around to testing pg_dump, which isn't working correctly: -- -- Name:

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Fujii Masao
On Sun, Mar 4, 2012 at 8:26 PM, Magnus Hagander mag...@hagander.net wrote: On Sun, Feb 26, 2012 at 00:53, Euler Taveira de Oliveira eu...@timbira.com wrote: On 25-02-2012 09:23, Magnus Hagander wrote: Do we even *need* the validate_xlog_location() function? If we just remove those calls,

Re: [HACKERS] pg_stats_recovery view

2012-03-09 Thread Fujii Masao
On Tue, Feb 14, 2012 at 4:10 PM, Jaime Casanova ja...@2ndquadrant.com wrote: On Thu, Feb 2, 2012 at 2:32 AM, Magnus Hagander mag...@hagander.net wrote: I haven't looked through the code in detail, but one direct comment: do we really need/want to send this through the stats collector? It will

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-09 Thread Etsuro Fujita
(2012/03/09 14:00), Tom Lane wrote: I wrote: There are a couple of other points that make me think we need to revisit the PlanForeignScan API definition some more, too. ... So we need to break down what PlanForeignScan currently does into three separate steps. The first idea that comes to

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 5:24 AM, Fujii Masao masao.fu...@gmail.com wrote: When a relation is loaded into cache, are corresponding indexes also loaded at the same time? No, although if you wanted to do that you could easily do so, using a query like this: select pg_prewarm(indexrelid, 'main',

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: It's been bugging me for a while now that we don't have a prewarming utility, for a couple of reasons, including: 1. Our customers look at me funny when I suggest that they use pg_relation_filepath() and /bin/dd for this purpose. Try telling them

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 5:42 AM, Hans-Jürgen Schönig postg...@cybertec.at wrote: we had some different idea here in the past: what if we had a procedure / method to allow people to save the list of current buffers / cached blocks to be written to disk (sorted). we could then reload this cache

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 8:25 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: It's been bugging me for a while now that we don't have a prewarming utility, for a couple of reasons, including: 1. Our customers look at me funny when I suggest that they

Re: [HACKERS] Review of pg_archivecleanup -x option patch

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 12:47 AM, Jaime Casanova ja...@2ndquadrant.com wrote: Sorry, here's the patch rebased and with the suggestion from Alex. Which reminds me, I never thank him for the review (shame on me) :D with the patch this time This may be a stupid idea, but it seems to me that it

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Robert Haas
On Wed, Mar 7, 2012 at 4:53 PM, Thom Brown t...@linux.com wrote: I've also since found that if I issue a VACUUM, CLUSTER or REINDEX on a read-only standby, the BEFORE ANY COMMAND trigger fires.  I don't think any trigger should fire on a read-only standby. Why ever not? -- Robert Haas

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 14:09, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 7, 2012 at 4:53 PM, Thom Brown t...@linux.com wrote: I've also since found that if I issue a VACUUM, CLUSTER or REINDEX on a read-only standby, the BEFORE ANY COMMAND trigger fires.  I don't think any trigger should

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:22 AM, Thom Brown t...@linux.com wrote: On 9 March 2012 14:09, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 7, 2012 at 4:53 PM, Thom Brown t...@linux.com wrote: I've also since found that if I issue a VACUUM, CLUSTER or REINDEX on a read-only standby, the

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 14:30, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 9:22 AM, Thom Brown t...@linux.com wrote: On 9 March 2012 14:09, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 7, 2012 at 4:53 PM, Thom Brown t...@linux.com wrote: I've also since found that if I

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint) with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff()) succeeds. It's also worth committing this patch? Why would it be useful to use pg_size_pretty on

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:37 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint) with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff()) succeeds. It's also worth

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:35 AM, Thom Brown t...@linux.com wrote: I see your point.  My suggestion to Dimitri in another email was either enable triggers for all commands or none.  At the moment it's only available on utility commands. Yeah, that's clearly not the best of all possible worlds.

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-09 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: (2012/03/09 14:00), Tom Lane wrote: Attached is a draft patch for that. 1. FilefdwPlanState.pages and FileFdwPlanState.ntuples seems redundant. Why not use RelOptInfo.pages and RelOptInfo.tuples? I intentionally avoided setting

Re: [HACKERS] logging in high performance systems.

2012-03-09 Thread Robert Haas
On Wed, Nov 23, 2011 at 9:28 PM, Theo Schlossnagle je...@omniti.com wrote: We have a need for logging in systems where it isn't feasible to log to disk as it negatively impacts performance. I'd like to be able to creatively solve this problem without modifying the core, but today I cannot.

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
I wrote: Fujii Masao masao.fu...@gmail.com writes: Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint) with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff()) succeeds. It's also worth committing this patch? Why would it be useful to use

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:37 AM, Tom Lane t...@sss.pgh.pa.us wrote: Why would it be useful to use pg_size_pretty on xlog locations? The point is that it would be useful to use it on the difference between two xlog locations, Um, that is exactly the

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 14:47, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 9:35 AM, Thom Brown t...@linux.com wrote: I see your point.  My suggestion to Dimitri in another email was either enable triggers for all commands or none.  At the moment it's only available on utility

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:22 AM, Thom Brown t...@linux.com wrote: Sorry, I meant any command trigger.  It's because none of the commands can be run on a standby, so the triggers don't seem appropriate. I'm not convinced. Right now, it's fairly useless

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 15:05, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:22 AM, Thom Brown t...@linux.com wrote: Sorry, I meant any command trigger.  It's because none of the commands can be run on a standby, so the triggers don't seem

[HACKERS] pg_upgrade and umask

2012-03-09 Thread Bruce Momjian
What do people think of pg_upgrade setting its umask to 0077 so the log and SQL files are only readable by the postgres user? -rwx-- 1 postgres postgres 41 Mar 9 09:59 delete_old_cluster.sh* -rw--- 1 postgres postgres 6411 Mar 8 21:56 pg_upgrade_dump_all.sql -rw--- 1

Re: [HACKERS] pg_upgrade and umask

2012-03-09 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: What do people think of pg_upgrade setting its umask to 0077 so the log and SQL files are only readable by the postgres user? +1 for restricting the log files, but I'm dubious that you should alter the existing permissions on copied files in any way. IOW,

Re: [HACKERS] pg_upgrade and umask

2012-03-09 Thread Peter Eisentraut
On fre, 2012-03-09 at 10:10 -0500, Bruce Momjian wrote: What do people think of pg_upgrade setting its umask to 0077 so the log and SQL files are only readable by the postgres user? That would be good to have. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] pg_upgrade and umask

2012-03-09 Thread Bruce Momjian
On Fri, Mar 09, 2012 at 10:18:31AM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: What do people think of pg_upgrade setting its umask to 0077 so the log and SQL files are only readable by the postgres user? +1 for restricting the log files, but I'm dubious that you should

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 10:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:22 AM, Thom Brown t...@linux.com wrote: Sorry, I meant any command trigger.  It's because none of the commands can be run on a standby, so the triggers don't

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Fujii Masao masao.fu...@gmail.com writes: Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint) with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff()) succeeds. It's

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes:  https://github.com/klando/pgfincore Oh, huh. I had no idea that pgfincore could do that. I thought that was just for introspection; I didn't realize it could actually move data around for you. Well, I though Cédric already had included shared

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-09 Thread Kohei KaiGai
2012/3/6 Alvaro Herrera alvhe...@commandprompt.com: It seems to me that the only thing that needs core support is the ability to start up the daemon when postmaster is ready to accept queries, and shut the daemon down when postmaster kills backends (either because one crashed, or because it's

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: Actually ... now that I look at it, isn't it completely bogus to be using numeric for the result of pg_xlog_location_diff? rhaas=# select pg_xlog_location_diff('/0',

Re: [HACKERS] pg_upgrade and umask

2012-03-09 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: The problem is that these files are being created often by shell redirects, e.g. pg_dump -f out 2 log_file. There is no clean way to control the file creation permissions in this case --- only umask gives us a process-level setting. Actually, one

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 10:33 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: So that's complementary with pgfincore, ok.  I still wish we could maintain the RAM content HOT on the standby in the same way we are able to maintain its data set on disk, though. That's an interesting idea. It

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Jeff Janes
On Fri, Mar 9, 2012 at 5:21 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 5:24 AM, Fujii Masao masao.fu...@gmail.com wrote: When a relation is loaded into cache, are corresponding indexes also loaded at the same time? No, although if you wanted to do that you could

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-09 Thread Merlin Moncure
On Fri, Mar 9, 2012 at 9:36 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: 2012/3/6 Alvaro Herrera alvhe...@commandprompt.com: It seems to me that the only thing that needs core support is the ability to start up the daemon when postmaster is ready to accept queries, and shut the daemon down when

Re: [HACKERS] pg_upgrade and umask

2012-03-09 Thread Bruce Momjian
On Fri, Mar 09, 2012 at 10:41:53AM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: The problem is that these files are being created often by shell redirects, e.g. pg_dump -f out 2 log_file. There is no clean way to control the file creation permissions in this case --- only

Re: [HACKERS] pg_prewarm

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 10:53 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Mar 9, 2012 at 5:21 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 5:24 AM, Fujii Masao masao.fu...@gmail.com wrote: When a relation is loaded into cache, are corresponding indexes also loaded

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-09 Thread David E. Wheeler
On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote: 100% agree (having re-read the thread and Alvaro's idea having sunk in). Being able to set up daemon processes side by side with the postmaster would fit the bill nicely. It's pretty interesting to think of all the places you could go with

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Magnus Hagander
On Fri, Mar 9, 2012 at 16:37, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 9:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: Actually ... now that I look at it, isn't it completely bogus to be using numeric for the result of

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Magnus Hagander
On Fri, Mar 9, 2012 at 15:37, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint) with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff()) succeeds. It's also worth

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Fri, Mar 9, 2012 at 15:37, Tom Lane t...@sss.pgh.pa.us wrote: Why would it be useful to use pg_size_pretty on xlog locations? -1 because of the large expense of bigint-numeric-whatever conversion that would be added to existing uses. Given the

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I'm not convinced. Right now, it's fairly useless - all the triggers could possibly do is throw an error, and an error is going to get thrown anyway, so it's only a question of which error message the user will see. But we discussed before the idea

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Magnus Hagander
On Fri, Mar 9, 2012 at 18:18, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Fri, Mar 9, 2012 at 15:37, Tom Lane t...@sss.pgh.pa.us wrote: Why would it be useful to use pg_size_pretty on xlog locations? -1 because of the large expense of

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I think we had better look seriously at postponing this patch to 9.3. I understand why you're drawing that conclusion, but I don't think that's the best we can do here, by a long shot. Your reviewing is obviously moving things forward rapidly, but I

Re: [HACKERS] check function patch

2012-03-09 Thread Pavel Stehule
Hello Alvaro here is new version - merged Peter's doc changes. I created a new header functioncmds.h. This file contains lines related to checker only. I didn't want to unclean this patch by header files reorganization. Regards Pavel 2012/3/8 Pavel Stehule pavel.steh...@gmail.com: Hello

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 12:38 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Mar 9, 2012 at 18:18, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Fri, Mar 9, 2012 at 15:37, Tom Lane t...@sss.pgh.pa.us wrote: Why would it be useful to use pg_size_pretty

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheeler da...@justatheory.com wrote: On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote: 100% agree  (having re-read the thread and Alvaro's idea having sunk in).  Being able to set up daemon processes side by side with the postmaster would fit the bill

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-09 Thread Andrew Dunstan
On 03/09/2012 01:40 PM, Robert Haas wrote: On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheelerda...@justatheory.com wrote: On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote: 100% agree (having re-read the thread and Alvaro's idea having sunk in). Being able to set up daemon processes side by

[HACKERS] Rules containing INSERT/UPDATE lack dependencies on target columns

2012-03-09 Thread Tom Lane
I looked into the misbehavior reported here: http://archives.postgresql.org/pgsql-bugs/2012-03/msg00068.php The reason the ALTER TABLE fails to fail is $SUBJECT: it goes looking for pg_depend entries showing that rewrite rules depend on the column to be altered, but there isn't one. This is

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 12:51 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I think we had better look seriously at postponing this patch to 9.3. I understand why you're drawing that conclusion, but I don't think that's the best we can do here, by

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Peter Eisentraut
On fre, 2012-03-09 at 18:13 +0100, Magnus Hagander wrote: and confusing XLogFileSize with XLogSegSize. Not the best choice of names. Yeah, the use of XLogFile to mean something other than, well a file in the xlog, is greatly annoying.. I guess we could change it, but it goes pretty deep

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Yeah, the use of XLogFile to mean something other than, well a file in the xlog, is greatly annoying.. I guess we could change it, but it goes pretty deep in the system so it's not a small change... The whole thing was built around the lack of 64 bit

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Yeah, the use of XLogFile to mean something other than, well a file in the xlog, is greatly annoying.. I guess we could change it, but it goes pretty deep in the system so it's not a

Re: [HACKERS] Rules containing INSERT/UPDATE lack dependencies on target columns

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm inclined to only fix this in HEAD. +1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: The whole thing was built around the lack of 64 bit integers. If we bit the bullet and changed the whole thing to be just a single 64-bit counter, we could probably delete thousands of lines of code. Hm. I

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:34 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 2:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Yeah, the use of XLogFile to mean something other than, well a file in the xlog, is greatly annoying.. I guess we

Re: [HACKERS] [v9.2] sepgsql's DROP Permission checks

2012-03-09 Thread Robert Haas
On Sat, Feb 4, 2012 at 10:54 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: OK, I modified the patch according to your suggestions. object_access_hook was extended to take an argument of void * pointer, and InvokeObjectAccessHook was also allows to deliver it. Sorry for the long radio silence on

[HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Well, if you get to the point where you're done churning the code in the next week or so, I'm willing to do one or two more rounds of serious review, but if that doesn't get us there then I think we need to give up. The energy you've put into this is

Re: [HACKERS] RFC: Making TRUNCATE more MVCC-safe

2012-03-09 Thread Simon Riggs
On Fri, Mar 9, 2012 at 3:46 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 7, 2012 at 5:41 PM, Simon Riggs si...@2ndquadrant.com wrote: Case #2 is certainly a problem for FrozenXID as well, because anything that's marked with FrozenXID is going to look visible to everybody, including

Re: [HACKERS] Avoiding shutdown checkpoint at failover

2012-03-09 Thread Simon Riggs
On Thu, Mar 8, 2012 at 1:20 PM, Robert Haas robertmh...@gmail.com wrote: Are we still considering trying to do this for 9.2?  Seems it's been over a month without a new patch, and it's not entirely clear that we know what the design should be. It's important, but not ready. --  Simon Riggs  

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 2:34 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 2:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hm.  I think thousands is an overestimate, but yeah the logic could be greatly simplified.  However, I'm not

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: This is a fair position, but I think it's a bit unfair to be applying such pressure to just the command-triggers patch and not all the other open issues.  Hence, $SUBJECT: is it time to start forcing this commitfest to a

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-09 Thread Yeb Havinga
On 2012-03-06 15:14, Kohei KaiGai wrote: In case of sepgsql_setcon() being invoked with null argument to reset security label of the client, but not committed yet, the last item of the client_label_pending has null label. (It performs as a mark of a security label being reset.) Yes, I see that

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Peter Eisentraut
On tor, 2012-03-08 at 23:15 +0100, Pavel Stehule wrote: But you propose some little bit different than is current plpgsql checker and current design. Is it? Why? It looks like exactly the same thing, except that the interfaces you propose are tightly geared toward checking SQL-like languages,

Re: [HACKERS] RFC: Making TRUNCATE more MVCC-safe

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:59 PM, Simon Riggs si...@2ndquadrant.com wrote: On Fri, Mar 9, 2012 at 3:46 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 7, 2012 at 5:41 PM, Simon Riggs si...@2ndquadrant.com wrote: Case #2 is certainly a problem for FrozenXID as well, because anything

Re: [HACKERS] xlog location arithmetic

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 3:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 2:34 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 2:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hm.  I think thousands is an overestimate,

Re: [HACKERS] Avoiding shutdown checkpoint at failover

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 3:00 PM, Simon Riggs si...@2ndquadrant.com wrote: On Thu, Mar 8, 2012 at 1:20 PM, Robert Haas robertmh...@gmail.com wrote: Are we still considering trying to do this for 9.2?  Seems it's been over a month without a new patch, and it's not entirely clear that we know

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Peter Eisentraut
On tor, 2012-03-08 at 19:19 -0500, Robert Haas wrote: On Thu, Mar 8, 2012 at 4:54 PM, Peter Eisentraut pete...@gmx.net wrote: * It's not terribly important to me to be able to run checkers separately. If I wanted to do that, I would just disable or remove the checker.

Re: [HACKERS] [v9.2] sepgsql's DROP Permission checks

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 2:41 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Feb 4, 2012 at 10:54 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: OK, I modified the patch according to your suggestions. object_access_hook was extended to take an argument of void * pointer, and

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 3:15 PM, Peter Eisentraut pete...@gmx.net wrote: On tor, 2012-03-08 at 19:19 -0500, Robert Haas wrote: On Thu, Mar 8, 2012 at 4:54 PM, Peter Eisentraut pete...@gmx.net wrote:      * It's not terribly important to me to be able to run checkers        separately.  If I

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: There's been very little patch review going on, with a couple of notable exceptions like Thom and Noah, and not a lot of new patch versions from patch authors either, again with a few exceptions, like Dimitri. So it's not terribly surprising that

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 3:15 PM, Peter Eisentraut pete...@gmx.net wrote: Well, the more I think about it and look at this patch, the more I think that this would be complete overkill and possibly quite useless for my purposes.  I can implement the

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Just to be clear, it wasn't my intention to hold command triggers specifically to a different standard - but I do differentiate between small patches and big patches. Small patches that someone can get committed with an hour's worth of review can be

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-09 Thread Robert Haas
On Tue, Mar 6, 2012 at 9:14 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: [ new patch ] Are we absolutely certain that we want the semantics of sepgsql_setcon() to be transactional? Because if we made them non-transactional, this would be a whole lot simpler, and it would still meet the

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Pavel Stehule
2012/3/9 Peter Eisentraut pete...@gmx.net: On tor, 2012-03-08 at 23:15 +0100, Pavel Stehule wrote: But you propose some little bit different than is current plpgsql checker and current design. Is it?  Why?  It looks like exactly the same thing, except that the interfaces you propose are

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2012/3/9 Peter Eisentraut pete...@gmx.net: What would be the qualifications for being an internal or an external checker? Why couldn't your plpgsql checker be an external checker? plpgsql checker cannot be external checker, because it reuse 70%

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 3:40 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: I share your view here, and in fact the code for the patch has been updated in only two ways since 1/15: adding support for new commands and reacting to review (refactoring, cleaning, features removal, fix the

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 3:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: If we're going to go the ad-hoc route, there seems little reason to be considering a core patch at all.  Freestanding checkers could just as well be independent projects. I completely agree. I think there is little reason to

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-09 Thread Andres Freund
On Friday, March 09, 2012 10:13:15 PM Robert Haas wrote: If people are tired of working on the CommitFest, they're not going to get reinvigorated just because we let it go on for another month. On that line: From Sundway onwards I do have time again to do reviewing. I am not anybody is doing

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Pavel Stehule
2012/3/9 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2012/3/9 Peter Eisentraut pete...@gmx.net: What would be the qualifications for being an internal or an external checker?  Why couldn't your plpgsql checker be an external checker? plpgsql checker cannot be

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 5:09 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Well, that just means that it'd be a good idea for that function to be supplied by the same shared library that supplies the plpgsql execution functions.  There wouldn't need to be any connection that the core system

[HACKERS] pg_crypto failures with llvm on OSX

2012-03-09 Thread Andrew Dunstan
Buildfarm member mussel (OS X 10.7.3, llvm-gcc 4.2.1, x86_64)seems to be getting consistent warnings when running the pgcrypto regression tests, that look like this: WARNING: detected write past chunk end in ExprContext 0x7fec2b11eb58 Does anyone have an idea why that might be? cheers

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Pavel Stehule
2012/3/9 Robert Haas robertmh...@gmail.com: On Fri, Mar 9, 2012 at 5:09 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Well, that just means that it'd be a good idea for that function to be supplied by the same shared library that supplies the plpgsql execution functions.  There wouldn't

Re: [HACKERS] Publish checkpoint timing and sync files summary data to pg_stat_bgwriter

2012-03-09 Thread Robert Haas
On Wed, Feb 22, 2012 at 2:11 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: One beef that I have with the variable name m_write_ms is that ms could equally well refer to microseconds or milliseconds, and these mistakes are very common. I would expect ms to mean milliseconds and us to mean

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Robert Haas
On Fri, Mar 9, 2012 at 5:31 PM, Pavel Stehule pavel.steh...@gmail.com wrote: ok - it has sense, but it has sense only with some smart statements (like CHECK). Without these statements I have to directly call checker function and then  concept of generalised checkers has not sense. I agree. --

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-09 Thread Marko Kreen
On Fri, Mar 09, 2012 at 05:28:20PM -0500, Andrew Dunstan wrote: Buildfarm member mussel (OS X 10.7.3, llvm-gcc 4.2.1, x86_64)seems to be getting consistent warnings when running the pgcrypto regression tests, that look like this: WARNING: detected write past chunk end in ExprContext

Re: [HACKERS] Command Triggers, patch v11

2012-03-09 Thread Thom Brown
On 9 March 2012 21:38, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Hi, Please find attached v15 of the patch, addressing all known issues apart from the trigger function argument passing style. Expect a new patch with that taken care of early next week.  (The github branch too, should

Re: [HACKERS] NULL's support in SP-GiST

2012-03-09 Thread Tom Lane
Oleg Bartunov o...@sai.msu.su writes: attached patch introduces NULLs indexing for SP-GiST. With this patch Sp-GiST supports IS NULL, IS NOT NULL clauses, as well as full index scan. I've looked at this patch a bit. I share Jaime's extreme discomfort with re-using GIN code to handle some pages

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Peter Eisentraut
On fre, 2012-03-09 at 21:54 +0100, Pavel Stehule wrote: no, you can check any PL language - and output result is based on SQL Errors, so it should be enough for all PL too. But then I would have to map all language-specific error reports to some SQL error scheme, which is not only cumbersome

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-09 Thread Peter Eisentraut
On fre, 2012-03-09 at 15:33 -0500, Tom Lane wrote: What I've wanted from this patch from the beginning was a common framework. That is, I want to be able to write something like SELECT check_function(oid) FROM pg_proc WHERE proowner = 'tgl' and have it just work for all languages for

  1   2   >