Jeff Janes writes:
> On Tuesday, July 30, 2013, James Sewell wrote:
>> I understand what you are saying, and I understand how the backup_label
>> works - but I still don't understand why the pg_start and pg_stop commands
>> are REQUIRED when doing a snapshot backup to ensure data integrity.
>>
>>
On Tuesday, July 30, 2013, James Sewell wrote:
> I understand what you are saying, and I understand how the backup_label
> works - but I still don't understand why the pg_start and pg_stop commands
> are REQUIRED when doing a snapshot backup to ensure data integrity.
>
> Surely not using them and
On 07/30/2013 07:15 PM, Rob Sargent wrote:
I'm not getting the xml2 and uuid-ossp control files delivered to the
extension directory
I've moved to a CentOS box (and dropped pam):
cat /etc/system-release
CentOS release 6.4 (Final)
uname -a
Linux co-app-jl-d001 2.6.32-358.11.1.el6.x86_64 #1 SMP W
I'm not getting the xml2 and uuid-ossp control files delivered to the
extension directory
I've moved to a CentOS box (and dropped pam):
cat /etc/system-release
CentOS release 6.4 (Final)
uname -a
Linux co-app-jl-d001 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12
03:34:52 UTC 2013 x86_64 x86_64
I understand what you are saying, and I understand how the backup_label
works - but I still don't understand why the pg_start and pg_stop commands
are REQUIRED when doing a snapshot backup to ensure data integrity.
Surely not using them and restoring a snapshot is the same as starting
after a cras
Gavin Flower-2 wrote
> Also, since I know what table
> I'm looking at, it seemed redundant to also specify the table name as
> part of the table's primary key!
I find this quite the opposite approach. I know I am likely to use a
primary key as a foreign key so making it "externally friendly" ma
On 31/07/13 09:57, David Johnston wrote:
Gavin Flower-2 wrote
I use 'id' for the primary key, and [tablename]_id for each foreign key,
I always qualify my column references in SQL, but I would never use
SELECT * when selecting from more than one table.
Cheers,
Gavin
On 30/07/13 21:41, sidtheg
On Tue, Jul 30, 2013 at 4:57 PM, David Johnston wrote:
> I'm in the "prefix the id column" camp. I do not use "ORM" middle-ware so
> that may be a reason I do not have any difficulties but one of the big
> advantages to table-prefixing generic column names is that you can then make
> the assumpti
Gavin Flower-2 wrote
> I use 'id' for the primary key, and [tablename]_id for each foreign key,
> I always qualify my column references in SQL, but I would never use
> SELECT * when selecting from more than one table.
>
>
> Cheers,
> Gavin
>
> On 30/07/13 21:41, sidthegeek wrote:
>> I really d
On 07/30/2013 08:34 AM, Ingmar Brouns wrote:
Thanks for your time, appreciate it! As a dirty alternative, you could also do
something like:
select translate(5.000::text,'.',substr(to_char(.0),2,1));
Not so nice, but would work. Though I still feel there should be a more
elegant of doing this.
I use 'id' for the primary key, and [tablename]_id for each foreign key,
I always qualify my column references in SQL, but I would never use
SELECT * when selecting from more than one table.
Cheers,
Gavin
On 30/07/13 21:41, sidthegeek wrote:
I really dislike ambiguous column names across tab
On Tue, Jul 30, 2013 at 10:34 AM, bricklen wrote:
> Sorry bricklen, I've killed all idle connections with "kill -9 ",
>
>> then I was able to execute the alter table.
>>
>
> No problem.
>
btw, I meant 'no need to apologize that the queries were gone', not that I
recommend "kill -9" (I don't!)
On 7/30/2013 12:38 AM, Tatsuo Ishii wrote:
There is an opensource DaaS project called "RedDwarf". It seems the
project is only for MySQL. Does anybody know if the project will
support PostgreSQL in the future?
you'd more likely get a useful answer from that project's mail list or
forum or wh
Leonardo M. Ramé escribió:
> Sorry bricklen, I've killed all idle connections with "kill -9 ",
> then I was able to execute the alter table.
I don't think that was such a great idea. Once you killed the first
one, postmaster terminated all other server processes, run recovery, and
restarted serv
On Tue, Jul 30, 2013 at 10:29 AM, Leonardo M. Ramé wrote:
> > > select pg_cancel_backend(pid) from pg_stat_activity where pid <>
> > > pg_backend_pid();
>
As Giuseppe mentioned, if you need to kill not just the queries, but the
connection as well, you could use:
select pg_terminate_backend(pid)
On 2013-07-30 10:26:39 -0700, bricklen wrote:
> On Tue, Jul 30, 2013 at 10:07 AM, Leonardo M. Ramé wrote:
>
> >
> > select pg_cancel_backend(pid) from pg_stat_activity where pid <>
> > pg_backend_pid();
> >
> > And it returned this:
> >
> > pg_cancel_backend
> > ---
> > t
> > t
>
On Tue, Jul 30, 2013 at 10:07 AM, Leonardo M. Ramé wrote:
>
> select pg_cancel_backend(pid) from pg_stat_activity where pid <>
> pg_backend_pid();
>
> And it returned this:
>
> pg_cancel_backend
> ---
> t
> t
> (2 rows)
>
> But when I execute my update table command, it still nev
On 2013-07-30 17:56:16 +0200, Giuseppe Broccolo wrote:
> >How can I force disconnect all clients to let me alter that table?.
> >
> >Regards,
>
> There are two ways: the first|is based on pg_terminate_backend()
> function and 'pg_stat_activity' catalog |||to kill idle processes.
> So in a psql ses
Tom Jenkinson escribió:
> Hi Alban,
>
> I stripped down the code to a raw XA example using the latest
> postgres driver available in maven central. It demonstrates that
> regardless of what the codebase might suggest, it is certainly the
> case that postgres is returning XAER_RMERR in the scenario
How can I force disconnect all clients to let me alter that table?.
Regards,
There are two ways: the first|is based on pg_terminate_backend()
function and 'pg_stat_activity' catalog |||to kill idle processes.
So in a psql session type (tried on PostgreSQL 8.4):
==# SELECT procpid, (SELECT pg
Hi Alban,
I stripped down the code to a raw XA example using the latest postgres
driver available in maven central. It demonstrates that regardless of
what the codebase might suggest, it is certainly the case that postgres
is returning XAER_RMERR in the scenario where the resource manager no
I really dislike ambiguous column names across tables in a database. Use the
convention [tablename]_id for each id so every column name is self
describing. That way you can:
select * from providers inner join provider_types using(provider_type_id);
No need for table aliases, column aliases and no
i guess logical, caused by whatever. i really cannot say, the wal files all
*look* ok, still, they lead to a situation that's a definite dead end.
we did have a hard-drive failure (one in 13) at the time, but due to raid5
+ hot spare no data should have been corrupted. i mean it's an lsi
controller
On Tue, Jul 30, 2013 at 4:42 PM, Adrian Klaver wrote:
> On 07/30/2013 03:03 AM, Ingmar Brouns wrote:
>>
>> On Mon, Jul 29, 2013 at 3:12 PM, Ingmar Brouns wrote:
>
>
>>>
>>
>> anyone? Giving a locale corresponding textual representation
>> of a numerical value keeping the exact nr of decimal digit
On Tue, Jul 30, 2013 at 8:18 AM, Klaus Ita wrote:
>
> thank you! It turned out that really there was a corruption in the main pg
> server which was 'virally' propagated to
>
> 1. streaming replica
> 1. replaying wal receiver
> 1. old backup that tried to replay the wal's
>
> I really thought with
Yes, that's it!
thank you! It turned out that really there was a corruption in the main pg
server which was 'virally' propagated to
1. streaming replica
1. replaying wal receiver
1. old backup that tried to replay the wal's
I really thought with a master and 3 backups i'd be safe.
lg,k
On T
On Tue, Jul 30, 2013 at 7:50 AM, Leonardo M. Ramé wrote:
> Hi, I need to do an alter table on a small table (~300 records), but it
> never ends. It may be because there are clients using that table.
>
> How can I force disconnect all clients to let me alter that table?.
>
If you are using Postgre
On Mon, Jul 29, 2013 at 11:50 PM, Klaus Ita wrote:
> I am trying to remember, there was a tool that plotted the contents of the
> wal_files in a more readable format ...
>
xlogdump?
https://github.com/snaga/xlogdump
Hi, I need to do an alter table on a small table (~300 records), but it
never ends. It may be because there are clients using that table.
How can I force disconnect all clients to let me alter that table?.
Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000E
On 07/30/2013 03:03 AM, Ingmar Brouns wrote:
On Mon, Jul 29, 2013 at 3:12 PM, Ingmar Brouns wrote:
anyone? Giving a locale corresponding textual representation
of a numerical value keeping the exact nr of decimal digits
must be a fairly common use case. Would it be an idea to
implement a t
ok, thank to all
On Tue, Jul 30, 2013 at 3:30 PM, Beena Emerson wrote:
> Hi again,
>
> IIUC you want to update the alarm table only when the speed limit is above
> 100. You cannot achieve it by the view and triggers you have written here
> because the trigger will be fired even for values < 100
Hi again,
IIUC you want to update the alarm table only when the speed limit is above
100. You cannot achieve it by the view and triggers you have written here
because the trigger will be fired even for values < 100
=# INSERT INTO speedv VALUES (1, 'test', 10);
INSERT 0 1
=# SELECT * FROM speedv;
It works fine if you insert into the view:
=# INSERT INTO speedv VALUES (1, 'test', 100);
INSERT 0 1
=# SELECT * FROM alarm;
name | id | type |init| fired | t_end | t_user
--++---++---+---+
test | 0 | SPEED | 201
Thisi is my real situation, can I do this:
CREATE TABLE alarm(
name text,
id integer,
type text,
init timestamp,
fired timestamp,
end timestamp,
user test
);
CREATE TABLE car (
id integer,
type text,
speed double
);
CREATE VIEW speedv AS SELECT * FROM car WHERE speed>100;
CREATE OR
The trigger is on the view and fires when you query the view:
# DELETE FROM worksub;
NOTICE: UPDATE VIEW FROM: worksub OPERATION: DELETE
ERROR: control reached end of trigger procedure without RETURN
CONTEXT: PL/pgSQL function wrk_view()
On Tue, Jul 30, 2013 at 6:10 PM, Massimo Costantini
2013/7/30 Massimo Costantini :
>
> Hi,
>
> I have a problem with Triggers on VIEW:
>
> suppose I have:
>
> CREATE TABLE work (
> id integer NOT NULL,
> work TEXT,
> worktype TEXT
> );
>
> CREATE VIEW worksub AS SELECT FROM work WHERE worktype='subordinate';
>
>
> CREATE OR REPLACE FUNCTION wr
Hi,
I have a problem with Triggers on VIEW:
suppose I have:
CREATE TABLE work (
id integer NOT NULL,
work TEXT,
worktype TEXT
);
CREATE VIEW worksub AS SELECT FROM work WHERE worktype='subordinate';
CREATE OR REPLACE FUNCTION wrk_view() RETURNS TRIGGER AS $wrk_tg$
BEGIN
RAIS
On Mon, Jul 29, 2013 at 3:12 PM, Ingmar Brouns wrote:
> On Mon, Jul 29, 2013 at 1:24 PM, Ingmar Brouns wrote:
>> Hi,
>>
>> I need to convert some numerical values to text using the decimal
>> separator that corresponds to the current locale. However, I do
>> not want to lose information by paddin
Hi,
There is an opensource DaaS project called "RedDwarf". It seems the
project is only for MySQL. Does anybody know if the project will
support PostgreSQL in the future?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
--
Sent
Loïc Rollus wrote:
> It's ok.
> Before the insert, The foreign key constraint locked the row. If transaction
> A and B lock the row with
> FK, before doing UPDATE, they were stuck.
> I found a solution by creating an "before insert" trigger with a simple
> SELECT FROM UPDATE on the row.
You mean
Wow Andrew,
Great work! Lot of ideas to pick from.
Now, like you said it looks rather complicated and fragile. We will take a look
at creating a custom C trigger to see if we can have something easier.
Pity there was no agreement to just expose the object that fired the trigger.
Best,
On J
Hi,
It's ok.
Before the insert, The foreign key constraint locked the row. If
transaction A and B lock the row with FK, before doing UPDATE, they were
stuck.
I found a solution by creating an "before insert" trigger with a simple
SELECT FROM UPDATE on the row.
Loïc
2013/7/29 Loïc Rollus
> He
42 matches
Mail list logo