Re: [HACKERS] [PATCHES] Dbsize backend integration

2005-06-29 Thread Michael Paesold
Bruce Momjian wrote: Dave Page wrote: pg_relation_size(text) - Get relation size by name/schema.name pg_relation_size(oid)- Get relation size by OID pg_tablespace_size(name) - Get tablespace size by name pg_tablespace_size(oid) - Get tablespace size by OID pg_database_size(name) -

[PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Christopher Kings-Lynne
Hi, Attached patch enables dumping of LOB comments when in text mode. I really don't get the binary/custom format LOB stuff (and don't have time to investigate), so perhaps someone else can do that. Having it in text format is still an improvement though. Chris blobcomments.txt.gz

Re: [PATCHES] plperl features

2005-06-29 Thread Sergej Sergeev
Bruce Momjian wrote: Sergej, are you going to repost this patch? Sorry for delaying. Yes, I working on it, but I wait for decision about Andrew and Abhijit patches. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[PATCHES] libpq: fix unlikely memory leak

2005-06-29 Thread Neil Conway
The attached patch fixes a theoretical memory leak in libpq: if the second malloc() fails due to OOM, the memory returned by the first (successful) malloc() will be leaked. Barring any objections I'll apply this tomorrow. Per report from EnterpriseDB's Coverity analysis. -Neil Index:

[PATCHES] spi_query/spi_fetchrow for pl/perl

2005-06-29 Thread Abhijit Menon-Sen
The attached patch implements spi_query() and spi_fetchrow() functions for PL/Perl, to avoid loading the entire result set into memory as the existing spi_exec_query() function does. Here's how one might use the new functions: $x = spi_query(select ...); while (defined ($y =

Re: [PATCHES] Dbsize backend integration

2005-06-29 Thread Bruce Momjian
Dave Page wrote: -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Wed 6/29/2005 2:16 AM To: Dave Page Cc: PostgreSQL-patches; PostgreSQL-development Subject: Re: [PATCHES] Dbsize backend integration OK, so you went with relation as heap/index/toast only,

Re: [HACKERS] [PATCHES] Dbsize backend integration

2005-06-29 Thread Bruce Momjian
Michael Paesold wrote: Do we have to use pg_object_size? Is there a better name? Are indexes/toasts even objects? Relation is not an ideal names, but I heard people talk about heap relation and index relation. Indexes and tables (and sequences) are treated in a similar way quite

Re: [PATCHES] plperl features

2005-06-29 Thread Andrew Dunstan
Sergej Sergeev said: Bruce Momjian wrote: Sergej, are you going to repost this patch? Sorry for delaying. Yes, I working on it, but I wait for decision about Andrew and Abhijit patches. This is the polymorphic types plus perl to pg array patch, right? I am not working on this right now

Re: [PATCHES] libpq: fix unlikely memory leak

2005-06-29 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: The attached patch fixes a theoretical memory leak in libpq: if the second malloc() fails due to OOM, the memory returned by the first (successful) malloc() will be leaked. Since both allocations are only transient within this routine, there's a simpler

[PATCHES] Change Ownership Permission Checks

2005-06-29 Thread Stephen Frost
Greetings, Attached please find a patch to change how the permissions checking for alter-owner is done. With roles there can be more than one 'owner' of an object and therefore it becomes sensible to allow specific cases of ownership change for non-superusers. The permission checks

Re: [HACKERS] [PATCHES] Dbsize backend integration

2005-06-29 Thread Andreas Pflug
Bruce Momjian wrote: Yea, but then we have toast and we would need another name. I suggested pg_storage_size() because it relates to a storage unit (index, toast, etc), and not a real object or relation. I'm not really happy that all functions change their names (more versioning handling

Re: [HACKERS] [PATCHES] Dbsize backend integration

