Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b68f1de

Browse files
committed
Well, CREATE TRIGGER's lock seems to be already enough.
And Postgres has LOCK TABLE cmd anyway.
1 parent 6f17dfb commit b68f1de

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

pg_shardman--0.0.1.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@ $$ LANGUAGE plpgsql;
407407
CREATE FUNCTION readonly_table_on(relation regclass)
408408
RETURNS void AS $$
409409
BEGIN
410-
-- Grab exclusive lock on table to finish existing transactions
411-
PERFORM shardman.ae_lock_table(relation);
412410
-- Create go away trigger to prevent any new ones
413411
PERFORM shardman.readonly_table_off(relation);
414412
EXECUTE format(

src/udf.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,3 @@ pq_conninfo_parse(PG_FUNCTION_ARGS)
269269
PQconninfoFree(opts);
270270
PG_RETURN_DATUM(HeapTupleGetDatum(heap_form_tuple(tupdesc, values, nulls)));
271271
}
272-
273-
/*
274-
* Obtain AccessExclusiveLock on table
275-
*/
276-
PG_FUNCTION_INFO_V1(ae_lock_table);
277-
Datum
278-
ae_lock_table(PG_FUNCTION_ARGS)
279-
{
280-
Oid relid = PG_GETARG_OID(0);
281-
LockRelationOid(relid, AccessExclusiveLock);
282-
PG_RETURN_VOID();
283-
}

0 commit comments

Comments
 (0)