Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Magnus Hagander
On Thu, 27 Mar 2008 00:13:42 -0400 Tom Lane [EMAIL PROTECTED] wrote: Andrew Dunstan [EMAIL PROTECTED] writes: I suspect that the size reported by stat() is a little delayed here, but the file system is keeping proper track of it, so the lseek that tries to extend the file fails at the

Re: [HACKERS] Proposal: improve shutdown during online backup

2008-03-27 Thread Albe Laurenz
Greg Smith wrote: 1) On pg_ctl stop|restart -m smart, check if online backup is in progress and do not shutdown in this case (treat the online backup like an open connection). As long as you give a warning as to the cause. While you're in there, I think more output in general about

Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Alvaro Herrera
Andrew Dunstan wrote: I'm working on this (thank goodness for junctions). Maybe we shopuld look at providing a config setting for pg_xlog. I hope you mean an initdb switch -- otherwise it is way too easy to misuse. -- Alvaro Herrera

Re: [HACKERS] [BUGS] Problem identifying constraints which should not be inherited

2008-03-27 Thread NikhilS
Hi, On Thu, Mar 20, 2008 at 7:36 PM, Tom Lane [EMAIL PROTECTED] wrote: More to the point, it takes a capability away from the user without actually solving the problem we need to solve, namely to guarantee consistency between parent and child constraints. You can be sure that there is

Re: [HACKERS] [BUGS] Problem identifying constraints which should not be inherited

2008-03-27 Thread Heikki Linnakangas
NikhilS wrote: Am important decision here is about adding a new attribute to pg_constraint as it is the only sane way of determining inherited constraints, but that will require an initdb. Comments? There's no problem forcing an initdb at this point in the release cycle. We will do that for

Re: [HACKERS] Script binaries renaming

2008-03-27 Thread Zdenek Kotala
Marc G. Fournier napsal(a): -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Wednesday, March 26, 2008 12:58:41 +0100 Zdeněk Kotala [EMAIL PROTECTED] wrote: Minimal me :-) and Solaris Architect committee have complain. Question is also how many users really use these commands. For

Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Zubkovsky, Sergey
Maybe this helps: It is not an error to set a file pointer to a position beyond the end of the file. The size of the file does not increase until you call the SetEndOfFile, WriteFile, or WriteFileEx function. A write operation increases the size of the file to the file pointer position plus the

Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Andrew Dunstan
Zubkovsky, Sergey wrote: Maybe this helps: It is not an error to set a file pointer to a position beyond the end of the file. The size of the file does not increase until you call the SetEndOfFile, WriteFile, or WriteFileEx function. A write operation increases the size of the file to the

Re: [HACKERS] Script binaries renaming

2008-03-27 Thread Alvaro Herrera
Zdenek Kotala wrote: Thanks for correction. I don't have yet PG8.3 on my production server and I was convinced with good autovacuum marketing that is ultimate solution. :-) It is not perfect yet. It's improving -- keep in mind it's rather new. However, I doubt vacuumdb -a is the thing to

Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Andrew Dunstan wrote: I'm working on this (thank goodness for junctions). Maybe we shopuld look at providing a config setting for pg_xlog. I hope you mean an initdb switch -- otherwise it is way too easy to misuse. There's one already ..

Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

2008-03-27 Thread Andrew Dunstan
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Andrew Dunstan wrote: I'm working on this (thank goodness for junctions). Maybe we shopuld look at providing a config setting for pg_xlog. I hope you mean an initdb switch -- otherwise it is way too easy to

[HACKERS] Patch queue permenent URLs

2008-03-27 Thread Bruce Momjian
I have found a way to have permanent URLs that stay permanent even if the email is moved from the patches queue to the patches_hold queue. The trick is to use base to specify the base directory in the html. The new URLs look like: http://momjian.us/mhonarc/message-id/[EMAIL PROTECTED]

Re: [HACKERS] [BUGS] Problem identifying constraints which should not be inherited

2008-03-27 Thread Tom Lane
NikhilS [EMAIL PROTECTED] writes: ... * Add logic to mark inherited constraints in the children: This can be achieved by introducing a new bool coninherited attribute in pg_constraint. This will be set to true on only those check constraints that are added to children via the inheritance