2005-06-29 Thread Tom Lane
Andreas Pflug [EMAIL PROTECTED] writes: I'm not really happy that all functions change their names (more versioning handling in pgadmin), but pg_storage_size is certainly the most precise name. Actually, it seems excessively imprecise to me: the name conveys nothing at all to help you

[PATCHES] Autovacuum integration patch

2005-06-29 Thread Alvaro Herrera
Hackers, (Resend, like fifth time or so. bzip2'ing the patch for luck.) Here is a first cut at autovacuum integration. Please have a look at it. Note that this patch automatically creates three new files: src/backend/postmaster/autovacuum.c src/include/catalog/pg_autovacuum.h

Re: [PATCHES] libpq: fix unlikely memory leak

2005-06-29 Thread Neil Conway
Tom Lane wrote: Since both allocations are only transient within this routine, there's a simpler more effective solution, which is to only do one malloc in the first place Yeah, true. Attached is a revised patch -- committed to HEAD. -Neil Index: src/interfaces/libpq/fe-auth.c

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Attached patch enables dumping of LOB comments when in text mode. I really don't get the binary/custom format LOB stuff (and don't have time to investigate), so perhaps someone else can do that. That's pretty icky :-(. I think the right way

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Alvaro Herrera
On Wed, Jun 29, 2005 at 11:05:43PM -0400, Tom Lane wrote: Christopher Kings-Lynne [EMAIL PROTECTED] writes: Attached patch enables dumping of LOB comments when in text mode. I really don't get the binary/custom format LOB stuff (and don't have time to investigate), so perhaps someone else

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Christopher Kings-Lynne
Attached patch enables dumping of LOB comments when in text mode. I really don't get the binary/custom format LOB stuff (and don't have time to investigate), so perhaps someone else can do that. That's pretty icky :-(. I think the right way is more like this. Hehe - in the world of open

[PATCHES] tiny patch to fic unixware build

2005-06-29 Thread Andrew Dunstan
In the course of looking into Larry's buildfarm woes, I found that Unixware needs this patch on HEAD to build correctly cheers andrew Index: src/backend/utils/adt/timestamp.c === RCS file:

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Wed, Jun 29, 2005 at 11:05:43PM -0400, Tom Lane wrote: That's pretty icky :-(. I think the right way is more like this. Wow, that's complex. No wonder I wasn't able to come up with a patch to dump ALTER DATABASE commands some time ago. The trick

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Christopher Kings-Lynne
The trick in hacking pg_dump is to understand which layer you need to modify. The whole thing seems overly complex to me :-( ... but redesigning it is a project for another release cycle. I just find the whole BLOB handling very tricky to understand :( I vote that we combine pg_dumpall and

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: we can possibly gain custom format full cluster dumps. Do we care? The main rationale for inventing a custom format, as I recall it, was (a) plain text couldn't hack blobs and (b) you needed the ability to rearrange the dump order to work around

Re: [PATCHES] Autovacuum integration patch

2005-06-29 Thread Matthew T. O'Connor
Alvaro Herrera wrote: There are several things that are painfully evident with this thing on: - TRUNCATE does not update stats. It should send a stat message to which we can react. How important is this really? The stats from before the truncate might be ok, especially since they

Re: [PATCHES] Dump comments on large objects in text mode

2005-06-29 Thread Alvaro Herrera
On Wed, Jun 29, 2005 at 11:44:58PM -0400, Tom Lane wrote: (BTW: Alvaro, I've been having direct mail to you bounce lately --- let's see if this goes through ...) Yeah, sorry about that :-( I realized I must change mail provider ASAP when I noticed it's been eating my own emails (e.g. the

Re: [PATCHES] Autovacuum integration patch

2005-06-29 Thread Matthew T. O'Connor
Alvaro Herrera wrote: Hackers, Here is a first cut at autovacuum integration. Please have a look at it. Note that this patch automatically creates three new files: Couple more things that I didn't think about while we were talking about this the other day. XID wraparound: The patch