Re: [HACKERS] Displaying accumulated autovacuum cost

2011-08-22 Thread Greg Smith
On 08/22/2011 05:54 PM, Jim Nasby wrote: I know folks have talked about progress, but I haven't seen anything specific... could you add info about what table/index vacuum is working on, and how far along it is? I realize that's not very close to an actual % completion, but it's far better than

Re: [HACKERS] 9.1rc1: TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274)

2011-08-22 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 22, 2011 at 4:16 PM, Erik Rijkers wrote: >> The below SQL causes: >> TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274) > I can reproduce this on master but not on 9.0. I suspect the problem > was introduced by this commit: > commit 0f61

Re: [HACKERS] SSL-mode error reporting in libpq

2011-08-22 Thread Daniel Farina
On Sun, Jul 24, 2011 at 11:48 AM, Tom Lane wrote: > We could perhaps go a bit further and make pqsecure_write responsible > for the error message in non-SSL mode too, but it looks to me like > pqSendSome has to have a switch on the errno anyway to decide whether to > keep trying or not, so moving

Re: [HACKERS] cheaper snapshots redux

2011-08-22 Thread Robert Haas
On Mon, Aug 22, 2011 at 6:45 PM, Jim Nasby wrote: > Something that would be really nice to fix is our reliance on a fixed size of > shared memory, and I'm wondering if this could be an opportunity to start in > a new direction. My thought is that we could maintain two distinct shared > memory s

Re: [HACKERS] cheaper snapshots redux

2011-08-22 Thread Jim Nasby
On Aug 22, 2011, at 4:25 PM, Robert Haas wrote: > What I'm thinking about > instead is using a ring buffer with three pointers: a start pointer, a > stop pointer, and a write pointer. When a transaction ends, we > advance the write pointer, write the XIDs or a whole new snapshot into > the buffer,

Re: [HACKERS] 9.1rc1: TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274)

2011-08-22 Thread Robert Haas
On Mon, Aug 22, 2011 at 4:16 PM, Erik Rijkers wrote: > I am developing against 9.1beta3 and encountered this problem. I repeated it > against rc1 (or > actually, REL9_1_STABLE taken from git today). > > The below SQL causes: > > TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line:

Re: [HACKERS] Displaying accumulated autovacuum cost

2011-08-22 Thread Jim Nasby
On Aug 18, 2011, at 10:41 AM, Greg Smith wrote: > that was all they got. I'm going to add directly computing the write MB/s > figure from the dirty data written too, since that ends up being the thing > that I keep deriving by hand anyway. I know folks have talked about progress, but I haven't

Re: [HACKERS] How to define global variable in postgresql

2011-08-22 Thread Jim Nasby
On Aug 19, 2011, at 4:15 PM, Valentine Gogichashvili wrote: > > Hello. How can we define a global variable in postgresql? > > you can also use global structure in plpython for example: > > http://www.postgresql.org/docs/9.0/static/plpython-sharing.html Same thing with plperl. BTW, if you want s

[HACKERS] cheaper snapshots redux

2011-08-22 Thread Robert Haas
On Wed, Jul 27, 2011 at 10:51 PM, Robert Haas wrote: > On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane wrote: >> I wonder whether we could do something involving WAL properties --- the >> current tuple visibility logic was designed before WAL existed, so it's >> not exploiting that resource at all.  I

Re: [HACKERS] Single pass vacuum - take 2

2011-08-22 Thread Jim Nasby
On Aug 22, 2011, at 1:22 AM, Pavan Deolasee wrote: > Hi All, > > Here is a revised patch based on our earlier discussion. I implemented > Robert's idea of tracking the vacuum generation number in the line > pointer itself. For LP_DEAD line pointers, the lp_off/lp_len is unused > (and always set to

[HACKERS] 9.1rc1: TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274)

2011-08-22 Thread Erik Rijkers
I am developing against 9.1beta3 and encountered this problem. I repeated it against rc1 (or actually, REL9_1_STABLE taken from git today). The below SQL causes: TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274) and the session crashes. select * from ( select

Re: [HACKERS] PushActiveSnapshot(GetTransactionSnapshot())

2011-08-22 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of dom ago 21 16:23:39 -0300 2011: > In common cases of snapshot use we run GetSnapshotData() into a > statically allocated snapshot, then immediately copy the static struct > into a dynamically allocated copy. > > The static allocation was designed to remove th

Re: [HACKERS] Rethinking sinval callback hook API

2011-08-22 Thread Robert Haas
On Sun, Aug 21, 2011 at 6:24 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Aug 19, 2011 at 2:13 PM, Tom Lane wrote: >>> 1. Robert was speculating the other day about wanting to be able to >>> snoop the inval traffic.  Right now, callbacks can only snoop a fairly >>> small subset of it. >

Re: [HACKERS] UUID datatype GiST index support

2011-08-22 Thread Misa Simic
Thanks Alexander, 'Scalar datatype' - given me a hint... Looking further in btree_gist source, for inet datatype, which seems a bit complexier then uuid... (char, char, char[16]) structure for inet, compared to jut char[16] for uuid. GiST pattern works with double datatype... and there is method

Re: [HACKERS] UUID datatype GiST index support

2011-08-22 Thread Alexander Korotkov
Hi! On Mon, Aug 22, 2011 at 2:54 PM, Misa Simic wrote: > static int > m4_uuidkey_cmp(const void *a, const void *b) > { > uuidKEY*ia = (uuidKEY *) (((Usrt *) a)->t); > uuidKEY*ib = (uuidKEY *) (((Usrt *) b)->t); > int res; > > res = DatumGetInt32(DirectFunctionCall2(uuid_cmp, UUIDPGetDat

[HACKERS] UUID datatype GiST index support

2011-08-22 Thread Misa Simic
Hi, Hopefully someone can help me and point me in right direction :) I have been looking for GiST support extension for UUID datatype... since I could not find it... I wanted to write it myself. I need it more for EXCLUSION constraint - than to use GIST index just on UUID column... i.e: CREATE

Re: [HACKERS] WIP: Fast GiST index build

2011-08-22 Thread Alexander Korotkov
On Wed, Aug 17, 2011 at 11:11 AM, Alexander Korotkov wrote: > On Tue, Aug 16, 2011 at 11:15 PM, Heikki Linnakangas < > heikki.linnakan...@enterprisedb.com> wrote: > >> On 16.08.2011 22:10, Heikki Linnakangas wrote: >> >>> Here's an version of the patch with a bunch of minor changes: >>> >> >> And

Re: [HACKERS] Question: CREATE EXTENSION and create schema permission?

2011-08-22 Thread Kohei KaiGai
The attached patch adds permission check at the scenario that I explained bellow. Unlike CreateSchemaCommand(), we don't have check_is_member_of_role() here because the extowner is obviously same with the current user in this code path. I hope this patch being also back ported to v9.1 tree, not o

Re: [HACKERS] FATAL: lock AccessShareLock on object 0/1260/0 is already held

2011-08-22 Thread daveg
On Fri, Aug 12, 2011 at 04:19:37PM -0700, daveg wrote: > > This seems to be bug month for my client. Now there are seeing periods > where all new connections fail immediately with the error: > >FATAL: lock AccessShareLock on object 0/1260/0 is already held > > This happens on postgresql 8.

[HACKERS] tab stop in README

2011-08-22 Thread YAMAMOTO Takashi
hi, i know that postgresql uses ts=4 for C source code. but how about documatation? src/backend/access/transam/README seems to have both of ts=4 and ts=8 mixed. YAMAMOTO Takashi -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://w