I am trying to fully understand, how costs for queries are computed.
Taking the following example:
CREATE TABLE test (name varchar(250) primary key) ;
INSERT INTO test (name) VALUES(generate_series(1, 1000)::text) ;
ANALYZE test ;
EXPLAIN SELECT * FROM test WHERE name = '4' ;
I am getting the o
Hey,
how can I implement temporal foreign keys with postgresql? Is writing
triggers the only way to enforce temporal referential integrity
currently?
-Matthias
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/m
On Thu, Feb 2, 2012 at 8:37 PM, Adrian Klaver wrote:
> On Wednesday, February 01, 2012 10:51:44 pm Venkat Balaji wrote:
> > Hello,
> >
> > I was testing the Postgres-9.1.1 synchronous streaming replication on our
> > UAT system.
> >
> > Without synchronous replication, everything was working fine.
On Feb 2, 2012, at 2:51 PM, Magnus Hagander wrote:
>> I have a need at my $dayjob to let users cancel their own back ends. See any
>> issues with this function to allow them to do that? Any security gotchas or
>> anything?
>
> You mean something like this?
> http://git.postgresql.org/gitweb/?p=
On Thu, Feb 2, 2012 at 23:38, David E. Wheeler wrote:
> PostgreSQLers,
>
> I have a need at my $dayjob to let users cancel their own back ends. See any
> issues with this function to allow them to do that? Any security gotchas or
> anything?
You mean something like this?
http://git.postgresql.o
PostgreSQLers,
I have a need at my $dayjob to let users cancel their own back ends. See any
issues with this function to allow them to do that? Any security gotchas or
anything?
CREATE OR REPLACE FUNCTION iov_cancel_user_backend(
pid INTEGER
) RETURNS BOOLEAN LANGUAGE plpgsql SECURITY DEFIN
PostgreSQL 9.0.4:
While bringing up a streaming replica, and while it is working its way through
the WAL segments before connecting to the primary, I see a lot of messages of
the form:
2012-02-01 21:26:13.978 PST,,,24448,,4f2a1e61.5f80,54,,2012-02-01 21:25:53
PST,1/0,0,LOG,0,"restored log
El Thu, 2 Feb 2012 12:03:20 -0500
escribió:
> Do EXPLAIN ANALYZE:
>
> written=2325 !
>
> "Total runtime: 375542.347 ms"
>
>
> Then Do EXPLAIN ANALYZE again:
> In general, can you tell me why [written=2325] is displayed by the
> first EXPLAIN, but not the second EXPLAIN ? The query is
Do EXPLAIN ANALYZE:
. . . only showing the bottom node . . .
-> Seq Scan on Y
(cost=0.00..37962.29 rows=876029 width=40)
(actual time=16.728..92555.945 rows=876002 loops=1)
Output: foo, bar
Buffers:
shared hit=146
read=29056
written=2325 !
"Total runtime: 375542.347 ms"
Then Do
On Thu, Feb 02, 2012 at 02:20:59PM +0100, hubert depesz lubaczewski wrote>
> Sure. But at least theoretically, it could use index - for example, if
> I had index "where column is null".
To build that index, you had to visit every row too. But I see what
your problem is.
> But this should be nea
On Wednesday, February 01, 2012 10:51:44 pm Venkat Balaji wrote:
> Hello,
>
> I was testing the Postgres-9.1.1 synchronous streaming replication on our
> UAT system.
>
> Without synchronous replication, everything was working fine.
>
> But, when i enabled synchronous_replication_names='*', the "
On 2/2/12 12:39 AM, Scott Marlowe wrote:
> On Wed, Feb 1, 2012 at 4:27 PM, Scott Marlowe wrote:
>> On Wed, Feb 1, 2012 at 3:29 PM, Christian Ramseyer wrote:
>>> Optimally, I'd just have my applications perform a single
>>> call after connecting, e.g. "audit_init('USERNAME', 'Name of application')
* hubert depesz lubaczewski:
> procedure would look like:
> 1. update pg_attribute set attnotnull = true where attrelid =
> 'my_table'::regclass and attname = 'not-null-column';
> 2. delete from my_table where not-null-column is null; -- this shouldn't
>do anything, as I know that there are n
On Thu, Feb 02, 2012 at 02:08:51PM +, Florian Weimer wrote:
> * hubert depesz lubaczewski:
>
> > I tried with some indexes, but I can't get the time to something
> > reasonable, so here is my question: is there any way I could make the
> > "not null" constraint *fast*?
>
> You coul patch pg_a
* Christopher Opena:
> We've been running into some very strange issues of late with our
> PostgreSQL database(s). We have an issue where a couple of queries push
> high CPU on a few of our processors and the entire database locks (reads,
> writes, console cannot be achieved unless the high CPU q
* hubert depesz lubaczewski:
> I tried with some indexes, but I can't get the time to something
> reasonable, so here is my question: is there any way I could make the
> "not null" constraint *fast*?
You coul patch pg_attribute directly. I'm not sure if that's still safe
in current versions, tho
On Wed, Feb 1, 2012 at 6:38 PM, Christopher Opena wrote:
> Hello folks,
>
> We've been running into some very strange issues of late with our PostgreSQL
> database(s). We have an issue where a couple of queries push high CPU on a
> few of our processors and the entire database locks (reads, write
On Thu, Feb 02, 2012 at 07:26:15AM -0500, Andrew Sullivan wrote:
> > I need to add not null on one of the columns, but it seems to require
> > full table scan.
> Of course it does. If you want a constraint added to the table, the
> first thing it ought to do is check that all your data actually
>
Hi Marti,
The parameter statement_timeout isn't configured..
I'm using the value default.. 0..
And this is happening when I'm doing large querys on the slave..
thanks,
Tulio
Em 01/02/2012 12:33, Marti Raudsepp escreveu:
On Mon, Jan
On Thu, Feb 02, 2012 at 12:48:04PM +0100, hubert depesz lubaczewski
wrote
> I need to add not null on one of the columns, but it seems to require
> full table scan.
Of course it does. If you want a constraint added to the table, the
first thing it ought to do is check that all your data actually
Well I have been running the function using the data you sent against both an
8.4.1 and 8.4.9 instance on and off a good part of the day. At this point we
are
talking many thousands of runs. In either case I have not seen an error. So
either I am incredibly lucky(I wish) or something is going o
I have 8.3 database with non-trivial table (~ 80million rows, but the
rows are just two integers).
I need to add not null on one of the columns, but it seems to require
full table scan.
I tried with some indexes, but I can't get the time to something
reasonable, so here is my question: is there a
Hi,
I found patch for 8.4:
When reporting a deadlock, report the text of all queries involved in the
deadlock to the server log (Itagaki Takahiro)
My question is how to enable this feature in 9.1.2 - is it activated out of the
box or do I have to enable it somehow?
Regards,
Bartek
Pozdrawiam,
Bar
On Wed, Feb 01, 2012 at 10:02:14PM +0100, Dimitri Fontaine wrote:
> The case for a table that is partly user data and partly extension data
> is very thin, I think that if I had this need I would use inheritance
> and a CHECK(user_data is true/false) constraint to filter the data.
definitely agree
Hi all,
I am using postgresql streaming replication for my project. For
automatic failover and online recovery I am trying to use pgpool-II.
Failover is working fine. But in online recovery I am facing issue.
When I am trying to recover master node (which was down earlier) as
slave node then maste
On 1 February 2012 22:29, Christian Ramseyer wrote:
> Hello list
>
> I'm trying to build a little trigger-based auditing for various web
> applications. They have many users in the application layer, but they
> all use the same Postgres DB and DB user.
>
> So I need some kind of session storage to
26 matches
Mail list logo