Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Vik Reykja
On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped.

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 17:41:50 +1300, Mark Kirkwood wrote: On 15/01/13 17:37, Mark Kirkwood wrote: On 15/01/13 14:38, Andres Freund wrote: Hi everyone, Here is the newest version of logical changeset generation. I'm quite interested in this feature - so tried applying the 19 patches to

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 01:00:00 -0300, Alvaro Herrera wrote: Andres Freund wrote: I've been giving a couple of these parts a look. In particular [03] Split out xlog reading into its own module called xlogreader Cleaned this one up a bit last week. I will polish it some more, publish for some

[HACKERS] Re: [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

2013-01-15 Thread Andres Freund
On 2013-01-14 22:26:39 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-14 20:39:05 -0500, Peter Eisentraut wrote: On Tue, 2013-01-15 at 00:29 +0100, Andres Freund wrote: Independently from this patch, should we add -Wtype-limits to the default parameters?

Re: [HACKERS] replace plugins directory with GUC

2013-01-15 Thread Peter Eisentraut
On Tue, 2012-10-09 at 20:45 -0400, Peter Eisentraut wrote: About that plugins directory ($libdir/plugins) ... I don't think we ever really got that to work sensibly. I don't remember the original design discussion, but I have seen a number of explanations offered over the years. It's not

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Alvaro Herrera
Vik Reykja escribió: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Alvaro Herrera
Andres Freund wrote: On 2013-01-15 01:00:00 -0300, Alvaro Herrera wrote: Andres Freund wrote: I've been giving a couple of these parts a look. In particular [03] Split out xlog reading into its own module called xlogreader Cleaned this one up a bit last week. I will polish it

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 09:56:41 -0300, Alvaro Herrera wrote: Andres Freund wrote: On 2013-01-15 01:00:00 -0300, Alvaro Herrera wrote: Andres Freund wrote: I've been giving a couple of these parts a look. In particular [03] Split out xlog reading into its own module called xlogreader

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Greg Stark
On Tue, Jan 15, 2013 at 2:33 AM, Stephen Frost sfr...@snowman.net wrote: * Peter Eisentraut (pete...@gmx.net) wrote: On 1/14/13 11:28 AM, Stephen Frost wrote: While there is no option currently for having the server do the compression before sending the data over the wire. OpenSSL? To be

Re: [HACKERS] another idea for changing global configuration settings from SQL

2013-01-15 Thread Peter Eisentraut
On 11/15/12 12:53 PM, Peter Eisentraut wrote: We already have the ability to store in pg_db_role_setting configuration settings for specific user, specific database specific user, any database any user, specific database The existing infrastructure would also support any user, any

[HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-15 Thread Heikki Linnakangas
Now that a standby server can follow timeline switches through streaming replication, we should do teach pg_receivexlog to do the same. Patch attached. I made one change to the way START_STREAMING command works, to better support this. When a standby server reaches the timeline it's streaming

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Alvaro Herrera escribió: Kohei KaiGai escribió: I'm probably saying same idea. It just adds invocation of external functions to check naming conflicts of functions or collation; that takes additional 4-lines for special case handling in AlterObjectNamespace_internal(). Okay, I can

Re: [HACKERS] system administration functions with hardcoded superuser checks

2013-01-15 Thread Peter Eisentraut
On 12/18/12 12:09 PM, Peter Eisentraut wrote: There are some system administration functions that have hardcoded superuser checks, specifically: pg_reload_conf pg_rotate_logfile pg_read_file pg_read_file_all pg_read_binary_file pg_read_binary_file_all pg_stat_file pg_ls_dir Some of

Re: [HACKERS] strange OOM errors with EXECUTE in PL/pgSQL

2013-01-15 Thread Jan Wieck
On 12/20/2012 4:47 PM, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: The reason this fails is that you've got a half-megabyte source string, and each of the 11000 plans that are due to be created from it saves its own copy of the source string. Hence, 5500 megabytes needed just

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Kohei KaiGai
2013/1/15 Alvaro Herrera alvhe...@2ndquadrant.com: Alvaro Herrera escribió: Kohei KaiGai escribió: I'm probably saying same idea. It just adds invocation of external functions to check naming conflicts of functions or collation; that takes additional 4-lines for special case handling in

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Claudio Freire
On Mon, Jan 14, 2013 at 11:33 PM, Stephen Frost sfr...@snowman.net wrote: Now, protocol-level on-the-wire compression is another option, but there's quite a few drawbacks to that and quite a bit of work involved. Having support for COPY-based compression could be an answer for many cases

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Kohei KaiGai escribió: 2013/1/15 Alvaro Herrera alvhe...@2ndquadrant.com: Alvaro Herrera escribió: Kohei KaiGai escribió: I'm probably saying same idea. It just adds invocation of external functions to check naming conflicts of functions or collation; that takes additional 4-lines

Re: [HACKERS] ALTER command reworks

2013-01-15 Thread Alvaro Herrera
Kohei KaiGai escribió: The attached patch is a rebased version towards the latest master branch, and fix up the issue around error messages on name conflicts. I assume the lock.c changes are just a bollixed merge, right? I am not sure about some of the changes in the regression test expected

Re: [HACKERS] strange OOM errors with EXECUTE in PL/pgSQL

2013-01-15 Thread Tom Lane
Jan Wieck janwi...@yahoo.com writes: On 12/20/2012 4:47 PM, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: The reason this fails is that you've got a half-megabyte source string, and each of the 11000 plans that are due to be created from it saves its own copy of the source

Re: [HACKERS] replace plugins directory with GUC

2013-01-15 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Here is a patch, with some_clever_name = user_loadable_libraries. Shouldn't user_loadable_libraries be PGC_SUSET? PGC_SIGHUP is typically used when the same setting must apply in all active sessions, but it's not clear why such a restriction must be made

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Peter Eisentraut
On 1/13/13 9:16 PM, Stephen Frost wrote: On top of this I plan to submit a trivial patch to add support for this to file_fdw, allowing creation of FDW tables which operate directly on compressed files (including CSVs, which is what I need this patch for). I've also begun working on

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribió: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? I disagree that we should

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-15 09:56:41 -0300, Alvaro Herrera wrote: Oh, hm. Maybe the contrib module's make installcheck, then? Thats what I do right now, but I really would prefer to have it checked during normal make checks, installchecks aren't run all that

Re: [HACKERS] ALTER command reworks

2013-01-15 Thread Kohei KaiGai
2013/1/15 Alvaro Herrera alvhe...@2ndquadrant.com: Kohei KaiGai escribió: The attached patch is a rebased version towards the latest master branch, and fix up the issue around error messages on name conflicts. I assume the lock.c changes are just a bollixed merge, right? Yes, I'll check it

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 10:28:28 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-15 09:56:41 -0300, Alvaro Herrera wrote: Oh, hm. Maybe the contrib module's make installcheck, then? Thats what I do right now, but I really would prefer to have it checked during

Re: [HACKERS] ALTER command reworks

2013-01-15 Thread Alvaro Herrera
Kohei KaiGai escribió: 2013/1/15 Alvaro Herrera alvhe...@2ndquadrant.com: Kohei KaiGai escribió: The attached patch is a rebased version towards the latest master branch, and fix up the issue around error messages on name conflicts. I assume the lock.c changes are just a bollixed

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-15 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: On Mon, Jan 14, 2013 at 4:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Johnston pol...@yahoo.com writes: SELECT *; Results in: SQL Error: ERROR: SELECT * with no tables specified is not valid Interesting to note that SELECT * FROM

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Peter Eisentraut
On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had forgotten to mention that. Since it's already the behavior for start, another option would be to just make it

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Peter Eisentraut
On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but people didn't like that either. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Peter Eisentraut (pete...@gmx.net) wrote: Operating on compressed files transparently in file_fdw is obviously useful, but why only gzip? This isn't really an argument, imv. It's only gzip *right this moment* because that's all that I implemented. I've already offered to add bzip2 or

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-15 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: On Mon, Jan 14, 2013 at 10:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think this is unacceptable on its face. It essentially supposes that relcache entries are reliable storage. They are not. Would it be acceptable if we inverted the meaning of

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Andres Freund
On 2013-01-14 22:56:47 +0100, Andres Freund wrote: On 2013-01-14 22:50:16 +0100, Andres Freund wrote: On 2013-01-14 16:35:48 -0500, Tom Lane wrote: Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had forgotten to mention that. Since it's already the behavior for

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Claudio Freire (klaussfre...@gmail.com) wrote: Postgres' packetized protocol lends itself quite well for this kind of thing. It could even be done on a packet-by-packet basis. The only drawback I see, is that it pretty much rules out piping through arbitrary commands (a protocol needs to be

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: But the other part of the problem is hiding in the unfortunately removed part of the problem description - the tests require the non-default options wal_level=logical and max_logical_slots=3+. Oh. Well, that's not going to work. Is there a

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-14 16:35:48 -0500, Tom Lane wrote: Another thing is that dugong has been reproducibly failing with drop cascades to table testschema.atable -- Should succeed DROP TABLESPACE testspace; + ERROR: tablespace testspace is not empty

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 11:10:22 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: But the other part of the problem is hiding in the unfortunately removed part of the problem description - the tests require the non-default options wal_level=logical and max_logical_slots=3+. Oh.

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Andrew Dunstan
On 01/15/2013 11:04 AM, Andres Freund wrote: Could the buildfarm owner perhaps tell us which files are left in the tablespace 'testspace'? They will not be able to easily - the workspace is normally cleared out at the end of each run. cheers andrew -- Sent via pgsql-hackers mailing

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Andres Freund
On 2013-01-15 11:19:28 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-14 16:35:48 -0500, Tom Lane wrote: Another thing is that dugong has been reproducibly failing with drop cascades to table testschema.atable -- Should succeed DROP TABLESPACE

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-15 11:10:22 -0500, Tom Lane wrote: I think the only reasonable way to handle this would be to (1) make make installcheck a no-op in this contrib module, and (2) make make check work, being careful to start the test postmaster with the

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Interestingly the compiler couldn't deduce that e.g. DateTimeParseError() didn't return with the old ereport definition but it can with the new one which seems strange. Oooh, I hadn't noticed that. I guess that must indicate that this version of

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Andrew Dunstan
On 01/15/2013 11:57 AM, Tom Lane wrote: Well, it could be quite reproducible, if for example what's happening is that the DROP is failing to wait for the checkpointer at all. Is there a way to enable log_checkpoints during a buildfarm run? It'd be good to get timestamps added to the postmaster

Re: [HACKERS] Curious buildfarm failures

2013-01-15 Thread Andrew Dunstan
On 01/15/2013 12:07 PM, Andrew Dunstan wrote: On 01/15/2013 11:57 AM, Tom Lane wrote: Well, it could be quite reproducible, if for example what's happening is that the DROP is failing to wait for the checkpointer at all. Is there a way to enable log_checkpoints during a buildfarm run? It'd

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Claudio Freire
On Tue, Jan 15, 2013 at 1:08 PM, Stephen Frost sfr...@snowman.net wrote: Where it does work well is when you move into a bulk-data mode (ala COPY) and can compress relatively large amounts of data into a smaller number of full-size packets to be sent. Well... exactly. COPY is one case, big

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Garick Hamlin
On Tue, Jan 15, 2013 at 01:35:57PM +, Greg Stark wrote: On Tue, Jan 15, 2013 at 2:33 AM, Stephen Frost sfr...@snowman.net wrote: * Peter Eisentraut (pete...@gmx.net) wrote: On 1/14/13 11:28 AM, Stephen Frost wrote: While there is no option currently for having the server do the

Re: [HACKERS] Curious buildfarm failures (fwd)

2013-01-15 Thread Sergey Koposov
Hi, Date: Tue, 15 Jan 2013 11:57:07 -0500 From: Tom Lane t...@sss.pgh.pa.us To: Andres Freund and...@2ndquadrant.com Cc: m...@sai.msu.ru, pgsql-hackers@postgreSQL.org, Andrew Dunstan and...@dunslane.net Subject: Re: Curious buildfarm failures Well, it could be quite reproducible, if for

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Claudio Freire (klaussfre...@gmail.com) wrote: On Tue, Jan 15, 2013 at 1:08 PM, Stephen Frost sfr...@snowman.net wrote: Where it does work well is when you move into a bulk-data mode (ala COPY) and can compress relatively large amounts of data into a smaller number of full-size packets to

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Heikki Linnakangas
On 15.01.2013 08:54, Jeevan Chalke wrote: For (2), I have added a new function called, GetXLogRecPtrForUnloogedRel() which returns a fake LSN for GiST indexes. However, I have removed GetXLogRecPtrForTemp() function and added its functionality inside this new function itself to avoid complexity.

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Alvaro Herrera
Andres Freund wrote: On 2013-01-15 09:56:41 -0300, Alvaro Herrera wrote: Andres Freund wrote: On 2013-01-15 01:00:00 -0300, Alvaro Herrera wrote: Andres Freund wrote: I've been giving a couple of these parts a look. In particular [03] Split out xlog reading into its

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Robert Haas escribió: The recent SET SCHEMA refactoring has changed the error message that you get when trying to move a function into the schema that already contains it. I have committed 7ac5760fa2 which should fix this. Thanks for the report. -- Álvaro Herrera

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-15 Thread Fujii Masao
On Tue, Jan 15, 2013 at 11:05 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Now that a standby server can follow timeline switches through streaming replication, we should do teach pg_receivexlog to do the same. Patch attached. I made one change to the way START_STREAMING command

Re: [HACKERS] logical changeset generation v4

2013-01-15 Thread Andres Freund
On 2013-01-15 15:16:44 -0300, Alvaro Herrera wrote: Andres Freund wrote: On 2013-01-15 09:56:41 -0300, Alvaro Herrera wrote: Andres Freund wrote: On 2013-01-15 01:00:00 -0300, Alvaro Herrera wrote: Andres Freund wrote: I've been giving a couple of these parts a look. In

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 15.01.2013 08:54, Jeevan Chalke wrote: For (2), I have added a new function called, GetXLogRecPtrForUnloogedRel() which returns a fake LSN for GiST indexes. However, I have removed GetXLogRecPtrForTemp()

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Heikki Linnakangas
On 15.01.2013 20:33, Robert Haas wrote: On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas Could we stash the counter e.g. in the root page of the index? That would require maintaining a counter per table rather than a single global counter, which would be bad because then we'd need to store

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Could we stash the counter e.g. in the root page of the index? That would require maintaining a counter per table rather than a single global counter, which would be

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 10:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: On Mon, Jan 14, 2013 at 10:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think this is unacceptable on its face. It essentially supposes that relcache entries are reliable storage.

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 1:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Could we stash the counter e.g. in the root page of the index? That would require maintaining a

Re: [HACKERS] pg_retainxlog for inclusion in 9.3?

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 2:51 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jan 14, 2013 at 5:56 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 4, 2013 at 4:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Mostly that it seems

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Heikki Linnakangas
On 15.01.2013 20:48, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Could we stash the counter e.g. in the root page of the index? That would require maintaining a counter per table rather than a

Re: [HACKERS] Curious buildfarm failures (fwd)

2013-01-15 Thread Andres Freund
On 2013-01-15 17:27:50 +, Sergey Koposov wrote: Hi, Date: Tue, 15 Jan 2013 11:57:07 -0500 From: Tom Lane t...@sss.pgh.pa.us To: Andres Freund and...@2ndquadrant.com Cc: m...@sai.msu.ru, pgsql-hackers@postgreSQL.org, Andrew Dunstan and...@dunslane.net Subject: Re: Curious buildfarm

Re: [HACKERS] json api WIP patch

2013-01-15 Thread David Fetter
On Mon, Jan 14, 2013 at 07:52:56PM -0500, Andrew Dunstan wrote: On 01/14/2013 07:36 PM, Merlin Moncure wrote: While testing this I noticed that integer based 'get' routines are zero based -- was this intentional? Virtually all other aspects of SQL are 1 based: postgres=# select

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Andres Freund
On 2013-01-15 20:58:00 +0200, Heikki Linnakangas wrote: On 15.01.2013 20:48, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Tue, Jan 15, 2013 at 1:10 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Could we stash the counter e.g. in the root page of the index? That

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On the third hand, the fact that a table is OCDR is recorded in backend-local storage somewhere, and that storage (unlike the relcache) had better be reliable. So maybe there's some way to finesse it that way. Hm, keep a flag in that storage you

Re: [HACKERS] Curious buildfarm failures (fwd)

2013-01-15 Thread Sergey Koposov
On Tue, 15 Jan 2013, Andres Freund wrote: Any chance you could run make check again but with log_statement=all and log_min_messages=debug2? That might tell us a bit more, whether the dependency code doesn't work right or whether the checkpoint is doing strange things. Here it is : 2013-01-15

Re: [HACKERS] buffer assertion tripping under repeat pgbench load

2013-01-15 Thread Bruce Momjian
On Sun, Jan 13, 2013 at 12:34:07AM -0500, Greg Smith wrote: On 12/26/12 7:23 PM, Greg Stark wrote: It's also possible it's a bad cpu, not bad memory. If it affects decrement or increment in particular it's possible that the pattern of usage on LocalRefCount is particularly prone to triggering

[HACKERS] pkg-config files for libpq and ecpg

2013-01-15 Thread Peter Eisentraut
I'll take another stab at providing pkg-config files for the client-side libraries. The main reason this time around is that this works a lot better (or at all) for multi-arch library installations. Another is that pkg-config has become a lot smarter and flexible over the years, and it's

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-15 Thread Bruce Momjian
On Mon, Jan 14, 2013 at 10:47:58PM -0500, Gurjeet Singh wrote: Interesting to note that SELECT * FROM table_with_zero_cols does not complain of anything. postgres=# select * from test1; -- (0 rows) This I believe result of the fact that we allow user to drop all columns of a table.

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-15 Thread Bruce Momjian
On Mon, Jan 14, 2013 at 10:25:39PM -0500, Gurjeet Singh wrote: On Mon, Jan 14, 2013 at 3:09 PM, David Johnston pol...@yahoo.com wrote: What does SELECT * FROM dual in Oracle yield? AFAICR, 'dual' table has one column named 'DUMMY' and one row with value, single character X. How

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 10:55:04AM -0500, Stephen Frost wrote: * Peter Eisentraut (pete...@gmx.net) wrote: Operating on compressed files transparently in file_fdw is obviously useful, but why only gzip? This isn't really an argument, imv. It's only gzip *right this moment* because that's

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-15 Thread Shaun Thomas
On 01/15/2013 01:18 PM, Bruce Momjian wrote: AFAICR, 'dual' table has one column named 'DUMMY' and one row with value, single character X. How elegant. :-( Let's see what EnterpriseDB produces: test= select * from dual; dummy --- X (1 row) Yep, elegant gets my vote. ;) But then

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 10:25:23AM -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribi�: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 10:55:41AM -0500, Peter Eisentraut wrote: On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Boszormenyi Zoltan
2013-01-15 20:28 keltezéssel, Bruce Momjian írta: On Tue, Jan 15, 2013 at 10:25:23AM -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribi�: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find

Re: [HACKERS] Curious buildfarm failures (fwd)

2013-01-15 Thread Tom Lane
Sergey Koposov kopo...@ast.cam.ac.uk writes: And I do see the tblspc file left after the finish of make check: tmp_check/data/pg_tblspc/16385/PG_9.3_201212081/16384/16387 Interesting. If the tests are run immediately after initdb, 16387 is the relfilenode assigned to table foo in the

Re: [HACKERS] [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)

2013-01-15 Thread Robert Haas
On Sun, Jan 13, 2013 at 4:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: Basically, the aspects of this that I think are likely to be reproducible wins across different platforms are (a) teaching the compiler that elog(ERROR) doesn't return, and (b)

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-15 Thread Bruce Momjian
On Mon, Jan 14, 2013 at 12:56:37PM -0500, Tom Lane wrote: The reported behavior was that the planner would prefer to sequential-scan the table rather than use the index, even if enable_seqscan=off. I'm not sure what the query looked like, but it could have been something best implemented

Re: [HACKERS] json api WIP patch

2013-01-15 Thread Merlin Moncure
On Tue, Jan 15, 2013 at 1:04 PM, David Fetter da...@fetter.org wrote: On Mon, Jan 14, 2013 at 07:52:56PM -0500, Andrew Dunstan wrote: On 01/14/2013 07:36 PM, Merlin Moncure wrote: While testing this I noticed that integer based 'get' routines are zero based -- was this intentional? Virtually

Re: [HACKERS] passing diff options to pg_regress

2013-01-15 Thread Robert Haas
On Mon, Jan 14, 2013 at 6:57 AM, Peter Eisentraut pete...@gmx.net wrote: I sometimes find it useful to view a regression test difference using other diff options, such as -u -w or more context. There is currently no easy way to accomplish that. I suggest allowing to override the diff options

[HACKERS] Re: [pgsql-cluster-hackers] Save The Date: Cluster-Hackers meeting May 21st

2013-01-15 Thread Josh Berkus
Given last year we didn't have more than 30 mins to spend on logical replication, how much time will we have to discuss non-open source systems? Mostly the idea is to discuss what some of the proprietary systems need from core postgres, especially where it overlaps with what OSS systems need

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: On Tue, Jan 15, 2013 at 10:55:04AM -0500, Stephen Frost wrote: * Peter Eisentraut (pete...@gmx.net) wrote: Operating on compressed files transparently in file_fdw is obviously useful, but why only gzip? This isn't really an argument, imv.

Re: [HACKERS] Get current query in a trigger function

2013-01-15 Thread Robert Haas
On Mon, Jan 14, 2013 at 9:38 PM, Vlad Arkhipov arhi...@dc.baikal.ru wrote: Is there any simple way of getting a query for which a trigger was executed? debug_query_string and ActivePortal-sourceText return the top query when there are nested triggers. I believe - only if the trigger is

[HACKERS] [sepgsql 1/3] add name qualified creation label

2013-01-15 Thread Kohei KaiGai
This patch adds sepgsql the feature of name qualified creation label. Background, on creation of a certain database object, sepgsql assigns a default security label according to the security policy that has a set of rules to determine a label of new object. Usually, a new object inherits its

Re: [HACKERS] [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)

2013-01-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: There are an awful lot of places in our source tree where the error level is fixed. We could invent a new construct, say ereport_error or so, that is just like ereport except that it takes no error-level parameter because it's hard-coded to ERROR.

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-15 Thread Robert Haas
On Sun, Jan 13, 2013 at 4:09 PM, Tom Lane t...@sss.pgh.pa.us wrote: Right, that is the argument for ignoring missing schemas, and I think it is entirely sensible for *search* activities. But allowing *creation* to occur in an indeterminate schema is a horrid idea. But the default search path

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-15 Thread Robert Haas
On Mon, Jan 14, 2013 at 2:07 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane escribió: Alvaro Herrera alvhe...@2ndquadrant.com writes: alvherre=# create extension adminpack; ERROR: permission denied for schema pg_catalog Um. I knew that that module's desire to shove stuff

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-15 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Mon, Jan 14, 2013 at 12:56:37PM -0500, Tom Lane wrote: Remember also that enable_seqscan=off merely adds 1e10 to the estimated cost of seqscans. For sufficiently large tables this is not exactly a hard disable, just a thumb on the scales. But I don't

Re: [HACKERS] json api WIP patch

2013-01-15 Thread Andrew Dunstan
On 01/15/2013 02:47 PM, Merlin Moncure wrote: On Tue, Jan 15, 2013 at 1:04 PM, David Fetter da...@fetter.org wrote: On Mon, Jan 14, 2013 at 07:52:56PM -0500, Andrew Dunstan wrote: On 01/14/2013 07:36 PM, Merlin Moncure wrote: While testing this I noticed that integer based 'get' routines are

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Or perhaps there is some other way to make sure that the user really meant it, like refusing to create in pg_catalog unless the schema name is given explicitly. I kind of like that idea, actually. That does seem attractive at first glance. Did you

Re: [HACKERS] Curious buildfarm failures (fwd)

2013-01-15 Thread Sergey Koposov
On Tue, 15 Jan 2013, Tom Lane wrote: BTW, I just finished trying to reproduce this on an IA64 machine belonging to Red Hat, without success. So that seems to eliminate any possibility of the machine architecture being the trigger issue. The compiler's still a likely cause though. Anybody have

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Christopher Browne
On Tue, Jan 15, 2013 at 2:53 PM, Stephen Frost sfr...@snowman.net wrote: The popen patch doesn't support the '|compression-binary' option through the FE protocol. Even if it did, it would only be available for superusers as we can't allow regular users to run arbitrary commands on the

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 3:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Or perhaps there is some other way to make sure that the user really meant it, like refusing to create in pg_catalog unless the schema name is given explicitly. I kind of like that

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 03:37:07PM -0500, Christopher Browne wrote: On Tue, Jan 15, 2013 at 2:53 PM, Stephen Frost sfr...@snowman.net wrote: The popen patch doesn't support the '|compression-binary' option through the FE protocol. Even if it did, it would only be available for superusers

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 2:26 PM, Shaun Thomas stho...@optionshouse.com wrote: Let's see what EnterpriseDB produces: test= select * from dual; dummy --- X (1 row) Hey, don't blame us. We didn't come up with this bad idea ... just trying to make life easier for those who are used to

[HACKERS] [sepgsql 3/3] Add db_procedure:execute permission checks

2013-01-15 Thread Kohei KaiGai
This patch adds sepgsql support for permission checks almost equivalent to the existing FUNCTION EXECUTE privilege. This feature is constructed on new OAT_FUNCTION_EXEC event type being invoked around pg_proc_aclcheck() except for cases when function's permissions are checked during CREATE or

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Josh Berkus
On 01/15/2013 07:55 AM, Peter Eisentraut wrote: On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but people didn't like

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Robert Haas
On Tue, Jan 15, 2013 at 1:58 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I think what Heikki had in mind was that the copy in the index would be the authoritative one, not some image in shared memory. This'd imply dirtying the root page on every insert, as well as increased

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Christopher Browne (cbbro...@gmail.com) wrote: How about having a pg_filters table in pg_catalog which allows capturing labels and names of known-to-be-safe binary filters: I was considering that (though I was thinking they'd be transformations rather than filters; filter implies that you're

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-15 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: Well, COPY is super-user only, so it seems only useful for FDW, no? We already have lots of user-configuration FDW commands, so I can see adding this one too. COPY is most certainly not superuser-only.. COPY w/ popen, if that popen can call anything,

Re: [HACKERS] json api WIP patch

2013-01-15 Thread Daniel Farina
On Tue, Jan 15, 2013 at 12:17 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/15/2013 02:47 PM, Merlin Moncure wrote: On Tue, Jan 15, 2013 at 1:04 PM, David Fetter da...@fetter.org wrote: On Mon, Jan 14, 2013 at 07:52:56PM -0500, Andrew Dunstan wrote: On 01/14/2013 07:36 PM, Merlin

Re: [HACKERS] unlogged tables vs. GIST

2013-01-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I think that might be acceptable from a performance point of view - after all, if the index is unlogged, you're saving the cost of WAL - but I guess I still prefer a generic solution to this problem (a generalization of GetXLogRecPtrForTemp) rather

  1   2   >