Re: [HACKERS] Patch queue permenent URLs

2008-03-27 Thread Simon Riggs
On Thu, 2008-03-27 at 11:18 -0400, Bruce Momjian wrote: The new URLs look like: http://momjian.us/mhonarc/message-id/[EMAIL PROTECTED] The new URLs appear now. The old permanent will also remain active until the next commit fest. If they are going to be permanent then they should

Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Aidan Van Dyk
* Brendan Jurd [EMAIL PROTECTED] [080326 10:19]: On 27/03/2008, Gurjeet Singh [EMAIL PROTECTED] wrote: Is the rsync daemon on anoncvs down? Is everyone else able to do rsync? Possibly related; the Postgres git repository at http://repo.or.cz/w/PostgreSQL.git is showing the last commit at

Re: [HACKERS] Patch queue permenent URLs

2008-03-27 Thread Dave Page
On Thu, Mar 27, 2008 at 3:44 PM, Simon Riggs [EMAIL PROTECTED] wrote: On Thu, 2008-03-27 at 11:18 -0400, Bruce Momjian wrote: The new URLs look like: http://momjian.us/mhonarc/message-id/[EMAIL PROTECTED] The new URLs appear now. The old permanent will also remain active

Re: [HACKERS] Patch queue permenent URLs

2008-03-27 Thread Alvaro Herrera
Simon Riggs wrote: On Thu, 2008-03-27 at 11:18 -0400, Bruce Momjian wrote: The new URLs look like: http://momjian.us/mhonarc/message-id/[EMAIL PROTECTED] The new URLs appear now. The old permanent will also remain active until the next commit fest. If they are going to be

Re: [HACKERS] Patch queue permenent URLs

2008-03-27 Thread Bruce Momjian
Dave Page wrote: On Thu, Mar 27, 2008 at 3:44 PM, Simon Riggs [EMAIL PROTECTED] wrote: On Thu, 2008-03-27 at 11:18 -0400, Bruce Momjian wrote: The new URLs look like: http://momjian.us/mhonarc/message-id/[EMAIL PROTECTED] The new URLs appear now. The old permanent

Re: [HACKERS] Windows shared_buffers limitations

2008-03-27 Thread Rainer Bauer
Greg Smith wrote: Was working on some documentation today and I realized that I've taken for granted the lore about not using large values for shared_buffers in Windows without ever understanding why. Can someone explain what the underlying mechanism that causes that limitation is? From

[HACKERS] psql and named pipes

2008-03-27 Thread Alvaro Herrera
I was under the impression that I could start a psql -f pipe and then feed it commands through the pipe using echo, and expect it to hang from one command to the next. Of course, this doesn't work -- my guess is that echo sends an EOF after the line I send, so psql sees the EOF in the pipe and

Re: [HACKERS] psql and named pipes

2008-03-27 Thread Aidan Van Dyk
* Alvaro Herrera [EMAIL PROTECTED] [080327 12:58]: I was under the impression that I could start a psql -f pipe and then feed it commands through the pipe using echo, and expect it to hang from one command to the next. Of course, this doesn't work -- my guess is that echo sends an EOF after

Re: [HACKERS] Windows shared_buffers limitations

2008-03-27 Thread Gregory Stark
Rainer Bauer [EMAIL PROTECTED] writes: Greg Smith wrote: Was working on some documentation today and I realized that I've taken for granted the lore about not using large values for shared_buffers in Windows without ever understanding why. Can someone explain what the underlying mechanism

Re: [HACKERS] Minor changes to Recovery related code

2008-03-27 Thread Simon Riggs
Follow-up during March 2008 CommitFest On Thu, 2007-06-07 at 21:53 +0100, Simon Riggs wrote: On Sat, 2007-03-31 at 00:51 +0200, Florian G. Pflug wrote: Simon Riggs wrote: On Fri, 2007-03-30 at 16:34 -0400, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: 2. pg_stop_backup()

