Re: [HACKERS] logical changeset generation v3

2012-11-16 Thread Andrea Suisani
Il 16/11/2012 05:34, Michael Paquier ha scritto: Do you have a git repository or something where all the 14 patches are applied? I would like to test the feature globally. Sorry I recall that you put a link somewhere but I cannot remember its email...

Re: [HACKERS] Timing events WIP v1

2012-11-16 Thread Craig Ringer
On 11/16/2012 02:26 AM, Josh Berkus wrote: Extending this to save the key/value set and most of the other data I mentioned before is pretty straightforward. Why not use Hstore? Seriously? The only issue I see is that hstore's text format is non-standard, not widely understood and a pain to

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-16 Thread Cédric Villemain
Le vendredi 16 novembre 2012 07:16:09, Amit Kapila a écrit : On Thursday, November 15, 2012 11:28 PM Cédric Villemain wrote: Le jeudi 15 novembre 2012 15:48:14, Amit kapila a écrit : On Wednesday, November 14, 2012 12:24 AM Robert Haas wrote: On Mon, Nov 12, 2012 at 10:59 PM, Amit

Re: [HACKERS] support for LDAP URLs

2012-11-16 Thread Albe Laurenz
Robert Haas wrote: Here is a patch to support RFC 2255 LDAP URLs in pg_hba.conf. I think this is broadly reasonable, but I'm not sure this part is a good idea: +#ifdef USE_LDAP +#ifndef WIN32 +/* We use a deprecated function to keep the codepath the same as win32. */ +#define

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Simon Riggs
On 15 November 2012 23:12, Simon Riggs si...@2ndquadrant.com wrote: We need detailed stats that allow many people to make their own tests and to report on what they find. To work out how to proceed we need * wait event times on clog accesses at table-level * numbers of blocks dirtied by hint

[HACKERS] proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2012-11-16 Thread Pavel Stehule
Hello I found so we doesn't have functionality for simply text aligning - so I propose support width for %s like printf's behave. glibc implementation knows a rule for precision, that I don't would to implement, because it is oriented to bytes and not to chars - and it can be confusing. Still I

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-16 Thread Amit Kapila
From: Cédric Villemain [mailto:ced...@2ndquadrant.com] Sent: Friday, November 16, 2012 1:55 PM To: pgsql-hackers@postgresql.org Cc: Amit Kapila; 'Robert Haas'; 'Greg Smith'; 'Josh Berkus'; 'Tom Lane'; 'Magnus Hagander'; 'Christopher Browne' Subject: Re: [HACKERS] Proposal for Allow

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2012-11-16 Thread Amit Kapila
On Thursday, November 15, 2012 10:19 PM Merlin Moncure wrote: On Thu, Nov 15, 2012 at 10:25 AM, Amit Kapila amit.kap...@huawei.com wrote: Sure, although in scans we are using ring buffer as well so in practical sense the results are pretty close. b. Considering sometimes people want

Re: [v9.3] Extra Daemons (Re: [HACKERS] elegant and effective way for running jobs inside a database)

2012-11-16 Thread Simon Riggs
On 15 November 2012 10:10, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I am unsure about the amount of pre-cooked stuff we need to provide. For instance, do we want some easy way to let the user code run transactions? That sounds like a basic requirement. There will be a few

Re: [HACKERS] [PATCH 05/14] Add a new relmapper.c function RelationMapFilenodeToOid that acts as a reverse of RelationMapOidToFilenode

2012-11-16 Thread Andres Freund
Hi, On 2012-11-16 13:44:45 +0900, Michael Paquier wrote: This patch looks OK. I got 3 comments: 1) Why changing the OID of pg_class_tblspc_relfilenode_index from 3171 to 3455? It does not look necessary. Its a mismerge and should have happened in Add a new RELFILENODE syscache to fetch a

Re: [v9.3] Extra Daemons (Re: [HACKERS] elegant and effective way for running jobs inside a database)

