Hi,
Below query can be handy to find unused indexes.
select indexrelname from pg_stat_user_indexes where idx_scan = 0 and
idx_tup_read = 0 and idx_tup_fetch = 0 ;
Hope it helps.
Thanks & Regards,
Abdul Sayeed
EnterpriseDB Corporation - RDBA Team
The Postgres Database Company
Office: +1-732-
On Sun, Sep 1, 2013 at 10:35:57AM -0700, Jeff Davis wrote:
> [ late response, but might still be useful to someone ]
>
> You can work around the problem with a little effort if you call
> array_in directly. It takes the type output (cstring), element type
> (oid), and element typmod (integer).
>
Gianni Ceccarelli wrote:
> On 2013-08-31 Kevin Grittner wrote:
>> [Locks without PIDs] are predicate locks related to a
>> transaction which has been PREPARED (for two-phase commit) or
>> committed, but which may still be relevant because there are
>> overlapping read-write transactions which ar
DT wrote:
> I'm reading code of ALTER TABLE, and I found when target table
> needs rewrite, tuple inserted into new heap uses current
> transaction's xid as xmin.
That sure sounds wrong to me.
> Does this behavior satisfy serializable isolation? I wrote some
> test cases:
>
> [ Examples shows
Kevin Grittner-5 wrote
>> [ Examples shows that both SERIALIZABLE and REPEATABLE READ
>> transactions could see an empty table which was not empty as of
>> the point the snapshot was taken. For that matter, it was not
>> empty at any later point, either. ]
>
> Why don't we rewrite tuples with the
I narrowed the issue down to trying to select from a view being created in
the same extension, like so:
create or replace view av as select 1 as a;
create table ax as select * from av;
Even just selecting from the view after creating it causes the error so
it's the access to the view that's the i
Kevin Grittner writes:
> Why don't we rewrite tuples with their existing xid in such cases?
> The current state of affairs seem to me to be a pretty clear bug.
No, it isn't --- the tuple is being modified by the ALTER command.
regards, tom lane
--
Sent via pgsql-gener
Tom Lane wrote:
> Kevin Grittner writes:
>> Why don't we rewrite tuples with their existing xid in such
>> cases? The current state of affairs seem to me to be a pretty
>> clear bug.
>
> No, it isn't --- the tuple is being modified by the ALTER
> command.
If a REPEATABLE READ or SERIALIZABLE tr
Thanks.
how about the case as follows?
idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0, but
idx_blks_read is not 0 and idx_blks_hit is not 0
?
regards
On 3 Sep 2013, at 5:31 PM, Abdul Sayeed wrote:
> Hi,
>
> Below query can be handy to find unused indexes.
>
> select indexrelname
Kevin Grittner wrote:
> Tom Lane wrote:
>> Kevin Grittner writes:
>>> Why don't we rewrite tuples with their existing xid in such
>>> cases? The current state of affairs seem to me to be a pretty
>>> clear bug.
>>
>> No, it isn't --- the tuple is being modified by the ALTER
>> command.
>
> If a
On Tue, Sep 3, 2013 at 8:48 AM, ascot.m...@gmail.com
wrote:
> Thanks.
>
> how about the case as follows?
>
> idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0, but
> idx_blks_read is not 0 and idx_blks_hit is not 0
> ?
Maintaining an unused index still requires its blocks to be read.
Chee
Pavel Stehule wrote:
> PostgreSQL doesn't support a table variables
Well, from a relational theory point of view, a variable which
stores a relation is what a table *is*. PostgreSQL attempts to
store data for temporary tables in RAM and spill them to disk only
as needed. So IMO the response su
Thanks for the answers.
I just can't understabd why it's not possible to store multiple columns returning from a dynamic Select statement which is executet with EXECUTE into a temporary table.
If I'm gonna use the LOOP through the SELECT statement, how can insert the data from the record into the
On 09/03/2013 12:10 PM, Janek Sendrowski wrote:
Thanks for the answers.
I just can't understabd why it's not possible to store multiple columns
returning from a dynamic Select statement which is executet with EXECUTE
into a temporary table.
If I'm gonna use the LOOP through the SELECT statement,
Janek Sendrowski wrote:
> I just can't understabd why it's not possible to store multiple
> columns returning from a dynamic Select statement which is
> executet with EXECUTE into a temporary table.
You can:
CREATE TEMPORARY TABLE AS SELECT ...
http://www.postgresql.org/docs/current/interactiv
I'm trying to use timestamp ranges to keep track of the values particular items
had over time, but I'm unable to create a table as follows:
test=# create extension btree_gist;
CREATE EXTENSION
test=# create table v(item uuid, lifetime tstzrange, value text,
test(# exclude using gist (item with
Tom Lane-2 wrote
>> Why don't we rewrite tuples with their existing xid in such cases?
>> The current state of affairs seem to me to be a pretty clear bug.
>
> No, it isn't --- the tuple is being modified by the ALTER command.
>
> regards, tom lane
I'm not quite sure what
PostgreSQL folks!
We are looking for the next big thing. Actually, it's a bit smaller: a
new design for mugs. So far we had big blue elephants, small blue
elephants, frosty elephants, white SQL code on black mugs ... Now it's
time to design something new.
What's in for you? Fame, of course
The links don't work.
I don't know why.
how just don't know how to insert the data of a record in a table
On 09/03/2013 02:52 PM, Janek Sendrowski wrote:
The links don't work.
I don't know why.
how just don't know how to insert the data of a record in a table
The link I sent points to 39.6.4. Looping Through Query Results in the
plpgsql documentation:
http://www.postgresql.org/docs/9.2/interacti
On Tue, Sep 3, 2013 at 3:08 PM, Andreas 'ads' Scherbaum
wrote:
> We are looking for the next big thing. Actually, it's a bit smaller: a new
> design for mugs. So far we had big blue elephants, small blue elephants,
> frosty elephants, white SQL code on black mugs ... Now it's time to design
> some
I am working on a date-based partitioning framework and I would really like
to have a single function that could be used as trigger for any table that
needs to be partitioned by day. I am working in a rails environment, so
every table has a created_at datetime field.
I created my generic function:
On 09/03/2013 04:34 PM, Janek Sendrowski wrote:
A loop through every input sentence
FOR i IN 1..array_length(p_sentence, 1) LOOP
FOR some_rec IN EXECUTE "SELECT * FROM table WHERE "Fulltextsearch
statement" LOOP
"Insert the current record data into the temp table"
END LOOP;
END
On Tuesday, September 3, 2013, Gregory Haase wrote:
> I am working on a date-based partitioning framework and I would really
> like to have a single function that could be used as trigger for any table
> that needs to be partitioned by day. I am working in a rails environment,
> so every table has
On 09/03/2013 04:34 PM, Janek Sendrowski wrote:
A loop through every input sentence
FOR i IN 1..array_length(p_sentence, 1) LOOP
FOR some_rec IN EXECUTE "SELECT * FROM table WHERE "Fulltextsearch
statement" LOOP
"Insert the current record data into the temp table"
END LOOP;
END
On Tue, Sep 3, 2013 at 1:41 PM, Martin Renters wrote:
> I'm trying to use timestamp ranges to keep track of the values particular
> items had over time, but I'm unable to create a table as follows:
>
> test=# create extension btree_gist;
> CREATE EXTENSION
> test=# create table v(item uuid, lifet
26 matches
Mail list logo