Re: [HACKERS] psql and named pipes

2008-03-27 Thread Alvaro Herrera
Aidan Van Dyk wrote: I've had to use: while (true); do cat pipe; done | psql The trick is that pipes EOFs everytime the cleint closes it. (Not strictly true, but it appears that way to basic read()ers). Ah! Yeah, I knew that and forgot :-) It's easier than that actually -- you

Re: [HACKERS] psql and named pipes

2008-03-27 Thread Aidan Van Dyk
* Alvaro Herrera [EMAIL PROTECTED] [080327 13:51]: Ah! Yeah, I knew that and forgot :-) It's easier than that actually -- you just need to keep the pipe open in another process. So I can do this: first open a terminal with $ psql -f foo And then, in another terminal, $ cat foo

Re: [HACKERS] [PATCHES] CopyReadLineText optimization

2008-03-27 Thread Heikki Linnakangas
Heikki Linnakangas wrote: 1. CopyReadLineText is all about finding the the next end of line; splitting to fields is done later. We therefore only care about quotes and escapes when they affect the end of line detection. In text mode, we only need to care about a backslash that precedes a

[HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Gurjeet Singh
Hi all, For PG versions 8.3 (specifically 8.2) I wanted the %r parameter to be substituted by the last restart point, just as the recovery code does in 8.3. I assumed there would be objections to it (else it would have already been there in 8.2.x), so started looking for workarounds. After

[HACKERS] Indexing for Expression type data using GIST

2008-03-27 Thread Wizard Shah
Hi All, I am trying to implement indexing mechanism for the Expression type data using GIST. For that purpose I need to store some extra information in the Meta-Data of the GIST Index. The information is entered when the index is created on the table. Can any body give me some suggestion how

Re: [HACKERS] Indexing for Expression type data using GIST

2008-03-27 Thread Martijn van Oosterhout
On Thu, Mar 27, 2008 at 02:03:09PM -0500, Wizard Shah wrote: Hi All, I am trying to implement indexing mechanism for the Expression type data using GIST. For that purpose I need to store some extra information in the Meta-Data of the GIST Index. There is no real provision for this but,

Re: [HACKERS] psql and named pipes

2008-03-27 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I was under the impression that I could start a psql -f pipe and then feed it commands through the pipe using echo, and expect it to hang from one command to the next. Of course, this doesn't work -- my guess is that echo sends an EOF after the line I

Re: [HACKERS] Commit fest status

2008-03-27 Thread Simon Riggs
On Mon, 2008-03-24 at 17:50 -0400, Bruce Momjian wrote: FYI, we started the commit fest with 2k emails. We now have 787 emails left to process, and many are done but waiting for me to add TODO items or just delete them. Just finished reviewing the remaining items on the queue that I can

Re: [HACKERS] Windows shared_buffers limitations

2008-03-27 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: One thing which comes to mind is that it's possible Windows is swapping out shared memory making having large shared memory segments dangerous on that front. This is a hazard on most Unixen as well. Windows may just be a bit more aggressive about it.

Re: [HACKERS] TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers

2008-03-27 Thread Russell Smith
Hi, It looks like most of the hard yards will be in getting some form of consensus about what should be done for this TODO. I can't see a reason not to get started on the design now. If a decision is not able to be made after 4 years since the original discussion, is it worth removing the

Re: [HACKERS] Indexing for Expression type data using GIST

2008-03-27 Thread Wizard Shah
Hi, The information is a simple structure with a string and integer. It basically represents what attributes of the expression are going to be part of the index struct ExpIndexInfo { int count; char* ExpIndex; }; e.g we have an expression data like price 1300 AND color = blue AND

Re: [HACKERS] Commit fest status

2008-03-27 Thread Bruce Momjian
Simon Riggs wrote: On Mon, 2008-03-24 at 17:50 -0400, Bruce Momjian wrote: FYI, we started the commit fest with 2k emails. We now have 787 emails left to process, and many are done but waiting for me to add TODO items or just delete them. Just finished reviewing the remaining items on

Re: Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Brendan Jurd
On 28/03/2008, Aidan Van Dyk [EMAIL PROTECTED] wrote: And I just forgot to re-enable my cron after I finished looking at it. Ah, the old post-maintenance-disabled-cron gaff. One of my personal favourites. =) I'm not sure that the git repos has fully recovered. There seems to a block of