2012-11-16 Thread Kohei KaiGai
2012/10/22 Alvaro Herrera alvhe...@2ndquadrant.com: Here's an updated version of this patch, which also works in an EXEC_BACKEND environment. (I haven't tested this at all on Windows, but I don't see anything that would create a portability problem there.) I also tried to check the latest

Re: [HACKERS] [PATCH] Patch to compute Max LSN of Data Pages

2012-11-16 Thread Amit kapila
On Thursday, November 15, 2012 7:30 PM Robert Haas wrote: On Thu, Nov 15, 2012 at 12:08 AM, Amit Kapila amit.kap...@huawei.com wrote: Okay. So as Robert and Alvaro suggested to have it separate utility rather than having options in pg_resetxlog to print MAX LSN seems to be quite appropriate.

Re: [HACKERS] Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-11-16 Thread Amit Kapila
On Thursday, November 15, 2012 7:29 PM Amit kapila wrote: On Monday, November 12, 2012 8:23 PM Fujii Masao wrote: On Fri, Nov 9, 2012 at 3:03 PM, Amit Kapila amit.kap...@huawei.com wrote: On Thursday, November 08, 2012 10:42 PM Fujii Masao wrote: On Thu, Nov 8, 2012 at 5:53 PM, Amit Kapila

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Dimitri Fontaine
Jeff Davis pg...@j-davis.com writes: The documentation says that a materialized view is basically a create-table-as-select except that it remembers the query. Would you say that there is a compelling use case for this alone, or is this a building block for more sophisticated materialized view

Re: [v9.3] Extra Daemons (Re: [HACKERS] elegant and effective way for running jobs inside a database)

2012-11-16 Thread Alvaro Herrera
Kohei KaiGai escribió: 2012/10/22 Alvaro Herrera alvhe...@2ndquadrant.com: Here's an updated version of this patch, which also works in an EXEC_BACKEND environment. (I haven't tested this at all on Windows, but I don't see anything that would create a portability problem there.) I also

Re: [HACKERS] logical changeset generation v3 - comparison to Postgres-R change set format

2012-11-16 Thread Markus Wanner
Andres, On 11/15/2012 01:27 AM, Andres Freund wrote: In response to this you will soon find the 14 patches that currently implement $subject. Congratulations on that piece of work. I'd like to provide a comparison of the proposed change set format to the one used in Postgres-R. I hope for

Re: [HACKERS] Switching timeline over streaming replication

2012-11-16 Thread Amit Kapila
On Thursday, November 15, 2012 6:05 PM Heikki Linnakangas wrote: On 15.11.2012 12:44, Heikki Linnakangas wrote: Here's an updated version of this patch, rebased with master, including the recent replication timeout changes, and some other cleanup. On 12.10.2012 09:34, Amit Kapila wrote:

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2012-11-16 Thread Merlin Moncure
On Fri, Nov 16, 2012 at 4:32 AM, Amit Kapila amit.kap...@huawei.com wrote: On Thursday, November 15, 2012 10:19 PM Merlin Moncure wrote: On Thu, Nov 15, 2012 at 10:25 AM, Amit Kapila amit.kap...@huawei.com wrote: Sure, although in scans we are using ring buffer as well so in practical sense

Re: [HACKERS] logical changeset generation v3 - comparison to Postgres-R change set format

2012-11-16 Thread Andres Freund
Hi Markus, On 2012-11-16 14:46:39 +0100, Markus Wanner wrote: On 11/15/2012 01:27 AM, Andres Freund wrote: In response to this you will soon find the 14 patches that currently implement $subject. Congratulations on that piece of work. Thanks. I'd like to provide a comparison of the

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-16 Thread Amit Kapila
On Thursday, November 15, 2012 8:18 PM Amit kapila wrote: On Wednesday, November 14, 2012 12:24 AM Robert Haas wrote: On Mon, Nov 12, 2012 at 10:59 PM, Amit kapila amit.kap...@huawei.com wrote: Uh, no, I don't think that's a good idea. IMHO, what we should do is: 1. Read

Re: [HACKERS] tuplesort memory usage: grow_memtuples

2012-11-16 Thread Robert Haas
On Thu, Nov 15, 2012 at 2:54 PM, Greg Stark st...@mit.edu wrote: On Thu, Nov 15, 2012 at 7:36 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 15 November 2012 19:16, Robert Haas robertmh...@gmail.com wrote: So what's next here? Do you want to work on these issue some more? Or does Jeff?

Re: [HACKERS] tuplesort memory usage: grow_memtuples

2012-11-16 Thread Robert Haas
On Thu, Nov 15, 2012 at 4:13 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 15 November 2012 19:54, Greg Stark st...@mit.edu wrote: The only concern I had was about the behaviour after it did the special case. I didn't want it to keep doing the math and trying to grow again a little bit

Re: [HACKERS] logical changeset generation v3 - comparison to Postgres-R change set format

2012-11-16 Thread Andres Freund
Hi, On 2012-11-16 14:46:39 +0100, Markus Wanner wrote: You may have noticed that there's an additional COID field. This is an identifier for the transaction that last changed this tuple. Together with the primary key, it effectively identifies the exact version of a tuple (during its

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-11-16 Thread Cédric Villemain
Le vendredi 16 novembre 2012 15:08:30, Amit Kapila a écrit : On Thursday, November 15, 2012 8:18 PM Amit kapila wrote: On Wednesday, November 14, 2012 12:24 AM Robert Haas wrote: On Mon, Nov 12, 2012 at 10:59 PM, Amit kapila amit.kap...@huawei.com wrote: Uh, no, I don't think that's a

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2012-11-16 Thread Merlin Moncure
On Thu, Nov 15, 2012 at 6:42 PM, Jeff Davis pg...@j-davis.com wrote: On Tue, 2012-11-06 at 17:55 -0600, Merlin Moncure wrote: So given that -- the patch simple adds an extra check when/where hint bit status is checked in the visibility routines (currently, only HeapTupleSatisfiesMVCC is done

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

2012-11-16 Thread Hannu Krosing
On 11/15/2012 11:38 PM, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Thu, Nov 15, 2012 at 6:53 PM, Peter Eisentraut pete...@gmx.net wrote: The only thing you couldn't handle that way are SIGHUP settings, but the often-cited use cases work_mem, logging, etc. would work. How

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Merlin Moncure
On Thu, Nov 15, 2012 at 9:21 PM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: It occurred to me recently that many of the hint bits aren't terribly important (at least it's not obvious to me). HEAP_XMIN_COMMITTED clearly has a purpose, and we'd expect it to be used

Re: [HACKERS] [v9.3] writable foreign tables

2012-11-16 Thread Albe Laurenz
Kohei KaiGai wrote: The attached patch is just a refreshed version for clean applying to the latest tree. As previous version doing, it makes pseudo enhancement on file_fdw to print something about the supplied tuple on INSERT, UPDATE and DELETE statement. Basics: --- The patch

Re: [HACKERS] pg_dump --split patch

2012-11-16 Thread Dimitri Fontaine
Hi, Marko Tiikkaja pgm...@joh.to writes: The general output scheme looks like this: schemaname/OBJECT_TYPES/object_name.sql, I like this feature, I actually did have to code it myself in the past and several other people did so, so we already have at least 3 copies of `getddl` variants

Re: [HACKERS] foreign key locks

2012-11-16 Thread Andres Freund
On 2012-11-14 13:27:26 -0300, Alvaro Herrera wrote: Alvaro Herrera wrote: * In heap_lock_tuple's XMAX_IS_MULTI case [snip] why is it membermode mode and not membermode = mode? Uh, that's a bug. Fixed. As noticed in the comment above that snippet, there was a deadlock

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

2012-11-16 Thread Euler Taveira
On 16-11-2012 12:27, Hannu Krosing wrote: Why not just make the sending SIGHUP a separate command as it is now ? SELECT pg_reload_config(); ... or even a RELOAD command. I've already coded a WIP patch for such command. -- Euler Taveira de Oliveira - Timbira

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Andres Freund
On 2012-11-16 08:43:12 -0600, Merlin Moncure wrote: On Thu, Nov 15, 2012 at 9:21 PM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: It occurred to me recently that many of the hint bits aren't terribly important (at least it's not obvious to me). HEAP_XMIN_COMMITTED

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