Re: [HACKERS] TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers

2008-03-27 Thread Tom Lane
Russell Smith [EMAIL PROTECTED] writes: The options I thought of were: ... 3. fully case sensitive even for unquoted identifiers (not spec compliant at all, but nevertheless possibly attractive especially for people migrating from MS SQLServer, where it is an option, IIRC). Actually, I

Re: [HACKERS] Sorting Improvements for 8.4

2008-03-27 Thread Bruce Momjian
Added to TODO: * Consider being smarter about memory and external files used during sorts http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php

Re: [HACKERS] [COMMITTERS] pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search

2008-03-27 Thread Robert Treat
On Sunday 16 March 2008 22:18, Tom Lane wrote: Log Message: --- Fix TransactionIdIsCurrentTransactionId() to use binary search instead of linear search when checking child-transaction XIDs. This makes for an important speedup in transactions that have large numbers of children, as

Re: [HACKERS] [COMMITTERS] pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search

2008-03-27 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: On Sunday 16 March 2008 22:18, Tom Lane wrote: Fix TransactionIdIsCurrentTransactionId() to use binary search instead of linear search when checking child-transaction XIDs. Are there any plans to backpatch this into REL8_3_STABLE? No. It looks like I

[HACKERS] PostgreSQL Replication with read-only access to standby DB

2008-03-27 Thread Keaton Adams
This is probably better answered by the PostgreSQL developer team, so I am posting/moving my discussion to this thread. My apologies if there was a better avenue to pursue this requested feature. This is exactly what we are after. Log based replication built into the core database that would

Re: Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Aidan Van Dyk
* Brendan Jurd [EMAIL PROTECTED] [080327 16:08]: I'm not sure that the git repos has fully recovered. There seems to a block of commits missing, between 2008-03-25 13:09 and 2008-03-27 17:24 UTC. Looking at the CVS logs, there was definitely commit action in that timeframe, but none of it

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Greg Smith
On Fri, 28 Mar 2008, Gurjeet Singh wrote: For PG versions 8.3 (specifically 8.2) I wanted the %r parameter to be substituted by the last restart point, just as the recovery code does in 8.3. I assumed there would be objections to it (else it would have already been there in 8.2.x) The

Re: [HACKERS] TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers

2008-03-27 Thread Martijn van Oosterhout
On Fri, Mar 28, 2008 at 03:30:21AM +1100, Russell Smith wrote: 3. the client needs to know what quote rules are in place. (libpq: PQfname, PQfnumber) The question I want to see answered, is how something like DBD::Pg will handle this. If I wrote code like this in Perl: my %hash =

Re: Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Alex Hunsaker
BTW, anybody following the GIT mirror, the REL8_3_STABLE branch has been re-wound, you you'll probably have to force update it (git fetch -f) if you only accept fast forward updates on fetches (the default). Thanks! now i can ditch the git.or.cz mirror And if you have patches based on

Re: Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Alex Hunsaker
On Thu, Mar 27, 2008 at 5:34 PM, Alex Hunsaker [EMAIL PROTECTED] wrote: BTW, anybody following the GIT mirror, the REL8_3_STABLE branch has been re-wound, you you'll probably have to force update it (git fetch -f) if you only accept fast forward updates on fetches (the default).

Re: [HACKERS] TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers

2008-03-27 Thread Gregory Stark
Martijn van Oosterhout [EMAIL PROTECTED] writes: On Fri, Mar 28, 2008 at 03:30:21AM +1100, Russell Smith wrote: 3. the client needs to know what quote rules are in place. (libpq: PQfname, PQfnumber) The question I want to see answered, is how something like DBD::Pg will handle this. If I