2012-11-16 Thread Peter Eisentraut
On 11/15/12 12:53 PM, Peter Eisentraut wrote: All you'd need is to add ApplySetting(InvalidOid, InvalidOid, relsetting, PGC_S_$SOMETHING); in postinit.c, and have some SQL command to modify this setting. Alright, any suggestions for the syntax? We currently have ALTER DATABASE ... SET

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Merlin Moncure
On Fri, Nov 16, 2012 at 8:58 AM, Andres Freund and...@2ndquadrant.com wrote: On 2012-11-16 08:43:12 -0600, Merlin Moncure wrote: On Thu, Nov 15, 2012 at 9:21 PM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: It occurred to me recently that many of the hint bits

Re: [HACKERS] support for LDAP URLs

2012-11-16 Thread Robert Haas
On Fri, Nov 16, 2012 at 4:36 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: What do you think? Do we feel bound to adhere to RFC 1823? Well, I guess if we're already using that piece of ugliness elsewhere there's not much harm in propagating it here, too. The danger of course is that these

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Merlin Moncure
On Thu, Nov 15, 2012 at 10:14 PM, Pavan Deolasee pavan.deola...@gmail.com wrote: Another approach could be to set those additional bits, but don't dirty the page. So if the page is already dirty or gets dirty later on before its eviction, those hint bits will get recorded. We can also try some

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Andres Freund
On 2012-11-15 16:42:57 -0800, Jeff Davis wrote: Related to discussion here: http://archives.postgresql.org/message-id/cahyxu0zn5emepledozugraqif92f-yjvfr-p5vuh6n0wpkz...@mail.gmail.com It occurred to me recently that many of the hint bits aren't terribly important (at least it's not obvious

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

2012-11-16 Thread Euler Taveira
On 16-11-2012 12:59, Peter Eisentraut wrote: Another way might be something like SET GLOBAL name = value That's the exact syntax I'm about to propose for this feature (changing settings using SQL). Are you thinking about allowing changing all configuration settings or just a subset of it?

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Greg Smith wrote: On 11/14/12 6:28 PM, Kevin Grittner wrote: - Documentation is incomplete. ... - There are no regression tests yet. Do you have any simple test cases you've been using you could attach? With epic new features like this, when things don't work it's hard to distinguish

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Merlin Moncure
On Fri, Nov 16, 2012 at 7:13 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Jeff Davis pg...@j-davis.com writes: The documentation says that a materialized view is basically a create-table-as-select except that it remembers the query. Would you say that there is a compelling use case for

Re: [HACKERS] gset updated patch

2012-11-16 Thread Karl O. Pinc
Hi Pavel, On 11/16/2012 12:21:11 AM, Pavel Stehule wrote: 2012/11/16 Karl O. Pinc k...@meme.com: As long as I'm talking crazy talk, why not abandon psql as a shell language and instead make a pl/pgsql interpreter with readlne() in front of it? Solve all these language-related issues

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

2012-11-16 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Another way might be something like SET GLOBAL name = value but that would make the command very dissimilar from the other ones, even though their effects are closely related. Yeah. I think it would also give people a wrong impression about when the

Re: [HACKERS] foreign key locks

2012-11-16 Thread Alvaro Herrera
Noah Misch wrote: On Wed, Nov 14, 2012 at 01:27:26PM -0300, Alvaro Herrera wrote: https://github.com/alvherre/postgres/commit/df2847e38198e99f57e52490e1e9391ebb70d770 (I don't think this is worth a v24 submission). Are you aware of any defects in or unanswered questions of this version

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Jeff Davis wrote: On Wed, 2012-11-14 at 21:28 -0500, Kevin Grittner wrote: Attached is a patch that is still WIP but that I think is getting pretty close to completion. It is not intended to be the be-all and end-all for materialized views, but the minimum useful feature set -- which is

Re: [HACKERS] foreign key locks

2012-11-16 Thread Andres Freund
On 2012-11-16 13:17:47 -0300, Alvaro Herrera wrote: Noah Misch wrote: On Wed, Nov 14, 2012 at 01:27:26PM -0300, Alvaro Herrera wrote: https://github.com/alvherre/postgres/commit/df2847e38198e99f57e52490e1e9391ebb70d770 (I don't think this is worth a v24 submission). Are you aware

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Alvaro Herrera wrote: It's not clear to me that it's right to do this by doing regular heap updates here instead of heap_inplace_update. Also, I think this might end up causing a lot of pg_class tuple churn (at least for matviews that delete rows at xact end), which would be nice to avoid.

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Robert Haas
On Thu, Nov 15, 2012 at 7:42 PM, Jeff Davis pg...@j-davis.com wrote: But the other tuple hint bits seem to be there just for symmetry, because they shouldn't last long. If HEAP_XMIN_INVALID or HEAP_XMAX_COMMITTED is set, then it's (hopefully) going to be vacuumed soon, and gone completely. And

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Josh Berkus wrote: 1. CREATE MATERIALIZED VIEW syntax is stolen directly from CREATE TABLE AS, with all the same clauses supported. That includes declaring a materialized view to be temporary or unlogged. What use would a temporary matview be? It would be essentially like a temporary

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Robert Haas
On Thu, Nov 15, 2012 at 1:36 PM, Josh Berkus j...@agliodbs.com wrote: Hmmm. I understand the distinction you're making here, but I'm not sure it actually matters to the user. MVs, by their nature, always have potentially stale data. Being empty (in an inaccurate way) is just one kind of

Re: [HACKERS] [v9.3] writable foreign tables

2012-11-16 Thread Atri Sharma
Awesome. I would love to implement this API in JDBC_FDW. Atri Sent from my iPad On 16-Nov-2012, at 20:20, Albe Laurenz laurenz.a...@wien.gv.at wrote: Kohei KaiGai wrote: The attached patch is just a refreshed version for clean applying to the latest tree. As previous version doing, it

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Thom Brown
On 16 November 2012 16:25, Kevin Grittner kgri...@mail.com wrote: Josh Berkus wrote: Unlogged is good. I agree that there are likely to be more use cases for this than temp MVs. Unfortunately, I've had a hard time figuring out how to flag an MV which is empty because its contents were

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

2012-11-16 Thread Robert Haas
On Thu, Nov 15, 2012 at 5:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Another and probably bigger thing is that SIGHUP is used for settings that do something useful only in background processes (eg checkpointer). Some of those processes are not capable of reading system catalogs at all. This is

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Tom Lane
Kevin Grittner kgri...@mail.com writes: Josh Berkus wrote: What use would a temporary matview be? It would be essentially like a temporary table, with all the same persistence options. I'm not really sure how often it will be more useful than a temporary table before we have incremental

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Thom Brown
On 15 November 2012 02:28, Kevin Grittner kgri...@mail.com wrote: Attached is a patch that... Got this error: postgres=# create view v_test as select 1; CREATE VIEW postgres=# create materialized view mv_test as select * from v_test; ERROR: could not open file base/12064/16425: No such file

Re: [HACKERS] [WIP] pg_ping utility

2012-11-16 Thread Phil Sorber
Attached is updated patch v4 with the changes Michael pointed out. On Fri, Nov 16, 2012 at 12:28 AM, Tom Lane t...@sss.pgh.pa.us wrote: Phil Sorber p...@omniti.com writes: On Thu, Nov 15, 2012 at 10:55 PM, Michael Paquier michael.paqu...@gmail.com wrote: Hum, it is not really consistent to

Re: [HACKERS] [WIP] pg_ping utility