Re: Status of GIT mirror (Was [HACKERS] having problem in rsync'ing cvs)

2008-03-27 Thread Aidan Van Dyk
* Alex Hunsaker [EMAIL PROTECTED] [080327 19:38]: On Thu, Mar 27, 2008 at 5:34 PM, Alex Hunsaker [EMAIL PROTECTED] wrote: BTW, anybody following the GIT mirror, the REL8_3_STABLE branch has been re-wound, you you'll probably have to force update it (git fetch -f) if you only accept

Re: [HACKERS] TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers

2008-03-27 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Martijn van Oosterhout [EMAIL PROTECTED] writes: Will this change break my code? Well, DBI already has to deal with this anyways because it tries to provide a database-independent interface. So you can instruct DBI to upcase, downcase, or leave the

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Gurjeet Singh
On Fri, Mar 28, 2008 at 3:56 AM, Greg Smith [EMAIL PROTECTED] wrote: On Fri, 28 Mar 2008, Gurjeet Singh wrote: For PG versions 8.3 (specifically 8.2) I wanted the %r parameter to be substituted by the last restart point, just as the recovery code does in 8.3. I assumed there would be

Re: [HACKERS] [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)

2008-03-27 Thread Bruce Momjian
It seems there is already a project on pgfoundry but there are no files: http://pgfoundry.org/projects/clearxlogtail/ Should this be on pgfoundry or in the Postgres distribution. It seems it might be tied enough to the WAL format to be in the Postgres distribution.

Re: [HACKERS] Transaction Snapshot Cloning

2008-03-27 Thread Bruce Momjian
Added to TODO: * Allow one transaction to see tuples using the snapshot of another transaction This would assist multiple backends in working together. http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php

Re: [HACKERS] proposal for 8.4: PL/pgSQL - statement CASE

2008-03-27 Thread Bruce Momjian
Added to TODO: o Add CASE capability to language (already in SQL) http://archives.postgresql.org/pgsql-hackers/2008-01/msg00696.php --- Pavel Stehule wrote: Hello I found so PL/SQL support CASE

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Greg Smith
On Fri, 28 Mar 2008, Gurjeet Singh wrote: This project doesn't make functional changes to stable releases, that's the reason why 8.2 will never get patched to add the %r feature. I completely understand that, but still was hoping that we'd change that. Well, then you really don't understand

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Gurjeet Singh
On Fri, Mar 28, 2008 at 9:47 AM, Greg Smith [EMAIL PROTECTED] wrote: On Fri, 28 Mar 2008, Gurjeet Singh wrote: This project doesn't make functional changes to stable releases, that's the reason why 8.2 will never get patched to add the %r feature. I completely understand that, but still

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: ... That was a small change in a utility that should never be run on a production system. You're trying to get a change made to the code path people rely on for their *backups*. Good luck with that. While I quite agree with Greg's comments about not

Re: [HACKERS] Script binaries renaming

2008-03-27 Thread Robert Treat
On Wednesday 26 March 2008 12:17, Andrew Dunstan wrote: Zdenek Kotala wrote: Tom Lane napsal(a): Zdenek Kotala [EMAIL PROTECTED] writes: Why we have pg_dump and pg_dumpall? Or I think pg_resetxlog has same output like pg_controldata. I think we can merge these commands. Now we're into

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-03-27 Thread Greg Smith
On Fri, 28 Mar 2008, Tom Lane wrote: While I quite agree with Greg's comments about not changing stable release branches unnecessarily, it seems that there's another consideration in this case. I was just trying to set Gurjeet's expectations appropriately while taking the suggestion

Re: [HACKERS] [COMMITTERS] pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search

2008-03-27 Thread Robert Treat
On Thursday 27 March 2008 17:11, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: On Sunday 16 March 2008 22:18, Tom Lane wrote: Fix TransactionIdIsCurrentTransactionId() to use binary search instead of linear search when checking child-transaction XIDs. Are there any plans to

Re: [HACKERS] [COMMITTERS] pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search

2008-03-27 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: If you can convince me it's a regression I might reconsider, but I rather doubt that 8.2 was better, Well, I can't speak for 8.2, but I have a second system crunching the same data using the same function on 8.1 (on lesser hardware in fact), and it