2012-11-16 Thread Phil Sorber
On Thu, Nov 15, 2012 at 10:55 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Nov 16, 2012 at 12:34 PM, Phil Sorber p...@omniti.com wrote: On Thu, Nov 15, 2012 at 9:23 PM, Michael Paquier michael.paqu...@gmail.com wrote: 3) Having an output close to what ping actually does would

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Jeff Davis
On Thu, 2012-11-15 at 22:21 -0500, Tom Lane wrote: We aren't pressed for flag bits particularly. I think the main attraction of this idea is precisely to reduce unnecessary page dirties, and so that leads me to suggest a variant: keep the four bits defined as now, but do not attempt to set

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

2012-11-16 Thread Hannu Krosing
On 11/16/2012 06:05 PM, Robert Haas wrote: On Thu, Nov 15, 2012 at 5:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Another and probably bigger thing is that SIGHUP is used for settings that do something useful only in background processes (eg checkpointer). Some of those processes are not capable

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

2012-11-16 Thread Tom Lane
Hannu Krosing ha...@krosing.net writes: Can't we keep a separate text .conf file specifically for the background processes which can't read system catalogs. It could contain only the GUCs these processes are interested in. What's the value of that, compared to the existing proposal for

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2012-11-16 Thread Atri Sharma
On Fri, Nov 16, 2012 at 7:33 PM, Merlin Moncure mmonc...@gmail.com wrote: On Fri, Nov 16, 2012 at 4:32 AM, Amit Kapila amit.kap...@huawei.com wrote: On Thursday, November 15, 2012 10:19 PM Merlin Moncure wrote: On Thu, Nov 15, 2012 at 10:25 AM, Amit Kapila amit.kap...@huawei.com wrote:

Re: [HACKERS] [v9.3] writable foreign tables

2012-11-16 Thread Kohei KaiGai
2012/11/16 Albe Laurenz laurenz.a...@wien.gv.at: Kohei KaiGai wrote: The attached patch is just a refreshed version for clean applying to the latest tree. As previous version doing, it makes pseudo enhancement on file_fdw to print something about the supplied tuple on INSERT, UPDATE and

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Antonin Houska
By chance (?) I got similar one today too, when dropping extension: ERROR: could not open file base/12623/12548: No such file or directory I thought something might have gone wrong during Linux upgrade 2 days ago, but it's not likely that we both have the issue. I wonder if something is

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Josh Berkus
Kevin, I agree that there are likely to be more use cases for this than temp MVs. Unfortunately, I've had a hard time figuring out how to flag an MV which is empty because its contents were lost after a crash with preventing people from using an MV which hasn't been populated, which has the

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

2012-11-16 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Have you considered ALTER SYSTEM SET ... ? We'd talked about that in the context of the other patch, but it seems to fit much more naturally with this one. Or maybe ALTER GLOBAL SET or ALTER ALL SET. I would paint that one ALTER SYSTEM SET and the file

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Dimitri Fontaine
Kevin Grittner kgri...@mail.com writes: UPDATE MATERIALIZED VIEW was problematic? Not technically, really, but I saw two reasons that I preferred LOAD MV: 1. It seems to me to better convey that the entire contents of the MV   will be built from scratch, rather than incrementally adjusted.

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: There's going to be a pretty strong demand for COPY FROM matviews. Forcing the user to use COPY FROM ( SELECT ... ) will be seen as arbitrary and unintuitive. You could make that same claim about plain views, but in point of fact the demand for making them

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Thom Brown wrote: postgres=# create view v_test as select 1; CREATE VIEW postgres=# create materialized view mv_test as select * from v_test; ERROR: could not open file base/12064/16425: No such file or directory Thanks for the report; will investigate. -Kevin -- Sent via pgsql-hackers

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Kevin Grittner
Robert Haas wrote: Josh Berkus wrote: Being empty (in an inaccurate way) is just one kind of stale data. This is my feeling also. If you had an MV summarizing Wisconsin courts cumulative case counts by case type, empty would not have been a valid stale state for over 150 years. That is a

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Jeff Davis
On Fri, 2012-11-16 at 11:58 -0500, Robert Haas wrote: Also, I am wondering about PD_ALL_VISIBLE. It was originally introduced in the visibility map patch, apparently as a way to know when to clear the VM bit when doing an update. It was then also used for scans, which showed a significant

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Jeff Janes
On Thu, Nov 15, 2012 at 4:42 PM, Jeff Davis pg...@j-davis.com wrote: Also, I am wondering about PD_ALL_VISIBLE. It was originally introduced in the visibility map patch, apparently as a way to know when to clear the VM bit when doing an update. It was then also used for scans, which showed a

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Jeff Davis
On Fri, 2012-11-16 at 16:09 +0100, Andres Freund wrote: As far as I understand the code the crash-safety aspects of the visibilitymap currently rely on on having the knowledge that ALL_VISIBLE has been cleared during a heap_(insert|update|delete). That allows management of the visibilitymap

Re: [HACKERS] Do we need so many hint bits?

2012-11-16 Thread Jeff Davis
On Fri, 2012-11-16 at 17:04 -0800, Jeff Janes wrote: On Thu, Nov 15, 2012 at 4:42 PM, Jeff Davis pg...@j-davis.com wrote: Also, I am wondering about PD_ALL_VISIBLE. It was originally introduced in the visibility map patch, apparently as a way to know when to clear the VM bit when doing an

Re: [HACKERS] Materialized views WIP patch

2012-11-16 Thread Josh Berkus
You could make that same claim about plain views, but in point of fact the demand for making them work in COPY has been minimal. So I'm not convinced this is an essential first-cut feature. We can always add it later. Of course. I just had the impression that we could support COPY FROM by

Re: [HACKERS] foreign key locks

2012-11-16 Thread Noah Misch
On Fri, Nov 16, 2012 at 05:31:12PM +0100, Andres Freund wrote: On 2012-11-16 13:17:47 -0300, Alvaro Herrera wrote: Andres is on the verge of convincing me that we need to support singleton FOR SHARE without multixacts due to performance concerns. I don't really see any arguments against

Re: [HACKERS] [PATCH 09/14] Adjust all *Satisfies routines to take a HeapTuple instead of a HeapTupleHeader

2012-11-16 Thread Steve Singer
On 12-11-14 08:17 PM, Andres Freund wrote: For the regular satisfies routines this is needed in prepareation of logical decoding. I changed the non-regular ones for consistency as well. The naming between htup, tuple and similar is rather confused, I could not find any consistent naming

Re: [HACKERS] Doc patch, put RAISE USING keywords into a table

2012-11-16 Thread Peter Eisentraut
On Fri, 2012-10-26 at 16:23 -0500, Karl O. Pinc wrote: Attached is: raise_using_keyword_table-v3.patch It uses a variable list instead of a table. I believe I prefer the table but this might (or might not) be more consistent with the style of other parts of the docs. I'm unsure whether

Re: [HACKERS] Doc patch, put pg_temp into the documentation's index

2012-11-16 Thread Peter Eisentraut
On Fri, 2012-09-28 at 11:10 -0500, Karl O. Pinc wrote: pg_temp-toindex.patch Puts pg_temp into the index of the docs. But there is no object called pg_temp. It always pg_temp_ something. How should that be indexed? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Doc patch: Document names of automatically created constraints and indexes

2012-11-16 Thread Peter Eisentraut
On Mon, 2012-11-12 at 11:42 -0600, Karl O. Pinc wrote: Could ALTER TABLE use an option to drop the primary key constraint? I needed to do that, found it was not obvious, and this lead me to try to improve things. That could be useful, I think. But it might open a can of worms. -- Sent

Re: [HACKERS] Add big fat caution to pg_restore docs regards partial db restores

2012-11-16 Thread Peter Eisentraut
On Sun, 2012-09-23 at 21:22 -0500, Karl O. Pinc wrote: Hi, Adds a caution to the pg_restore docs Against git master. I'm not sure what you are trying to get at here. It's basically saying, if you make an incomplete database restore, you might get an incomplete database. Is there any